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 1135 - SIGSEGV when loading custom widget using QUiLoader when overriding createWidget()
: SIGSEGV when loading custom widget using QUiLoader when overriding createWidg...
Status: RESOLVED FIXED
Product: PySide
Classification: Unclassified
Component: QtUiTools
: HEAD
: PC Linux
: P2 major
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-06 03:06 EET by Diego Gaustein
Modified: 2012-02-28 04:38 EET (History)
9 users (show)

See Also:


Attachments
Minimal test case (810 bytes, text/x-python)
2012-02-06 03:06 EET, Diego Gaustein
Details
Qt Designer file (1.58 KB, application/x-designer)
2012-02-06 03:06 EET, Diego Gaustein
Details
Valgrind log (36.39 KB, text/x-log)
2012-02-06 03:07 EET, Diego Gaustein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Gaustein 2012-02-06 03:06:00 EET
Created attachment 481 [details]
Minimal test case

I have a class which inherits from QUiLoader and adds each widget to a
dictionary. When I try to load a custom widget (after adding it to the loader
intance with registerCustomWidget), it aborts with an address boundary error. I
am using the latest PySide compiled with the scripts available at GitHub.

> python
Python 2.7.2+ (default, Aug 16 2011, 07:03:08) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PySide
>>> print PySide.__version__
1.1.1
Comment 1 Diego Gaustein 2012-02-06 03:06:44 EET
Created attachment 482 [details]
Qt Designer file
Comment 2 Diego Gaustein 2012-02-06 03:07:09 EET
Created attachment 483 [details]
Valgrind log
Comment 3 Paulo Alcantara 2012-02-26 06:27:16 EET
Hi Diego,

Thanks for the report, tests and the valgrind's log.

I've reproduced this issue with PySide built against git HEAD. The segfault
occurs when calling PyObject_Call() function from Python. The PyObject_Call()
is called once PyObject_CallObject() was called in
PyCustomWidget::createWidget() from plugins/customwidget.cpp. I've added some
qDebug()'s around the PyCustomWidget::createWidget() code to look for either
null-pointer deference or refcount's issue but I haven't got neither. I'll take
a look at it further this next week.


           - Paulo Alcantara
Comment 4 Paulo Alcantara 2012-02-28 04:38:13 EET
Hi Diego,

Thanks for the report and reproducible tests!

This bug has been fixed on PySide commit
3f779b8307ebf4b6bdfbe777f41d76ce4ca25151.


           - Paulo Alcantara