ipython/ipython — Issue #1124: Seg Fault 11 when calling PySide using "run" command
Author: nonhermitian
Created: 2011-12-08 07:34:44+00:00
State: open

I am using iPython 0.11 to call a GUI about box written using PySide. Calling the GUI from inside iPython via

from qutip import * #my package
about() #about box

gives the correct result, i.e. opens the about window. However, running the exact same commands listed above inside a script file via

run script.py

results in seg fault 11. Curiously, running

In[1]: from qutip import *

In[2]:about()

In[3]: run script.py

works just fine.

I am running iPython version 0.11 with Python 2.7.2, both installed using MacPorts, on Mac OSX 10.7.2. The current PySide version is 1.0.9. The relevant portion of the crash report generated is given below.

Regards,

Paul

Process: Python [21647]
Path: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [21642]

Date/Time: 2011-12-08 16:20:04.623 +0900
OS Version: Mac OS X Server 10.7.2 (11C74)
Report Version: 9

Interval Since Last Report: 1676458 sec
Crashes Since Last Report: 54
Per-App Crashes Since Last Report: 31
Anonymous UUID: 7E473779-A3A4-441E-9864-390BB3EF8800

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
__TEXT 00000001071d1000-00000001071d2000 [ 4K] r-x/rwx SM=COW /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Application Specific Information:
objc[21647]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib	0x00007fff880924f0 strlen + 16
1 libsystem_c.dylib	0x00007fff8802e34b strdup + 18
2 libshiboken-python2.7.1.0.dylib	0x0000000109147ed7 Shiboken::sequenceToArgcArgv(_object*, int*, char***, char const*) + 391
3 QtGui.so	0x000000010b102b65 Sbk_QApplication_Init + 725
4 org.python.python	0x0000000107232b9a type_call + 362
5 org.python.python	0x00000001071e0fd1 PyObject_Call + 97
6 org.python.python	0x00000001072744cf PyEval_EvalFrameEx + 7871
7 org.python.python	0x000000010727a343 fast_function + 195
8 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
9 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
10 org.python.python	0x0000000107271d16 PyEval_EvalCode + 54
11 org.python.python	0x0000000107299b4e PyRun_FileExFlags + 174
12 org.python.python	0x000000010726df9a builtin_execfile + 490
13 org.python.python	0x0000000107274bfa PyEval_EvalFrameEx + 9706
14 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
15 org.python.python	0x000000010727a3b9 fast_function + 313
16 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
17 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
18 org.python.python	0x000000010727a3b9 fast_function + 313
19 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
20 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
21 org.python.python	0x000000010727a3b9 fast_function + 313
22 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
23 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
24 org.python.python	0x00000001072736cc PyEval_EvalFrameEx + 4284
25 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
26 org.python.python	0x000000010727a3b9 fast_function + 313
27 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
28 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
29 org.python.python	0x000000010727a3b9 fast_function + 313
30 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
31 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
32 org.python.python	0x000000010727a3b9 fast_function + 313
33 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
34 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
35 org.python.python	0x000000010727a3b9 fast_function + 313
36 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
37 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
38 org.python.python	0x000000010727a3b9 fast_function + 313
39 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
40 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
41 org.python.python	0x000000010727a3b9 fast_function + 313
42 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
43 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
44 org.python.python	0x000000010727a3b9 fast_function + 313
45 org.python.python	0x00000001072742be PyEval_EvalFrameEx + 7342
46 org.python.python	0x00000001072725b9 PyEval_EvalCodeEx + 2201
47 org.python.python	0x0000000107271d16 PyEval_EvalCode + 54
48 org.python.python	0x0000000107299b4e PyRun_FileExFlags + 174
49 org.python.python	0x0000000107299528 PyRun_SimpleFileExFlags + 424
50 org.python.python	0x00000001072ad63e Py_Main + 2990
51 org.python.python	0x00000001071d1f24 0x1071d1000 + 3876