News:

--

Main Menu

2.6.11beta problems

Started by pchristy, December 30, 2015, 11:43:07 AM

Previous topic - Next topic

pchristy

I can't get the new beta to do anything useful, as it crashes on everything I've tried. My previous build (from git 29/11/2015) worked fine.

System: Slackware64-current.   gcc: 5.3.0

Example: Load any video (default 1920x1080 from my camera), try and transcode to H264 or H265  and/or resize to 720x576 using either swresize or OpenGL. As soon as I try and preview, avidemux closes instantly - sometimes leaving a crash file, sometimes not! Attempting to save the video without previewing produces exactly the same result - an instant crash.

Running avidemux from the command line to try and see what is going on produces the following:

[MP4] Go to time succeeded chunk :0 time ask:0 time get:0
[FF] Muxer opened
[FF] Using 85 bytes for video extradata
[initVideo]  Video has extradata and muxer requires globalHeader, assuming it is done so.
[FF] Video initialized
[MP3] TimeBase for video 1000/50000
[FF] Bitrate 256
[initAudio]  Audio has no extradata but muxer requires globalHeader.
  [initAudio]  Language for track 0 is unknown
[FF] Audio initialized
[adm_lavLogCallback]  [lavc] Codec for stream 1 does not use global headers but container format requires global headers                                                                                             
  [open]  Timebase codec = 1/1000                                                                         
[FF] Saving
[saveLoop]  avg fps=50000
  [initUI]  Muxer, creating UI, video duration is 00:02:25,440                                             
  [startThread]  Starting thread...                                                                       
  [startThread]  Thread created and started                                                               
Saving crash file to /home/pchristy/.avidemux6/crash.py
Scripting video streams
Scripting segments
Scripting markers
Scripting post-processing
Scripting video encoder
Scripting video filters
Scripting audio tracks
Scripting muxer

*********** BACKTRACK **************
/usr/lib64/libADM_core6.so(ADM_backTrack+0x4d) [0x7fdcab0c7c3d]:0:<ADM_backTrack>:-2
/lib64/libc.so.6(+0x35aa0) [0x7fdca5fc7aa0]:1:<>:-2
/usr/lib64/libADM_coreImage6.so(_ZN8ADMImage15convertFromNV12EPhS0_ii+0x1e5) [0x7fdcaa27a495]:2:<ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int)>:0
/usr/lib64/libADM_coreLibVA6.so(_ZN8admLibVA17surfaceToAdmImageEP8ADMImageP13ADM_vaSurface+0x32a) [0x7fdcac31607a]:3:<admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*)>:0
/usr/lib64/libADM_coreImage6.so(_ZN8ADMImage17hwDownloadFromRefEv+0x29) [0x7fdcaa2775e9]:4:<ADMImage::hwDownloadFromRef()>:0
avidemux3_qt4(_ZN20ADM_videoFilterQueue14getNextFrameAsE12ADM_HW_IMAGEPjP8ADMImage+0xad) [0x47105d]:5:<ADM_videoFilterQueue::getNextFrameAs(ADM_HW_IMAGE, unsigned int*, ADMImage*)>:0
/usr/lib64/ADM_plugins6/videoEncoders//qt4/libADM_ve_x265_QT4.so(_ZN11x265Encoder6encodeEP12ADMBitstream+0xcb) [0x7fdc85ba122b]:6:<x265Encoder::encode(ADMBitstream*)>:0
avidemux3_qt4(_ZN22ADM_videoStreamProcess9getPacketEP12ADMBitstream+0x12) [0x4447f2]:7:<ADM_videoStreamProcess::getPacket(ADMBitstream*)>:0
/usr/lib64/libADM_coreMuxer6.so(_ZN11muxerFFmpeg8saveLoopEPKc+0x1ac) [0x7fdcaa071d9c]:8:<muxerFFmpeg::saveLoop(char const*)>:0
avidemux3_qt4(_ZN8admSaver4saveEv+0x15b) [0x4424ab]:9:<admSaver::save()>:0
avidemux3_qt4(_Z6A_SavePKc+0x29) [0x442929]:10:<A_Save(char const*)>:0
avidemux3_qt4(_Z13A_SaveWrapperPKc+0xe) [0x44007e]:11:<A_SaveWrapper(char const*)>:0
avidemux3_qt4(_ZN15ADM_QT4_fileSel25GUI_FileSelWriteExtensionEPKcS1_PFvS1_E+0x1e) [0x48ac5e]:12:<ADM_QT4_fileSel::GUI_FileSelWriteExtension(char const*, char const*, void (*)(char const*))>:0
avidemux3_qt4(_Z17HandleAction_Save6Action+0x1ee) [0x44157e]:13:<HandleAction_Save(Action)>:0
avidemux3_qt4(_Z12HandleAction6Action+0x95b) [0x43dd7b]:14:<HandleAction(Action)>:0
avidemux3_qt4() [0x48b694]:15:<avidemux3_qt4() [0x48b694]>:0
/usr/lib64/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x4b0) [0x7fdca8311ec0]:16:<QMetaObject::activate(QObject*, QMetaObject const*, int, void**)>:0
avidemux3_qt4(_ZN10MainWindow12actionSignalE6Action+0x2c) [0x48b6fc]:17:<MainWindow::actionSignal(Action)>:0
avidemux3_qt4(_ZN10MainWindow13searchToolBarEP7QAction+0x8b) [0x4740ab]:18:<MainWindow::searchToolBar(QAction*)>:0
avidemux3_qt4() [0x48b538]:19:<avidemux3_qt4() [0x48b538]>:0
*********** BACKTRACK **************
[refresh]  [libva]Rrefresh
  [paintGL]  Painting dummy openGl widget                                                                 
  [refresh]  [libva]Rrefresh                                                                               
  [paintGL]  Painting dummy openGl widget                                                                 
