Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: pchristy on December 30, 2015, 11:43:07 AM

Title: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 11:43:07 AM
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,
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 12:57:30 PM
It seems to crash in the libVA hardware decoding
What video card are you using ? intel ?
Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 01:42:57 PM
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.

Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 01:49:57 PM
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)

Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 02:11:50 PM
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,
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 02:16:58 PM
could you do a gdb backtrack with debug enabled so that i have where it crashes exactly ?
Thanks
Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 02:23:00 PM
Yes, quite happy to do that, but how do I do it?

Cheers,
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 02:32:00 PM
If you used bootstrap, add --debug i.e. bash bootStrap.sh --debug --rpm

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

Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 02:42:32 PM
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,

Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 03:00:44 PM
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
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 03:16:15 PM
Please redo the same with non debug build, to confirm the culprit is switching between debug & release

Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 03:31:02 PM
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!!!   ;)


Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 03:43:39 PM
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 ?
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 03:44:16 PM
Youll need to rebuild &install avidemux_core
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 03:45:52 PM
and what is the width of your video ?
Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 03:47:17 PM
Will do. Might take a little longer this time......

Video is 1920x1080.

BTW, the debug version also works fine when NOT running through gdb.
Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 04:16:14 PM
YES! That worked perfectly. I also tried re-sizing, and all the combinations that caused problems initially, and its all good.

I've renamed my local version as beta2, so that I could keep the different builds available, FYI.

I also built beta1 on my small and rather under-powered laptop. That uses ati chips throughout, but uses the open source drivers, and therefore vdpau rather than libva. That also worked perfectly, so it was clearly something Intel / libva related that was causing the problem.

Many thanks for a quick fix!

Cheers,
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 05:20:22 PM
It's not  a fix :)
Just confirming that gcc is optimizing too much the code
Temptative fix in 5 mn
Title: Re: 2.6.11beta problems
Post by: mean on December 30, 2015, 05:29:48 PM
Tempative fix commited
Should work, but not 100% sure
Title: Re: 2.6.11beta problems
Post by: pchristy on December 30, 2015, 06:24:58 PM
No, that doesn't work! If you just do a simple transcode, it freezes. If you try a re-size, it crashes and vanishes as soon as you try a preview.

