GafferHQ / gaffer

Gaffer is a node-based application for lookdev, lighting and automation
http://www.gafferhq.org
BSD 3-Clause "New" or "Revised" License
959 stars 206 forks source link

Crash when launching files from the File->OpenRecent->... menu #548

Closed bentoogood closed 10 years ago

bentoogood commented 11 years ago

Appears to be in PySide builds only.

To reproduce, launch gaffer and attempt to pick any item from the open recent menu.

Results in a segfault crash.

Also reproducible by opening fileopen dialog, then using tab complete to specify a file to open - but not clicking on the item in the file list.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe2f06181 in ?? () from /disk1/gaffer-0.81.0-linux/lib/libQtGui.so.4
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 expat-2.0.1-11.el6_2.x86_64 fontconfig-2.8.0-3.el6.x86_64 freeglut-2.6.0-1.el6.x86_64 glibc-2.12-1.107.el6.x86_64 libICE-1.0.6-1.el6.x86_64 libSM-1.2.1-2.el6.x86_64 libX11-1.5.0-4.el6.x86_64 libXau-1.0.6-4.el6.x86_64 libXcursor-1.1.13-2.el6.x86_64 libXext-1.3.1-2.el6.x86_64 libXfixes-devel-5.0-3.el6.x86_64 libXi-1.6.1-3.el6.x86_64 libXinerama-1.1.2-2.el6.x86_64 libXmu-1.1.1-2.el6.x86_64 libXrandr-1.4.0-1.el6.x86_64 libXrender-0.9.7-2.el6.x86_64 libXt-1.1.3-1.el6.x86_64 libXxf86vm-1.1.2-2.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 libselinux-2.0.94-5.3.el6_4.1.x86_64 libstdc++-4.4.7-3.el6.x86_64 libuuid-2.17.2-12.9.el6_4.3.x86_64 libxcb-1.8.1-1.el6.x86_64 mesa-libGLU-9.0-0.7.el6.x86_64 sssd-client-1.9.2-82.7.el6_4.x86_64 zlib-1.2.3-29.el6.x86_64        
(gdb) bt                                                                                                                
#0  0x00007fffe2f06181 in ?? () from /disk1/gaffer-0.81.0-linux/lib/libQtGui.so.4                                       
#1  0x00007fffe2f04df8 in QApplication::x11ProcessEvent(_XEvent*) () from /disk1/gaffer-0.81.0-linux/lib/libQtGui.so.4  
#2  0x00007fffe2f2ea27 in ?? () from /disk1/gaffer-0.81.0-linux/lib/libQtGui.so.4                                       
#3  0x00007fffe4a641a2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /disk1/gaffer-0.81.0-linux/lib/libQtCore.so.4                                                                                                
#4  0x00007fffe4a64504 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /disk1/gaffer-0.81.0-linux/lib/libQtCore.so.4                                                                                                         
#5  0x00007fffe4a69499 in QCoreApplication::exec() () from /disk1/gaffer-0.81.0-linux/lib/libQtCore.so.4                
#6  0x00007fffe3b475e7 in Sbk_QApplicationFunc_exec_ () from /disk1/gaffer-0.81.0-linux/python/PySide/QtGui.so          
#7  0x00007ffff7d133b9 in call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4005                                                                                                                       
#8  PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2666                
#9  0x00007ffff7d1401e in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4107                                                                                                                       
#10 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4042                     
#11 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2666                
#12 0x00007ffff7d1401e in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4107                                                                                                                       
#13 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4042                     
#14 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2666                
#15 0x00007ffff7d1401e in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4107                                                                                                                       
#16 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4042                     
#17 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2666                
#18 0x00007ffff7d1401e in fast_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4107                                                                                                                       
#19 call_function (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:4042                     
#20 PyEval_EvalFrameEx (f=<value optimized out>, throwflag=<value optimized out>) at Python/ceval.c:2666                
#21 0x00007ffff7d1511e in PyEval_EvalCodeEx (co=0x7ffff7ae0a30, globals=<value optimized out>, locals=<value optimized out>, args=<value optimized out>, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253                                                                                                                      
#22 0x00007ffff7d15232 in PyEval_EvalCode (co=<value optimized out>, globals=<value optimized out>, locals=<value optimized out>) at Python/ceval.c:667                                                                                         
#23 0x00007ffff7d34d70 in run_mod (fp=0x6cf730, filename=<value optimized out>, start=<value optimized out>, globals=0x63f330, locals=0x63f330, closeit=1, flags=0x7ffffffefe40) at Python/pythonrun.c:1365                                     
#24 PyRun_FileExFlags (fp=0x6cf730, filename=<value optimized out>, start=<value optimized out>, globals=0x63f330, locals=0x63f330, closeit=1, flags=0x7ffffffefe40) at Python/pythonrun.c:1351                                                 
#25 0x00007ffff7d34f4f in PyRun_SimpleFileExFlags (fp=0x6cf730, filename=0x7fffffff0d80 "/disk1/gaffer-0.81.0-linux/bin/gaffer.py", closeit=1, flags=0x7ffffffefe40) at Python/pythonrun.c:943                                                  
#26 0x00007ffff7d4a9f4 in Py_Main (argc=<value optimized out>, argv=<value optimized out>) at Modules/main.c:640        
#27 0x0000003553a1ecdd in __libc_start_main () from /lib64/libc.so.6                                                    
#28 0x0000000000400649 in _start () 
johnhaddon commented 10 years ago

This has got embarrassing enough that I've had a bash at fixing it. It doesn't reproduce reliably on OS X so could you have a bash on Linux Ben? You should just be able to grab the file below and use it to replace the one in a download of 0.93.0.

https://github.com/johnhaddon/gaffer/blob/openRecentCrashFix/python/GafferUI/FileMenu.py

Let us know if that works and I'll put in a pull request...

bentoogood commented 10 years ago

That fix works for me on Ubuntu 13.10 with latest download of 0.93.0.

thanks for that!

chippey commented 10 years ago

Well, I feel a bit sheepish again (should have subscribed to this issue - had my own go at a fix in the other referenced issue 808 but it's irrelevant now).

Tested it here with 0.93.0 and CentOS 6.5 and works fine!

Cheers and thanks! (And sorry if I caused any confusion with the other issue) -Matt

johnhaddon commented 10 years ago

Great stuff - I've merged the fix in to master so it'll be there in the next public build. No need to feel sheepish Matt - thanks for the clear bug reports in the first place, and for testing the fix… Cheers… John