11:27:03 Call terminate!!!
Cleaning up
[deleteAll]  [Editor] Deleting all videos
  [~decoderFFLIBVA]  Some surfaces are not reclaimed! (15/23)
  [~ADM_edAudioTrackFromVideo]  Destroying edAudio from video track 0 at 2e68e70
  [deleteAll]  [Editor] Deleting all videos
  [cleanup]  Deleting post proc
  [deleteAll]  [Editor] Deleting all videos
[Script] QtScript INFO - Closing QtScript
[Script] Tinypy INFO - Closing Python
[Script] SpiderMonkey INFO - Closing Spidermonkey
[destroy]  Destroying preview
  [ADM_ad_cleanup]  Purging audio decoder
  [ADM_vf_clearFilters]  clear filters
  [ADM_vf_cleanup]  Destroying video filter list
--End of cleanup--

Images stat:
___________
Max memory consumed (MB)     : 0
Current memory consumed (MB) : 0
Max image used               : 0
Cur image used               : 9
[onexit] 
Goodbye...

Threading error :16 Device or resource busy
Fatal Error: Accessed global static 'KGlobalPrivate *globalData()' after destruction. Defined at /tmp/kde-build/kdelibs/kdelibs-4.14.14/kdecore/kernel/kglobal.cpp:128
Aborted


(trimmed to what looks relevant!)

It may be that Slackware64-current is using some cutting edge software (gcc?) which the beta doesn't like? For another program I use regularly, I've had to pass "-std=gnu89" to the compiler, but that one actually fails to compile. Avidemux does compile, although I see lots of (non-fatal?) developer warnings going through.

Any ideas?

Cheers,
--
Pete

mean

It seems to crash in the libVA hardware decoding
What video card are you using ? intel ?

pchristy

Hi Mean, thanks for the quick response!

Yes, its the Intel integrated graphics that comes with a Gigabyte Z97X-SLI motherboard:

lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 1.6.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice



Hope this helps!

Nearly all my work is with video, so I don't need the kind of 3D graphics acceleration required for games, and the Intel chipset is generally excellent for video work.

--
Pete

mean

If you disable libVa for decoding, does it work fine ?
(BTW if you use libVa for decoding, you should use libVa for display also, it's much faster as there is no need to transfer data back and forth between CPU & GPU)


pchristy

Yes, disabling LIBVA decoding fixes it, although speed suffers. Using LIBVA for the display doesn't cause a crash, just decoding. When I re-enable hardware decoding, the crash window reports:
Segfault
at line 0, file ??ADM_backTrack

ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int)
admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*)
ADMImage::hwDownloadFromRef()
ADM_videoFilterQueue::getNextFrameAs(ADM_HW_IMAGE, unsigned int*, ADMImage*)
x265Encoder::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/bin/avidemux3_qt4() [0x48b694]
QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
MainWindow::actionSignal(Action)
MainWindow::searchToolBar(QAction*)
/usr/bin/avidemux3_qt4() [0x48b538]


Cheers,
--
Pete

mean

could you do a gdb backtrack with debug enabled so that i have where it crashes exactly ?
Thanks

pchristy

Yes, quite happy to do that, but how do I do it?

Cheers,
--
Pete

mean

If you used bootstrap, add --debug i.e. bash bootStrap.sh --debug --rpm

gdb avidemux3_qt[45]
r
wait for it to crash
bt


pchristy

Thanks! Currently rebuilding! I guessed I needed to rebuild with --debug, but wasn't sure what I needed thereafter! (This isn't something I do every day!)

Will report back soon.

Cheers,

--
Pete

pchristy

You're gonna love this! I rebuilt the package with the --debug option added to bootStrap.bash - and the program ran perfectly (thought gdb) without crashing!!!

Er, what do I do for an encore?

I'm going to rebuild it again, though the last build clearly showed "debug build" at all the status confirmations, but this time I'll completely remove the original package before installing the debug version. The last time I simply "upgraded" it.

Any other suggestions?

--
Pete
--
Pete

mean

Please redo the same with non debug build, to confirm the culprit is switching between debug & release


pchristy

OK, running the original build through gdb produced a crash:

