PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 378 - Segmentation fault in PySide::signalUpdateSource if you set an attribute before calling super __init__()
: Segmentation fault in PySide::signalUpdateSource if you set an attribute befo...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtNetwork
: 0.4.1
: PC Linux
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-09-22 11:52 EEST by David Bronke
Modified: 2010-10-13 13:48 EEST (History)
10 users (show)

See Also:


Attachments
The project which exhibits the segfault. (158.74 KB, application/octet-stream)
2010-09-22 11:52 EEST, David Bronke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Bronke 2010-09-22 11:52:26 EEST
Created attachment 94 [details]
The project which exhibits the segfault.

When calling QtNetwork.QNetworkCookieJar.__init__(self) in my subclass of
QtNetwork.QNetworkCookieJar, we experience the following segfault:

(gdb) r
Starting program: /usr/bin/python coconut.py
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe47bb710 (LWP 23614)]
[New Thread 0x7fffe3ea2710 (LWP 23615)]
Making new shiny NetworkCookieJar.
BLEH

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff644a092 in PySide::signalUpdateSource(_object*) () from
/usr/lib/libpyside.so.0.4
(gdb) bt
#0  0x00007ffff644a092 in PySide::signalUpdateSource(_object*) () from
/usr/lib/libpyside.so.0.4
#1  0x00007fffee601030 in ?? () from
/usr/lib/python2.6/site-packages/PySide/QtNetwork.so
#2  0x00007ffff7ad219c in wrap_init () from /usr/lib/libpython2.6.so.1.0
#3  0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#4  0x00007ffff7b0fb43 in PyEval_CallObjectWithKeywords () from
/usr/lib/libpython2.6.so.1.0
#5  0x00007ffff7a9b069 in wrapperdescr_call () from
/usr/lib/libpython2.6.so.1.0
#6  0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#7  0x00007ffff7b152ce in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#8  0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#9  0x00007ffff7aaa9cf in function_call () from /usr/lib/libpython2.6.so.1.0
#10 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#11 0x00007ffff7a9644f in instancemethod_call () from
/usr/lib/libpython2.6.so.1.0
#12 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#13 0x00007ffff7ad571e in slot_tp_init () from /usr/lib/libpython2.6.so.1.0
#14 0x00007ffff7ad4338 in type_call () from /usr/lib/libpython2.6.so.1.0
#15 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#16 0x00007ffff7b152ce in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#17 0x00007ffff7b16140 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#18 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#19 0x00007ffff7aaa9cf in function_call () from /usr/lib/libpython2.6.so.1.0
#20 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#21 0x00007ffff7a9644f in instancemethod_call () from
/usr/lib/libpython2.6.so.1.0
#22 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#23 0x00007ffff7ad571e in slot_tp_init () from /usr/lib/libpython2.6.so.1.0
#24 0x00007ffff7ad4338 in type_call () from /usr/lib/libpython2.6.so.1.0
#25 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#26 0x00007ffff7b152ce in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#27 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#28 0x00007ffff7b15af5 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#29 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#30 0x00007ffff7aaaacb in function_call () from /usr/lib/libpython2.6.so.1.0
#31 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#32 0x00007ffff7b14514 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#33 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#34 0x00007ffff7aaa9cf in function_call () from /usr/lib/libpython2.6.so.1.0
#35 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#36 0x00007ffff7a9644f in instancemethod_call () from
/usr/lib/libpython2.6.so.1.0
#37 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#38 0x00007ffff7ad5ae4 in slot_tp_call () from /usr/lib/libpython2.6.so.1.0
#39 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#40 0x00007ffff7b152ce in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#41 0x00007ffff7b16140 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#42 0x00007ffff7b16140 in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#43 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#44 0x00007ffff7aaa9cf in function_call () from /usr/lib/libpython2.6.so.1.0
#45 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#46 0x00007ffff7a9644f in instancemethod_call () from
/usr/lib/libpython2.6.so.1.0
#47 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#48 0x00007ffff7ad571e in slot_tp_init () from /usr/lib/libpython2.6.so.1.0
#49 0x00007ffff7ad4338 in type_call () from /usr/lib/libpython2.6.so.1.0
#50 0x00007ffff7a83893 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#51 0x00007ffff7b152ce in PyEval_EvalFrameEx () from
/usr/lib/libpython2.6.so.1.0
#52 0x00007ffff7b17570 in PyEval_EvalCodeEx () from
/usr/lib/libpython2.6.so.1.0
#53 0x00007ffff7b17642 in PyEval_EvalCode () from /usr/lib/libpython2.6.so.1.0
#54 0x00007ffff7b3187c in run_mod () from /usr/lib/libpython2.6.so.1.0
#55 0x00007ffff7b31950 in PyRun_FileExFlags () from
/usr/lib/libpython2.6.so.1.0
#56 0x00007ffff7b32dfc in PyRun_SimpleFileExFlags () from
/usr/lib/libpython2.6.so.1.0
#57 0x00007ffff7b3f25d in Py_Main () from /usr/lib/libpython2.6.so.1.0
#58 0x00007ffff74e5c4d in __libc_start_main () from /lib/libc.so.6
#59 0x0000000000400609 in _start ()
(gdb)


Reproduction:

I was unable to generate a test case that exhibited the same problem; instead,
I have attached a tarball of my project. The error can be reproduced by running
coconut.py with PySide 0.4.1 installed.

The crash happens on line 25 of networkcookiejar.py.

OS: Arch Linux
Kernel: Linux 2.6.34-ARCH
Qt version: 4.6.3
PySide version: 0.4.1
Comment 1 Marcelo Lira 2010-09-24 16:05:20 EEST
Fixed in commit PySide/dedc78b3.
Comment 2 Dan Halbert 2010-09-30 17:41:29 EEST
Just for posterity, I encountered this bug too when upgrading from 0.4.0 to
0.4.1, and then discovered it was fixed. It is due to setting an attribute
before calling super(SomeSubclass, self).__init__(...). Here is the full commit
info:
http://qt.gitorious.org/pyside/pyside/commit/dedc78b3fef25e04cf436ca462714ad8dc0329cd.

I have changed the bug title to more accurately reflect the error.
Comment 3 renato filho 2010-10-13 13:48:57 EEST
released on PySide 0.4.2