Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core dump on opening a makemkv-generated file #60

Closed
logic opened this issue Nov 30, 2020 · 3 comments
Closed

Core dump on opening a makemkv-generated file #60

logic opened this issue Nov 30, 2020 · 3 comments

Comments

@logic
Copy link

logic commented Nov 30, 2020

I ripped a music video from the extras on one of my blu-rays using makemkv (then set the title using mkvpropedit, in case that matters), and tageditor (on Fedora 32, using the openSUSE build service RPMs) crashes during in what appears to be tag parsing when loading it:

$ gdb tageditor
GNU gdb (GDB) Fedora 9.1-6.fc32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tageditor...
Reading symbols from /usr/lib/debug/usr/bin/tageditor-3.3.9-6.2.x86_64.debug...
(gdb) set args "William Control feat. Matt Skiba - Deathclub (Wes Borland_Renholder Remix).mkv"
(gdb) run
Starting program: /usr/bin/tageditor "William Control feat. Matt Skiba - Deathclub (Wes Borland_Renholder Remix).mkv"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffddc85700 (LWP 575901)]
[New Thread 0x7fffd7fff700 (LWP 575902)]
[New Thread 0x7fffd77fe700 (LWP 575903)]
[New Thread 0x7fffd6ffd700 (LWP 575904)]
[New Thread 0x7fffd67fc700 (LWP 575905)]
[New Thread 0x7fffc7ebe700 (LWP 575929)]
[New Thread 0x7fffc76bd700 (LWP 575930)]
[New Thread 0x7fffc6ebc700 (LWP 575931)]
[New Thread 0x7fffc66bb700 (LWP 575932)]
[New Thread 0x7fffc5d96700 (LWP 575933)]
[New Thread 0x7fffc4e69700 (LWP 575934)]
[Detaching after fork from child process 575935]
[Detaching after fork from child process 575936]
[New Thread 0x7fffbb27e700 (LWP 575939)]
[New Thread 0x7fffbaa7d700 (LWP 575940)]
[New Thread 0x7fffba27c700 (LWP 575941)]
[New Thread 0x7fffb9a7b700 (LWP 575942)]
[New Thread 0x7fffb927a700 (LWP 575943)]
[New Thread 0x7fffb8a79700 (LWP 575944)]
[New Thread 0x7fff8b7fe700 (LWP 575946)]
[New Thread 0x7fff8bfff700 (LWP 575945)]
[New Thread 0x7fff8affd700 (LWP 575947)]
[New Thread 0x7fff89ffb700 (LWP 575949)]
[New Thread 0x7fff8a7fc700 (LWP 575948)]
[New Thread 0x7fff897fa700 (LWP 575950)]
[New Thread 0x7fff88ff9700 (LWP 575951)]
[New Thread 0x7fff67fff700 (LWP 575952)]
[New Thread 0x7fff677fe700 (LWP 575953)]
[New Thread 0x7fff66ffd700 (LWP 575954)]
[New Thread 0x7fff667fc700 (LWP 575965)]
[New Thread 0x7fff65ffb700 (LWP 575966)]
[New Thread 0x7fff657fa700 (LWP 575967)]
/usr/include/c++/10/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::back() [with _Tp = TagParser::PpsInfo; _Alloc = std::allocator<TagParser::PpsInfo>; std::vector<_Tp, _Alloc>::reference = TagParser::PpsInfo&]: Assertion '__builtin_expect(!this->empty(), true)' failed.
[New Thread 0x7fff64ff9700 (LWP 575968)]

Thread 31 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff657fa700 (LWP 575967)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50        return ret;
(gdb) where
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6299895 in __GI_abort () at abort.c:79
#2  0x00007ffff7e0b558 in std::__replacement_assert(char const*, int, char const*, char const*)
    (__file=__file@entry=0x7ffff7ed2048 "/usr/include/c++/10/bits/stl_vector.h", __line=__line@entry=1142, __function=__function@entry=0x7ffff7ed2408 "std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::back() [with _Tp = TagParser::PpsInfo; _Alloc = std::allocator<TagParser::PpsInfo>; std::vector<_Tp, _Alloc>::reference = TagParser::PpsIn"..., __condition=__condition@entry=0x7ffff7ed1f18 "__builtin_expect(!this->empty(), true)") at /usr/include/c++/10/x86_64-redhat-linux/bits/c++config.h:2552
#3  0x00007ffff7e0b4fc in std::vector<TagParser::PpsInfo, std::allocator<TagParser::PpsInfo> >::back() (this=0x7fff48006ef0) at /usr/include/c++/10/bits/stl_vector.h:1140
#4  std::vector<TagParser::PpsInfo, std::allocator<TagParser::PpsInfo> >::back() (this=0x7fff48006ef0) at /usr/include/c++/10/bits/stl_vector.h:1140
#5  TagParser::AvcConfiguration::parse(CppUtilities::BinaryReader&, unsigned long, TagParser::Diagnostics&) (this=this@entry=0x7fff48006ed0, reader=..., maxSize=73, diag=...)
    at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/avc/avcconfiguration.cpp:83
