I'm happy to report I seem to have found a solution. I'll reveal it, and humbly suggest improvements to debian's package recommendations and suggestions.
The important lines in valgring's copious output appear to be ==5040== Invalid free() / delete / delete[] / realloc() ==5040== at 0x482F978: operator delete(void*) (coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==5040== by 0x54D3504: deallocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:125) ==5040== by 0x54D3504: deallocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:462) ==5040== by 0x54D3504: _M_destroy (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:226) ==5040== by 0x54D3504: _M_dispose (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:221) ==5040== by 0x54D3504: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:647) ==5040== by 0x491A7AA: __run_exit_handlers (/build/glibc-EGkrdO/glibc-2.24/stdlib/exit.c:83) ==5040== by 0x491A810: exit (/build/glibc-EGkrdO/glibc-2.24/stdlib/exit.c:105) ==5040== by 0x4904291: (below main) (/build/glibc-EGkrdO/glibc-2.24/csu/../csu/libc-start.c:325) ==5040== Address 0x4e13250 is 0 bytes inside a block of size 25 free'd ==5040== at 0x482F978: operator delete(void*) (coregrind/m_replacemalloc/vg_replace_malloc.c:576) ==5040== by 0x54D3504: deallocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:125) ==5040== by 0x54D3504: deallocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:462) ==5040== by 0x54D3504: _M_destroy (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:226) ==5040== by 0x54D3504: _M_dispose (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:221) ==5040== by 0x54D3504: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.h:647) ==5040== by 0x491A7AA: __run_exit_handlers (/build/glibc-EGkrdO/glibc-2.24/stdlib/exit.c:83) ==5040== by 0x491A810: exit (/build/glibc-EGkrdO/glibc-2.24/stdlib/exit.c:105) ==5040== by 0x4904291: (below main) (/build/glibc-EGkrdO/glibc-2.24/csu/../csu/libc-start.c:325) ==5040== Block was alloc'd at ==5040== at 0x482E91C: operator new(unsigned int) (coregrind/m_replacemalloc/vg_replace_malloc.c:328) ==5040== by 0x54D2C2B: allocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:111) ==5040== by 0x54D2C2B: allocate (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:436) ==5040== by 0x54D2C2B: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned int&, unsigned int) (/build/gcc-7-2ld3ob/gcc-7-7.2.0/build/i686-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:153) ==5040== by 0x17FBEDDB: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.25] (/usr/include/c++/7/bits/basic_string.tcc:219) ==5040== by 0x17F01878: __static_initialization_and_destruction_0 (./D4AsyncUtil.cc:23) ==5040== by 0x17F01878: _GLOBAL__sub_I_D4AsyncUtil.cc (./D4AsyncUtil.cc:357) ==5040== by 0x400FC54: call_init.part.0 (/build/glibc-EGkrdO/glibc-2.24/elf/dl-init.c:72) ==5040== by 0x400FD7D: call_init (/build/glibc-EGkrdO/glibc-2.24/elf/dl-init.c:30) ==5040== by 0x400FD7D: _dl_init (/build/glibc-EGkrdO/glibc-2.24/elf/dl-init.c:120) ==5040== by 0x4013F56: dl_open_worker (/build/glibc-EGkrdO/glibc-2.24/elf/dl-open.c:575) ==5040== by 0x400FB00: _dl_catch_error (/build/glibc-EGkrdO/glibc-2.24/elf/dl-error.c:187) ==5040== by 0x4013748: _dl_open (/build/glibc-EGkrdO/glibc-2.24/elf/dl-open.c:660) ==5040== by 0x4AA3BF4: dlopen_doit (/build/glibc-EGkrdO/glibc-2.24/dlfcn/dlopen.c:66) ==5040== by 0x400FB00: _dl_catch_error (/build/glibc-EGkrdO/glibc-2.24/elf/dl-error.c:187) ==5040== by 0x4AA42EC: _dlerror_run (/build/glibc-EGkrdO/glibc-2.24/dlfcn/dlerror.c:163) These show the bogus second delete() on line 2, the legit delete() on the 12th line, and the memory originally being allocated by D4AsyncUtil.cc on the 10th line from the bottom. D4AsyncUtil.cc is part of libdap. Upgrading these libdap packages libdapclient6v5:i386 from 3.15.1-1 to 3.19.1-1 and libdapserver7v5:i386 from 3.15.1-1 to 3.19.1-1 seems to have fixed the bug! As you can see in valgrind's output, D4AsyncUtil.cc/libdap is called dynamically. So, I don't know for sure which code originated the call, but 1.) $ apt-rdepends -r libdapclient6v5 and $ apt-rdepends -r libdapserver7v5 reveal that libgdal20 (2.2.2+dfsg-2+b3) depends on both, libopencv-imgcodecs3.2 depends on libgdal20 (>= 2.0.1) and frei0r-plugins (1.6.1-1+b1) depends on libopencv-imgcodecs3.2 2.) the kdenlive pacakges recommends frei0r-plugins, but doesn't specify a minimum version, and 3.) frei0r's web site (https://www.dyne.org/software/frei0r/) says they're also used by ffmpeg. I humbly suggest improving the package descriptions of frei0r-plugins: to depend on at least version 3.2.0+dfsg-4 of libopencv-imgcodecs3.2 and libgdal20: to depend on at least version 3.19.1-1 of libdapclient6v5 and libdapserver7v5. If you agree, maybe you could reassign this bug report to the appropriate package(s). Thanks, Kingsley -- Time is the fire in which we all burn.