Program received signal SIGSEGV, Segmentation fault.                                                       
0x00007ffff592d495 in ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int) ()               
   from /usr/lib64/libADM_coreImage6.so                                                                   
(gdb) bt                                                                                                   
#0  0x00007ffff592d495 in ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int) ()           
    at /usr/lib64/libADM_coreImage6.so                                                                     
#1  0x00007ffff79c907a in admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*) ()                       
    at /usr/lib64/libADM_coreLibVA6.so                                                                     
#2  0x00007ffff592a5e9 in ADMImage::hwDownloadFromRef() () at /usr/lib64/libADM_coreImage6.so             
#3  0x000000000047105d in ADM_videoFilterQueue::getNextFrameAs(ADM_HW_IMAGE, unsigned int*, ADMImage*) () 
#4  0x00007fffd125422b in x265Encoder::encode(ADMBitstream*) ()                                           
    at /usr/lib64/ADM_plugins6/videoEncoders//qt4/libADM_ve_x265_QT4.so                                   
#5  0x00000000004447f2 in ADM_videoStreamProcess::getPacket(ADMBitstream*) ()                             
#6  0x00007ffff5724d9c in muxerFFmpeg::saveLoop(char const*) () at /usr/lib64/libADM_coreMuxer6.so         
#7  0x00000000004424ab in admSaver::save() ()                                                             
#8  0x0000000000442929 in A_Save(char const*) ()                                                           
#9  0x000000000044007e in A_SaveWrapper(char const*) ()                                                   
#10 0x000000000048ac5e in ADM_QT4_fileSel::GUI_FileSelWriteExtension(char const*, char const*, void (*)(char const*)) ()                                                                                             
#11 0x000000000044157e in HandleAction_Save(Action) ()                                                     
#12 0x000000000043dd7b in HandleAction(Action) ()                                                         
#13 0x000000000048b694 in  ()                                                                             
#14 0x00007ffff39c4ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#15 0x000000000048b6fc in MainWindow::actionSignal(Action) ()                                             
#16 0x00000000004740ab in MainWindow::searchToolBar(QAction*) ()                                           
#17 0x000000000048b538 in  ()                                                                             
#18 0x00007ffff39c4ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#19 0x00007ffff4386bcf in QToolBar::actionTriggered(QAction*) () at /usr/lib64/libQtGui.so.4               
#20 0x00007ffff4387904 in  () at /usr/lib64/libQtGui.so.4                                                 
#21 0x00007ffff39c4ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#22 0x00007ffff438eeff in QToolButton::triggered(QAction*) () at /usr/lib64/libQtGui.so.4                 
---Type <return> to continue, or q <return> to quit---                                                     
#23 0x00007ffff438f821 in  () at /usr/lib64/libQtGui.so.4                                                 
#24 0x00007ffff39c4ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#25 0x00007ffff3f149f2 in QAction::triggered(bool) () at /usr/lib64/libQtGui.so.4                         
#26 0x00007ffff3f15b97 in QAction::activate(QAction::ActionEvent) () at /usr/lib64/libQtGui.so.4           
#27 0x00007ffff42d4913 in  () at /usr/lib64/libQtGui.so.4                                                 
#28 0x00007ffff42d4a44 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#29 0x00007ffff438fd3a in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#30 0x00007ffff3f6d5a0 in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#31 0x00007ffff3f1a54c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /usr/lib64/libQtGui.so.4
#32 0x00007ffff3f21183 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#33 0x00007ffff39b1c8d in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
    at /usr/lib64/libQtCore.so.4
#34 0x00007ffff3f2081d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#35 0x00007ffff3f97bc9 in  () at /usr/lib64/libQtGui.so.4
#36 0x00007ffff3f95ec5 in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#37 0x00007ffff3fbd9c2 in  () at /usr/lib64/libQtGui.so.4
#38 0x00007ffff001e787 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#39 0x00007ffff001e9b8 in  () at /usr/lib64/libglib-2.0.so.0
#40 0x00007ffff001ea5c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#41 0x00007ffff39e015e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#42 0x00007ffff3fbda66 in  () at /usr/lib64/libQtGui.so.4
#43 0x00007ffff39b0651 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#44 0x00007ffff39b0965 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#45 0x00007ffff39b5f59 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#46 0x0000000000477a25 in UI_RunApp() ()
#47 0x0000000000442ed1 in startAvidemux(int, char**) ()
#48 0x00007ffff16656d0 in __libc_start_main () at /lib64/libc.so.6
#49 0x000000000043a059 in _start ()
(gdb)


Just to confirm, I've re-installed the debug version, and that is running perfectly!

I'm glad its you trying to fix this one and not me!!!   ;)


--
Pete

mean

Could you try this
Edit avidemux_core/ADM_coreImage/src/ADM_imageUtils.cpp
and at line 908
replace
   #ifdef ADM_CPU_X86
by
   #if 0

Does it still crash and is the output correct ?

mean

Youll need to rebuild &install avidemux_core

mean

and what is the width of your video ?