#6  0x00007ffff7e72eb7 in TagParser::MatroskaTrack::internalParseHeader(TagParser::Diagnostics&) (this=0x7fff48006740, diag=...)
    at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/matroska/./../genericfileelement.h:315
#7  0x00007ffff7e08e8f in TagParser::AbstractTrack::parseHeader(TagParser::Diagnostics&) (this=0x7fff48006740, diag=...) at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/abstracttrack.cpp:251
#8  0x00007ffff7e52ec5 in TagParser::MatroskaContainer::internalParseTracks(TagParser::Diagnostics&) (this=0x7fff48005380, diag=...) at /usr/include/c++/10/bits/unique_ptr.h:417
#9  0x00007ffff7e08830 in TagParser::AbstractContainer::parseTracks(TagParser::Diagnostics&) (this=0x7fff48005380, diag=...)
    at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/abstractcontainer.cpp:110
#10 0x00007ffff7e7c030 in TagParser::MediaFileInfo::parseTracks(TagParser::Diagnostics&) (this=0x555555924e98, diag=...) at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/mediafileinfo.cpp:306
#11 0x00007ffff7e7c7a1 in TagParser::MediaFileInfo::parseEverything(TagParser::Diagnostics&) (this=0x555555924e98, diag=...)
    at /usr/src/debug/tagparser-9.3.0-3.2.x86_64/mediafileinfo.cpp:516
#12 0x0000555555621272 in operator() (__closure=<optimized out>) at /usr/src/debug/tageditor-3.3.9-6.2.x86_64/gui/tageditorwidget.cpp:853
#13 QtConcurrent::StoredFunctorCall0<void, QtGui::TagEditorWidget::startParsing(const QString&, bool)::<lambda()> >::runFunctor(void) (this=0x555555ff38f0)
    at /usr/include/qt5/QtConcurrent/qtconcurrentstoredfunctioncall.h:70
#14 0x00005555556280c9 in non-virtual thunk to QtConcurrent::RunFunctionTask<void>::run() () at /usr/include/c++/10/bits/exception.h:63
#15 0x00007ffff6712d5a in QThreadPoolThread::run() (this=0x5555560dfc60) at thread/qthreadpool.cpp:99
#16 0x00007ffff670f690 in QThreadPrivate::start(void*) (arg=0x5555560dfc60) at thread/qthread_unix.cpp:342
#17 0x00007fffee954432 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00007ffff6375913 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

ffprobe of the file in question:

$ ffprobe William\ Control\ feat.\ Matt\ Skiba\ -\ Deathclub\ \(Wes\ Borland_Renholder\ Remix\).mkv 
ffprobe version 4.2.4 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 10 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, matroska,webm, from 'William Control feat. Matt Skiba - Deathclub (Wes Borland_Renholder Remix).mkv':
  Metadata:
    title           : Deathclub (Wes Borland/Renholder Remix)
    encoder         : libmakemkv v1.15.3 (1.3.10/1.5.2) x86_64-redhat-linux
    creation_time   : 2020-11-30T18:15:02.000000Z
  Duration: 00:03:51.27, start: 0.000000, bitrate: 27042 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 26847734
      DURATION-eng    : 00:03:51.272708333
      NUMBER_OF_FRAMES-eng: 5545
      NUMBER_OF_BYTES-eng: 776141170
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.3 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-11-30 18:15:02
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 00:03:51.296000000
      NUMBER_OF_FRAMES-eng: 7228
      NUMBER_OF_BYTES-eng: 5551104
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.15.3 linux(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-11-30 18:15:02
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID

Happy to add any additional details you might need.

@Martchus
Copy link
Owner

I suppose I spotted the mistake in the code and can create a fix tomorrow. Looks like this would also happen when just printing the track info of the file. It would still be interesting to have a short sample of the file because apparently my code fails to parse its AVC configuration.

Martchus added a commit to Martchus/tagparser that referenced this issue Dec 1, 2020
@Martchus
Copy link
Owner

Martchus commented Dec 1, 2020

It should work with Martchus/tagparser@bcf00b0. I also found an affected file in my library so you can save providing an example. Depending on how well my OBS builds currently work you might find a development build with that patch on https://build.opensuse.org/project/show/home:mkittler:vcs.

@logic
Copy link
Author

logic commented Dec 1, 2020

With the latest dev build of libtagparser9, it looks like the problem is fixed on the problem files I had, thanks!

@logic logic closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants