Avidemux Forum

Avidemux => Windows => Topic started by: Scratch on June 08, 2018, 08:46:13 PM

Title: Application crash on next keyframe search
Post by: Scratch on June 08, 2018, 08:46:13 PM
Hello

Win7 x64. Avidemux v2.7.1. Application crashes on next keyframe search (just open file and hold "up arrow" button, wait until 6th second):

2-002.mkv   13.9 MB
https://mega.nz/#!khMRUaaR!UJihmSr0DlABGgpM8SX6dl3MBQE0jdRaQvpGtMXlRR4


ADM_setCrashHook  [libADM_core6.dll]
ADM_setCrashHook  [libADM_core6.dll]
ADM_backTrack  [libADM_core6.dll]
ADM_Composer::DecodePictureUpToIntra(unsigned int, unsigned int)  [avidemux.exe]
ADM_Composer::goToIntraTimeVideo(unsigned long long)  [avidemux.exe]
admPreview::nextKeyFrame()  [avidemux.exe]
GUI_NextKeyFrame()  [avidemux.exe]
HandleAction_Navigate(Action)  [avidemux.exe]
HandleAction(Action)  [avidemux.exe]
MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
MainWindow::actionSignal(Action)  [avidemux.exe]
MainWindow::searchGoMenu(QAction*)  [avidemux.exe]
MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QMenu::showTearOffMenu()  [Qt5Widgets.dll]
QMenu::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [Qt5Widgets.dll]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QAction::activate(QAction::ActionEvent)  [Qt5Widgets.dll]
QAction::event(QEvent*)  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal2(QObject*, QEvent*)  [Qt5Core.dll]
QShortcutMap::dispatchEvent(QKeyEvent*)  [Qt5Gui.dll]
QShortcutMap::tryShortcut(QKeyEvent*)  [Qt5Gui.dll]
QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short)  [Qt5Gui.dll]
QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*)  [Qt5Gui.dll]
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)  [Qt5Gui.dll]
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Gui.dll]
QEventDispatcherWin32Private::sendTimerEvent(int)  [Qt5Core.dll]
TranslateMessageEx  [USER32.dll]
TranslateMessage  [USER32.dll]
QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
qt_plugin_instance  [qwindows.dll]
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
QCoreApplication::exec()  [Qt5Core.dll]
UI_RunApp()  [avidemux.exe]
startAvidemux(int, char**)  [avidemux.exe]
SDL_main  [avidemux.exe]
ms2timedisplay(unsigned int)  [avidemux.exe]
unknown function  [avidemux.exe]
unknown function  [avidemux.exe]
BaseThreadInitThunk  [kernel32.dll]
RtlUserThreadStart  [ntdll.dll]


Yes I know there is a broken frame, but maybe it is not a reason to crash...

BR, Egor
Title: Re: Application crash on next keyframe search
Post by: eumagga0x2a on June 08, 2018, 09:59:28 PM
Well, the assert that the timing matches frame flags fails. Nothing new or specific to this release, but I agree that we could catch "mission impossible" earlier so that we don't need to shut down the application.

By the way, you can repair the video by saving it in copy mode to AVI (ignore the warning), then loading the AVI in Avidemux, letting it restore timing by decoding the full video, then saving it in copy mode as a MKV (or MP4) again.
Title: Re: Application crash on next keyframe search
Post by: Scratch on June 09, 2018, 11:21:11 AM
Thank you for answer. Hope you will fix it anyway, because the main problem is that edits not restore after crash (very unpleasant when you do 10-20 edits and then you lost them all).

And thanks for your trick with save/load AVI and restore timing - it's working, but unfortunately only if there is one broken frame, if there are many (~10-12 for 1-2 hours video) - result mkv is terrible out of sync :((

BR, Egor
Title: Re: Application crash on next keyframe search
Post by: eumagga0x2a on June 09, 2018, 12:16:41 PM
Quote from: Scratch on June 09, 2018, 11:21:11 AMthe main problem is that edits not restore after crash

This should not be the case. The latest state of editing (not the steps which resulted in this state, however) will (okay, should) be restored if you confirm loading the crash file after you start Avidemux again. If you don't get this dialog upon Avidemux restart following failed assert, something is seriously wrong either with Avidemux user data on your system or with Avidemux itself.
Title: Re: Application crash on next keyframe search
Post by: Scratch on June 09, 2018, 12:43:31 PM
Hmm. It's working with 2.7.1 (I had a problem with 2.6). Sorry. My bad.

BR, Egor
Title: Re: Application crash on next keyframe search
Post by: eumagga0x2a on June 09, 2018, 02:23:36 PM
I've removed the assert: [editor/DecodePictureUpToIntra] Refuse to decode instead of crashing if the target frame is not flagged as intra (https://github.com/mean00/avidemux2/commit/a64b79fe77848599d68ece94b52448c650aa44a6). You still will be unable to navigate with up/down keys past a frame with timing and flags mismatch.