News:

--

Main Menu

v2.6.21 crash on script execution fail

Started by alexrayne, July 14, 2017, 08:49:27 PM

Previous topic - Next topic

alexrayne

works on win8.1
try to execute previously created script (see below). script cant load source video, and therefore crash avidemix on later operations.


executed script:
#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
adm.loadVideo("D:/video/ibiph/bogoslov_today/00005.MTS")           <-- here is reports that cant decode and load  00005.MTS
adm.clearSegments()
adm.addSegment(0, 0, 2359720000)                                              <-- looks like here is a crash
adm.addSegment(0, 2392240000, 2431040000)
adm.addSegment(0, 4891560000, 1322560000)
adm.addSegment(0, 6274960000, 420000)
adm.markerA = 0
adm.markerB = 6113740000
adm.videoCodec("ffNvEnc", "preset=2", "bitrate=2000", "max_bitrate=8000")
adm.addVideoFilter("telecide", "order=1", "back=1", "back_saved=0", "guide=2", "gthresh=10.000000", "post=2", "chroma=False", "vthresh=50.000000", "vthresh_saved=50.000000", "bthresh=50.000000", "dthresh=7.000000", "blend=False", "nt=10"
, "y0=0", "y1=0", "hints=1", "show=False", "debug=False")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"unknown")
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MP4V2", "optimize=0", "add_itunes_metadata=0")


crash report:
ADM_setCrashHook  [libADM_core6.dll]
ADM_setCrashHook  [libADM_core6.dll]
ADM_backTrack  [libADM_core6.dll]
ADM_Composer::addSegment(unsigned int, unsigned long long, unsigned long long)  [avidemux.exe]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
unknown function  [libADM_script_tinyPy.dll]
A_appendVideo(char const*)  [avidemux.exe]
A_audioTrack()  [avidemux.exe]
ADM_QT4_fileSel::GUI_FileSelRead(char const*, void (*)(char const*))  [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::searchFileMenu(QAction*)  [avidemux.exe]
MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QMenu::setIcon(QIcon const&)  [Qt5Widgets.dll]
QMenu::internalDelayedPopup()  [Qt5Widgets.dll]
QMenu::mouseReleaseEvent(QMouseEvent*)  [Qt5Widgets.dll]
QWidget::event(QEvent*)  [Qt5Widgets.dll]
QMenu::event(QEvent*)  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)  [Qt5Gui.dll]
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)  [Qt5Gui.dll]
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Gui.dll]
QEventDispatcherWin32Private::sendTimerEvent(int)  [Qt5Core.dll]
DispatchMessageW  [USER32.dll]
IsThreadDesktopComposited  [USER32.dll]
QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
unknown function  [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]
console_main  [avidemux.exe]
WinMain  [avidemux.exe]
unknown function  [avidemux.exe]
unknown function  [avidemux.exe]
BaseThreadInitThunk  [KERNEL32.DLL]
RtlUserThreadStart  [ntdll.dll]

eumagga0x2a

It works as coded. Avidemux will crash if it can't add at least one segment. So the only question is, why it can't load D:/video/ibiph/bogoslov_today/00005.MTS.

alexrayne

>>why it can't load D:/video/ibiph/bogoslov_today/00005.MTS
i found why:
in same folder with 00005.MTS i have saved an project in file 00005.MTS.idx2 (with contents see below). looks like this file uses for some index. therefore avidemux confuses on it and crash

00005.MTS.idx2 contents:
#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
adm.loadVideo("D:/video/ibiph/bogoslov_today/00005.MTS")
adm.clearSegments()
adm.addSegment(0, 0, 2359720000)
adm.addSegment(0, 2392240000, 2431040000)
adm.addSegment(0, 4891560000, 1322560000)
adm.addSegment(0, 6274960000, 420000)
adm.markerA = 0
adm.markerB = 6113740000
adm.videoCodec("ffNvEnc", "preset=2", "bitrate=2000", "max_bitrate=8000")
adm.addVideoFilter("telecide", "order=1", "back=1", "back_saved=0", "guide=2", "gthresh=10.000000", "post=2", "chroma=False", "vthresh=50.000000", "vthresh_saved=50.000000", "bthresh=50.000000", "dthresh=7.000000", "blend=False", "nt=10"
, "y0=0", "y1=0", "hints=1", "show=False", "debug=False")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"unknown")
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MP4V2", "optimize=0", "add_itunes_metadata=0")

alexrayne

>>Avidemux will crash if it can't add at least one segment.
imho, normal windows way - abort execution, insteard of application crash.

eumagga0x2a

*.idx2 are Avidemux index files and are blindly trusted. No wonder an attempt to parse python script as s TS index didn't end well.

Quote from: alexrayne on July 14, 2017, 09:27:25 PM
imho, normal windows way - abort execution, insteard of application crash.

It is not just Windows' way  ;-)

alexrayne

>>*.idx2 are Avidemux index files and are blindly trusted. No wonder an attempt to parse python script as s TS index didn't end well.
if index file cant be read, or can`t be normaly parsed - the it is corrupted. and should be rebuild, isn`t it?
but, i`m afraid, this index is used by avisinth. and it not avidemux crush, but avisinth rised one error.
this situation is evaluatable, and it can be some actions provided by avidemux - delete an index, or infom user of possible problem reason.

eumagga0x2a

I wholeheartedly agree that the potential to improve user friendliness of Avidemux is still vast. All the points you have mentioned are known and hopefully will be addressed in the future, the option to discard idx2 with some priority. High quality contributions warmly welcome.