Crash encoding with the Mpeg2 (ff) encoder

Started by eumagga0x2a, September 13, 2016, 04:48:06 PM

Previous topic - Next topic

eumagga0x2a

STR:


  • Load e.g. the YT video mentioned in http://avidemux.org/smif/index.php/topic,16554.msg76972.html#msg76972.
  • Select Mpeg2 (ff) as video codec, add a video filter to resize the video to 720x576 (set the aspect ratio in the codec to "Wide (16:9)" if you wish), select a suitable audio codec != copy and chose a container (tested with Mpeg-PS (ff), Mpeg-TS (ff) and Mkv muxers so far).
  • Start re-encoding the video.

Actual Results:
While saving the video, at the very end Avidemux crashes with

*********** BACKTRACK **************
/usr/local/lib64/libADM_core6.so(ADM_backTrack+0x4d) [0x7f215bde84bd]:0:<ADM_backTrack>:-2
/usr/local/lib64/libADM_coreVideoEncoder6.so(_ZN20ADM_coreVideoEncoder22getRealPtsFromInternalEmPmS0_+0xc4) [0x7f215a4a4fd4]:1:<ADM_coreVideoEncoder::getRealPtsFromInternal(unsigned long, unsigned long*, unsigned long*)>:0
/usr/local/lib64/libADM_coreVideoEncoder6.so(_ZN26ADM_coreVideoEncoderFFmpeg10postEncodeEP12ADMBitstreamj+0x154) [0x7f215a4a8c94]:2:<ADM_coreVideoEncoderFFmpeg::postEncode(ADMBitstream*, unsigned int)>:0
/usr/local/lib64/ADM_plugins6/videoEncoders/libADM_ve_ffMpeg2.so(_ZN18ADM_ffMpeg2Encoder6encodeEP12ADMBitstream+0xe8) [0x7f21285ed588]:3:<ADM_ffMpeg2Encoder::encode(ADMBitstream*)>:0
/usr/local/bin/avidemux3_qt5(_ZN22ADM_videoStreamProcess9getPacketEP12ADMBitstream+0x12) [0x459232]:4:<ADM_videoStreamProcess::getPacket(ADMBitstream*)>:0
/usr/local/lib64/libADM_coreMuxer6.so(_ZN11muxerFFmpeg8saveLoopEPKc+0x1ab) [0x7f215ad86e0b]:5:<muxerFFmpeg::saveLoop(char const*)>:0
/usr/local/bin/avidemux3_qt5(_ZN8admSaver4saveEv+0x13b) [0x456c7b]:6:<admSaver::save()>:0
/usr/local/bin/avidemux3_qt5(_Z6A_SavePKc+0x29) [0x457179]:7:<A_Save(char const*)>:0
/usr/local/bin/avidemux3_qt5(_Z13A_SaveWrapperPKc+0x14) [0x454454]:8:<A_SaveWrapper(char const*)>:0
/usr/local/bin/avidemux3_qt5(_ZN15ADM_QT4_fileSel25GUI_FileSelWriteExtensionEPKcS1_PFvS1_E+0x1e) [0x4a0a6e]:9:<ADM_QT4_fileSel::GUI_FileSelWriteExtension(char const*, char const*, void (*)(char const*))>:0
/usr/local/bin/avidemux3_qt5(_Z17HandleAction_Save6Action+0x284) [0x455d74]:10:<HandleAction_Save(Action)>:0
/usr/local/bin/avidemux3_qt5(_Z12HandleAction6Action+0xa8f) [0x45294f]:11:<HandleAction(Action)>:0
/usr/local/bin/avidemux3_qt5() [0x4a1383]:12:</usr/local/bin/avidemux3_qt5() [0x4a1383]>:0
/lib64/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x592) [0x7f21579ceb92]:13:<QMetaObject::activate(QObject*, int, int, void**)>:0
/usr/local/bin/avidemux3_qt5(_ZN10MainWindow12actionSignalE6Action+0x2e) [0x4a0f4e]:14:<MainWindow::actionSignal(Action)>:0
/usr/local/bin/avidemux3_qt5(_ZN10MainWindow13searchToolBarEP7QAction+0xbb) [0x4891bb]:15:<MainWindow::searchToolBar(QAction*)>:0
/usr/local/bin/avidemux3_qt5() [0x4a11dc]:16:</usr/local/bin/avidemux3_qt5() [0x4a11dc]>:0
/lib64/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x592) [0x7f21579ceb92]:17:<QMetaObject::activate(QObject*, int, int, void**)>:0
/lib64/libQt5Widgets.so.5(_ZN8QToolBar15actionTriggeredEP7QAction+0x3f) [0x7f2158aff1af]:18:<QToolBar::actionTriggered(QAction*)>:0
/lib64/libQt5Widgets.so.5(+0x32196c) [0x7f2158b0096c]:19:<>:-2
/lib64/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x592) [0x7f21579ceb92]:20:<QMetaObject::activate(QObject*, int, int, void**)>:0
/lib64/libQt5Widgets.so.5(_ZN11QToolButton9triggeredEP7QAction+0x3f) [0x7f2158b07c4f]:21:<QToolButton::triggered(QAction*)>:0
/lib64/libQt5Core.so.5(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x592) [0x7f21579ceb92]:22:<QMetaObject::activate(QObject*, int, int, void**)>:0
/lib64/libQt5Widgets.so.5(_ZN7QAction9triggeredEb+0x42) [0x7f2158932672]:23:<QAction::triggered(bool)>:0
/lib64/libQt5Widgets.so.5(_ZN7QAction8activateENS_11ActionEventE+0x122) [0x7f2158935292]:24:<QAction::activate(QAction::ActionEvent)>:0
/lib64/libQt5Widgets.so.5(+0x25d1ed) [0x7f2158a3c1ed]:25:<>:-2
/lib64/libQt5Widgets.so.5(_ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent+0xf4) [0x7f2158a3c434]:26:<QAbstractButton::mouseReleaseEvent(QMouseEvent*)>:0
/lib64/libQt5Widgets.so.5(_ZN11QToolButton17mouseReleaseEventEP11QMouseEvent+0xa) [0x7f2158b0a2da]:27:<QToolButton::mouseReleaseEvent(QMouseEvent*)>:0
/lib64/libQt5Widgets.so.5(_ZN7QWidget5eventEP6QEvent+0x310) [0x7f2158981940]:28:<QWidget::event(QEvent*)>:0
/lib64/libQt5Widgets.so.5(_ZN11QToolButton5eventEP6QEvent+0x82) [0x7f2158b0a3c2]:29:<QToolButton::event(QEvent*)>:0
*********** BACKTRACK **************
Crash Dump for Crash
Assert failed :0
at line 143, file /home/eumagga/avidemux/git/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoder.cppADM_backTrack
ADM_coreVideoEncoder::getRealPtsFromInternal(unsigned long, unsigned long*, unsigned long*)
ADM_coreVideoEncoderFFmpeg::postEncode(ADMBitstream*, unsigned int)
ADM_ffMpeg2Encoder::encode(ADMBitstream*)
ADM_videoStreamProcess::getPacket(ADMBitstream*)
muxerFFmpeg::saveLoop(char const*)
admSaver::save()
A_Save(char const*)
A_SaveWrapper(char const*)
ADM_QT4_fileSel::GUI_FileSelWriteExtension(char const*, char const*, void (*)(char const*))
HandleAction_Save(Action)
HandleAction(Action)
/usr/local/bin/avidemux3_qt5() [0x4a1383]
QMetaObject::activate(QObject*, int, int, void**)
MainWindow::actionSignal(Action)
MainWindow::searchToolBar(QAction*)
/usr/local/bin/avidemux3_qt5() [0x4a11dc]
QMetaObject::activate(QObject*, int, int, void**)
QToolBar::actionTriggered(QAction*)

QMetaObject::activate(QObject*, int, int, void**)
QToolButton::triggered(QAction*)
QMetaObject::activate(QObject*, int, int, void**)
QAction::triggered(bool)
QAction::activate(QAction::ActionEvent)

QAbstractButton::mouseReleaseEvent(QMouseEvent*)
QToolButton::mouseReleaseEvent(QMouseEvent*)
QWidget::event(QEvent*)
QToolButton::event(QEvent*)

[abortExitHandler]  Abnormal exit handler, trying to clean up
At exit, we have still 16 surface
After cleanup we have  0 surface
[cleanup]  Destroying vdp device..
Aborted (Speicherabzug geschrieben)


The issue is specific to the video encoder. Neither the audio codec nor the muxer seems to matter.

Avidemux built from https://github.com/mean00/avidemux2/commit/e678f57f95878c73240d2c7081cf81a667b86026 git revision.

mean


eumagga0x2a

Confirming the crash fixed for the Mpeg2 (ff) encoder by [coreMuxer] Dont crash if we cannot map the frames. It seems to happen at the very end when popping out delayed frames (didn't test other codecs which got the same treatment yet). Thanks a lot!