So its crashing slightly differently (the original didn't freeze), but it still doesn't work.

I'm going to have to leave it for today, now. Hopefully I'll get chance for another look tomorrow.

Cheers,
Title: Re: 2.6.11beta problems
Post by: pchristy on December 31, 2015, 12:14:36 PM
Just tried running that last build through gdb, and again, it works perfectly - no crashes or freezes regardless of transcode or resize. It only mis-behaves if I run it directly!

--
Pete
Title: Re: 2.6.11beta problems
Post by: pchristy on December 31, 2015, 12:32:20 PM
Ignore that last post! I was having a brain-fade (it happens at my age!   :o ). I must have re-installed beta2 before I went to bed last night! I've just reinstalled the git build from last night and it crashes through gdb. This is the (release version) backtrace resulting from a transcode to x265 with a resize from 1920x1080 to 720x576. This happened as soon as I tried to preview the filter:
(gdb) bt                                                                                                   
#0  0x00007ffff592d495 in ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int) ()           
    at /usr/lib64/libADM_coreImage6.so                                                                     
#1  0x00007ffff79c909a in admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*) ()                       
    at /usr/lib64/libADM_coreLibVA6.so                                                                     
#2  0x00007ffff592a609 in ADMImage::hwDownloadFromRef() () at /usr/lib64/libADM_coreImage6.so             
#3  0x00007fffca4c163e in swScaleResizeFilter::getNextFrame(unsigned int*, ADMImage*) ()                   
    at /usr/lib64/ADM_plugins6/videoFilters//qt4/libADM_vf_swscaleResizeQT4.so                             
#4  0x00007ffff4c4336c in ADM_flyDialog::nextImage() () at /usr/lib64/libADM_coreVideoFilter6.so           
#5  0x00007ffff4c43705 in ADM_flyDialog::sliderChanged() () at /usr/lib64/libADM_coreVideoFilter6.so       
#6  0x0000000000490a34 in Ui_seekablePreviewWindow::Ui_seekablePreviewWindow(QWidget*, ADM_coreVideoFilter*, unsigned int) ()                                                                                         
#7  0x000000000048c4ed in filtermainWindow::preview(bool) ()                                               
#8  0x00007ffff39c3ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#9  0x00007ffff457a3f2 in QAbstractButton::clicked(bool) () at /usr/lib64/libQtGui.so.4                   
#10 0x00007ffff42d2763 in  () at /usr/lib64/libQtGui.so.4                                                 
#11 0x00007ffff42d3954 in  () at /usr/lib64/libQtGui.so.4                                                 
#12 0x00007ffff42d3a44 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4 
#13 0x00007ffff3f6c5a0 in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4                           
#14 0x00007ffff3f1954c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()                         
    at /usr/lib64/libQtGui.so.4                                                                           
#15 0x00007ffff3f20183 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4           
#16 0x00007ffff39b0c8d in QCoreApplication::notifyInternal(QObject*, QEvent*) ()                           
    at /usr/lib64/libQtCore.so.4                                                                           
#17 0x00007ffff3f1f81d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4                                         
#18 0x00007ffff3f96bc9 in  () at /usr/lib64/libQtGui.so.4                                                 
#19 0x00007ffff3f94ec5 in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4           
#20 0x00007ffff3fbc9c2 in  () at /usr/lib64/libQtGui.so.4                                                 
#21 0x00007ffff001d787 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0                       
---Type <return> to continue, or q <return> to quit---                                                     
#22 0x00007ffff001d9b8 in  () at /usr/lib64/libglib-2.0.so.0                                               
#23 0x00007ffff001da5c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0                       
#24 0x00007ffff39df13e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()   
    at /usr/lib64/libQtCore.so.4                                                                           
#25 0x00007ffff3fbca66 in  () at /usr/lib64/libQtGui.so.4                                                 
#26 0x00007ffff39af651 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#27 0x00007ffff39af965 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()                       
    at /usr/lib64/libQtCore.so.4                                                                           
#28 0x00007ffff43ccf3c in QDialog::exec() () at /usr/lib64/libQtGui.so.4                                   
#29 0x000000000048e4d8 in GUI_handleVFilter() ()                                                           
#30 0x000000000043d9ae in HandleAction(Action) ()                                                         
#31 0x000000000048b6c4 in  ()                                                                             
#32 0x00007ffff39c3ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#33 0x000000000048b72c in MainWindow::actionSignal(Action) ()                                             
#34 0x0000000000474c23 in MainWindow::buttonPressed() ()                                                   
#35 0x000000000048b660 in  ()                                                                             
#36 0x00007ffff39c3ec0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) ()             
    at /usr/lib64/libQtCore.so.4                                                                           
#37 0x00007ffff457a3f2 in QAbstractButton::clicked(bool) () at /usr/lib64/libQtGui.so.4                   
#38 0x00007ffff42d2763 in  () at /usr/lib64/libQtGui.so.4
#39 0x00007ffff42d3954 in  () at /usr/lib64/libQtGui.so.4
#40 0x00007ffff42d3a44 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#41 0x00007ffff3f6c5a0 in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#42 0x00007ffff3f1954c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
    at /usr/lib64/libQtGui.so.4
#43 0x00007ffff3f20183 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#44 0x00007ffff39b0c8d in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
    at /usr/lib64/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#45 0x00007ffff3f1f81d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#46 0x00007ffff3f96bc9 in  () at /usr/lib64/libQtGui.so.4
#47 0x00007ffff3f94ec5 in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#48 0x00007ffff3fbc9c2 in  () at /usr/lib64/libQtGui.so.4
#49 0x00007ffff001d787 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#50 0x00007ffff001d9b8 in  () at /usr/lib64/libglib-2.0.so.0
#51 0x00007ffff001da5c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#52 0x00007ffff39df13e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#53 0x00007ffff3fbca66 in  () at /usr/lib64/libQtGui.so.4
#54 0x00007ffff39af651 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#55 0x00007ffff39af965 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQtCore.so.4
#56 0x00007ffff39b4f59 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#57 0x0000000000477a55 in UI_RunApp() ()
#58 0x0000000000442ef1 in startAvidemux(int, char**) ()
#59 0x00007ffff16646d0 in __libc_start_main () at /lib64/libc.so.6
#60 0x000000000043a079 in _start ()


Let me know what else you might need, and I'll post it.

Cheers,

Title: Re: 2.6.11beta problems
Post by: Jan Gruuthuse on December 31, 2015, 12:37:15 PM
x265 --version
Quotex265 [info]: HEVC encoder version 1.5+1-32d72a0285e0
x265 [info]: build info [Linux][GCC 4.8.2][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
Title: Re: 2.6.11beta problems
Post by: mean on December 31, 2015, 01:12:06 PM
I think i've found the problem, even if i can't reproduce it
I'll commit the fix later today
Title: Re: 2.6.11beta problems
Post by: pchristy on December 31, 2015, 02:09:22 PM
Jan: Its not exclusive to x265 - it happens whatever I'm trying to do. I think Mean is right, its something to do with libva and hardware decoding. If I disable libva for decoding, it all works.

Mean: Thanks for your efforts!

--
Pete
Title: Re: 2.6.11beta problems
Post by: mean on December 31, 2015, 04:06:34 PM
I think that the last commit should prevent gcc from optimizing too much
Title: Re: 2.6.11beta problems
Post by: pchristy on December 31, 2015, 05:33:09 PM
No, still not there.

Input 1920x1080 mp4 file, transcode to x265 and resize to 720x576. Preview in the filter window, and CRASH.

Segfault
at line 0, file ??ADM_backTrack

ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int)
admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*)
ADMImage::hwDownloadFromRef()
swScaleResizeFilter::getNextFrame(unsigned int*, ADMImage*)
ADM_flyDialog::nextImage()
ADM_flyDialog::sliderChanged()
Ui_seekablePreviewWindow::Ui_seekablePreviewWindow(QWidget*, ADM_coreVideoFilter*, unsigned int)
filtermainWindow::preview(bool)
QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
QAbstractButton::clicked(bool)


QAbstractButton::mouseReleaseEvent(QMouseEvent*)
QWidget::event(QEvent*)
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
QCoreApplication::notifyInternal(QObject*, QEvent*)
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool)


That's from the crash window. Do you want me to run it through gdb, or is that enough?

Cheers,

Title: Re: 2.6.11beta problems
Post by: mean on December 31, 2015, 07:39:57 PM
Do you know what gcc/g++ you are using ?
The changes i have made should be more than enough
Title: Re: 2.6.11beta problems
Post by: mean on January 01, 2016, 08:20:08 AM
ok, i was distracted when doing the change
Now it should work (tm)
Title: Re: 2.6.11beta problems
Post by: pchristy on January 01, 2016, 09:51:25 AM
Happy New Year, Mean! I hope you got out and celebrated a bit last night! I would feel very guilty if I thought you spent New Year's Eve slaving over a hot computer!

Sorry, though - its still crashing! Running it from a terminal window to try and get a trace produces this when I try and save the video:
*********** BACKTRACK **************
/usr/lib64/libADM_core6.so(ADM_backTrack+0x4d) [0x7fdfa0517c3d]:0:<ADM_backTrack>:-2
/lib64/libc.so.6(+0x35aa0) [0x7fdf9b416aa0]:1:<>:-2
/usr/lib64/libADM_coreImage6.so(_ZN8ADMImage15convertFromNV12EPhS0_ii+0x1f7) [0x7fdf9f6ca4f7]:2:<ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int)>:0
/usr/lib64/libADM_coreLibVA6.so(_ZN8admLibVA17surfaceToAdmImageEP8ADMImageP13ADM_vaSurface+0x32a) [0x7fdfa17660aa]:3:<admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*)>:0
/usr/lib64/libADM_coreImage6.so(_ZN8ADMImage17hwDownloadFromRefEv+0x29) [0x7fdf9f6c7619]:4:<ADMImage::hwDownloadFromRef()>:0
/usr/lib64/ADM_plugins6/videoFilters//qt4/libADM_vf_swscaleResizeQT4.so(_ZN19swScaleResizeFilter12getNextFrameEPjP8ADMImage+0x1e) [0x7fdf7425e63e]:5:<swScaleResizeFilter::getNextFrame(unsigned int*, ADMImage*)>:0
avidemux3_qt4(_ZN20ADM_videoFilterQueue9runActionEv+0xa2) [0x4712c2]:6:<ADM_videoFilterQueue::runAction()>:0
/usr/lib64/libADM_coreUtils6.so(_ZN15ADM_threadQueue3runEv+0x11) [0x7fdf9f010741]:7:<ADM_threadQueue::run()>:0
/usr/lib64/libADM_coreUtils6.so(+0x1c759) [0x7fdf9f010759]:8:<>:-2
/lib64/libpthread.so.0(+0x7704) [0x7fdf9d3a6704]:9:<>:-2
/lib64/libc.so.6(clone+0x6d) [0x7fdf9b4e8f8d]:10:<clone>:-2
*********** BACKTRACK **************
QObject::setParent: Cannot set parent, new parent is in a different thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPainter::begin: Paint device returned engine == 0, type: 2
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae05c0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae05c0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::LabelEngine(0x2aec170), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::LabelEngine(0x2aec170), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2ae5da0), parent's thread is QThread(0x29f4580), current thread is QThread(0x7fded4002cd0)


That was the result from simply trying to save a transcoded and re-sized video, without previewing it. There was no crash window - it just freezes. If I try and preview it from the filter window, I do get a crash window:

Segfault
at line 0, file ??ADM_backTrack

ADMImage::convertFromNV12(unsigned char*, unsigned char*, int, int)
admLibVA::surfaceToAdmImage(ADMImage*, ADM_vaSurface*)
ADMImage::hwDownloadFromRef()
swScaleResizeFilter::getNextFrame(unsigned int*, ADMImage*)
ADM_flyDialog::nextImage()
ADM_flyDialog::sliderChanged()
Ui_seekablePreviewWindow::Ui_seekablePreviewWindow(QWidget*, ADM_coreVideoFilter*, unsigned int)
filtermainWindow::preview(bool)
QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
QAbstractButton::clicked(bool)


QAbstractButton::mouseReleaseEvent(QMouseEvent*)
QWidget::event(QEvent*)
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
QCoreApplication::notifyInternal(QObject*, QEvent*)
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool)


I'm using gcc-5.3.0. I do have one other program - a very old one - that refuses to compile at all under 5.3 unless I pass it the "-std=gnu89". I do this like so:
CC="gcc -std=gnu89 -O2 -fPIC" ./configure
where "-O2 -fPIC" are the standard flags for an x86_64 build. But that is for a standard "configure / make / make-install"  build. I can't see anywhere in your bootStrap.bash script where similar parameters are set, or I would try it with gcc "throttled back", as with that other program. (Its a 2.4 GHz spectrum analyzer, by the way, nothing to do with video, and it won't compile at all without that parameter.)

Hope this helps!

BTW, one other bug I've stumbled across is that when I try and resize the video to 720x576, every time I try and enter the 576 it auto-corrects to 566! I cannot change the middle 6 back to 7 until I have entered all three digits! This is in the software resize window.  ???

Cheers,
Title: Re: 2.6.11beta problems
Post by: mean on January 01, 2016, 11:07:32 AM
Ok, i've found a way to reproduce, looking into it
Title: Re: 2.6.11beta problems
Post by: pchristy on January 01, 2016, 11:11:06 AM
Phew! I was beginning to wonder if it was something I was doing!
Title: Re: 2.6.11beta problems
Post by: mean on January 01, 2016, 01:42:52 PM
It now works with my simple example
Does it work for you ?
Title: Re: 2.6.11beta problems
Post by: pchristy on January 01, 2016, 03:31:10 PM
YES! That worked!

Well done, Mean! And thanks for all your efforts!

BTW, that resize "bug" (auto-correcting the height) was finger trouble on my part. I'd left the "lock aspect ratio" button checked! D'oh!

;D