SEGFAULT in mkvmerge after ENOSPC exception
cmdline:
mkvmerge --ui-language en_US --output /foo.mkv --audio-tracks 2 --language 0:eng --track-name 0:foo --default-track 0:yes --forced-track 0:no --language 2:eng --track-name 2:foo --default-track 2:yes --language 3:eng --track-name 3:foo --default-track 3:no ( foo_in.mkv ) --title foo --no-date --disable-track-statistics-tags --flush-on-close --engage native_mpeg4 --engage no_variable_data --track-order 0:0,0:2,0:3
console:
The file '/foo.mkv' has been opened for writing.
Error: An exception occurred when writing the destination file. The drive may be full. Exception details: reading from/writing to the file error; No space left to write to
Segmentation fault (core dumped)
gdb backtrace:
#0 0x00007f438fa534b0 in __dynamic_cast () from /usr/lib64/libstdc++.so.6
#1 0x00005653e364f7d7 in kax_cluster_c::delete_non_blocks (this=this@entry=0x5653e5060e10) at src/merge/libmatroska_extensions.cpp:166
#2 0x00005653e364f843 in kax_cluster_c::~kax_cluster_c (this=<optimized out>, this=<optimized out>) at src/merge/libmatroska_extensions.cpp:153
#3 0x00005653e364f879 in kax_cluster_c::~kax_cluster_c (this=<optimized out>, this=<optimized out>) at src/merge/libmatroska_extensions.cpp:154
#4 0x00005653e3683078 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5653e4eddf20) at /usr/include/c++/9/bits/shared_ptr_base.h:148
#5 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5653e4eddf20) at /usr/include/c++/9/bits/shared_ptr_base.h:148
#6 0x00005653e3660917 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#7 std::__shared_ptr<kax_cluster_c, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#8 std::shared_ptr<kax_cluster_c>::~shared_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103
#9 cluster_helper_c::impl_t::~impl_t (this=<optimized out>, this=<optimized out>) at src/merge/cluster_helper.cpp:41
#10 std::default_delete<cluster_helper_c::impl_t>::operator() (this=<optimized out>, __ptr=0x5653e4e0bb30) at /usr/include/c++/9/bits/unique_ptr.h:81
#11 std::unique_ptr<cluster_helper_c::impl_t, std::default_delete<cluster_helper_c::impl_t> >::~unique_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:292
#12 cluster_helper_c::~cluster_helper_c (this=<optimized out>, this=<optimized out>) at src/merge/cluster_helper.cpp:49
#13 0x00005653e364780a in std::default_delete<cluster_helper_c>::operator() (this=<optimized out>, __ptr=<optimized out>, this=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:75
#14 std::unique_ptr<cluster_helper_c, std::default_delete<cluster_helper_c> >::reset (__p=<optimized out>, this=<optimized out>, this=<optimized out>, __p=<optimized out>) at /usr/include/c++/9/bits/unique_ptr.h:402
#15 cleanup () at src/merge/output_control.cpp:2202
#16 0x00005653e350def1 in std::function<void ()>::operator()() const (this=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/std_function.h:683
#17 mxexit (code=2) at src/common/common.cpp:103
#18 0x00005653e34b15dc in default_mxerror (error=...) at src/common/output.cpp:197
#19 0x00005653e34ac85b in std::function<void (unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>::operator()(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (
__args#1=..., __args#0=<optimized out>, this=<optimized out>) at /usr/include/c++/9/bits/std_function.h:683
#20 mxerror (error=...) at src/common/output.cpp:203
#21 0x00005653e3433366 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/fmt/core.h:1745