Segmentation fault on adding icon to App
I have added icon to my App like this:
@app = QApplication(sys.argv)
On closing app window I get segmentation fault. Why ?
How to correct this ?
The reson for the crash is probably different than icon setting. Please run your application in debug mode and see where it crashes. If that is not enough, you can run it through Valgrind and it will show a more thorough stack trace.
Can u elaborate on how to debug Application.
If you are using Qt Creator: select debug build in porject settings. Run the debugging session (F5). Do everything as you do normally to reproduce the crash. The debugger will show you exactly the line of code where the crash has occured.
Actually i have created Qt app in python using pyside library. Only .ui files are created in Qt creator.
How can i debug?
In that case, I do not know. I guess Python also has some kind of debugger available.
Using gdb i got following trace:
@[Thread 0x7fffed7fd700 (LWP 60845) exited]
[Thread 0x7fffedffe700 (LWP 60844) exited]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff64c4bcb in PySide::SignalManager::clear() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
#0 0x00007ffff64c4bcb in PySide::SignalManager::clear() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
#1 0x00007ffff64d1f95 in PySide::destroyQCoreApplication() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
#2 0x00007ffff64d2981 in PySide::runCleanupFunctions() () from /usr/lib/x86_64-linux-gnu/libpyside-python2.7.so.1.2
#3 0x00007ffff683ecc5 in ?? () from /usr/lib/python2.7/dist-packages/PySide/QtCore.so
#4 0x000000000052f936 in PyEval_EvalFrameEx ()
#5 0x000000000056d0aa in ?? ()
#6 0x00000000004da29f in PyEval_CallObjectWithKeywords ()
#7 0x000000000042fa19 in Py_Finalize ()
#8 0x000000000042fb7c in Py_Exit ()
#9 0x000000000042fcb9 in ?? ()
#10 0x000000000042ec32 in PyErr_PrintEx ()
#11 0x000000000042f042 in ?? ()
#12 0x000000000046aa09 in Py_Main ()
#13 0x00007ffff7817ec5 in __libc_start_main (main=0x46ac3f <main>, argc=2, argv=0x7fffffffe4b8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe4a8) at libc-start.c:287
#14 0x000000000057497e in _start ()@