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 557 - Segmentation fault in QDeclarativeComponent.loadUrl()
: Segmentation fault in QDeclarativeComponent.loadUrl()
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtDeclarative
: 1.0.0 beta1
: All All
: P2 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2010-12-18 16:36 EET by Thomas Perl
Modified: 2011-01-06 16:19 EET (History)
8 users (show)

See Also:


Attachments
Test case: Python script (297 bytes, text/x-python)
2010-12-18 16:37 EET, Thomas Perl
Details
Test case: QML file (79 bytes, application/octet-stream)
2010-12-18 16:37 EET, Thomas Perl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Perl 2010-12-18 16:36:53 EET
When trying to create a QML Component from a file to insert into a
QGraphicsScene (by following the instructions at
http://doc.qt.nokia.com/4.7-snapshot/qml-integration.html), PySide/Qt crashes
when using loadUrl on QDeclarativeComponent:

engine = QDeclarativeEngine()
component = QDeclarativeComponent(engine)
component.loadUrl(QUrl.fromLocalFile('crash.qml'))

I'm attaching a full test case.
Comment 1 Thomas Perl 2010-12-18 16:37:18 EET
Created attachment 193 [details]
Test case: Python script
Comment 2 Thomas Perl 2010-12-18 16:37:36 EET
Created attachment 194 [details]
Test case: QML file
Comment 3 Thomas Perl 2010-12-18 16:39:20 EET
The Python script crashes and gives this backtrace in gdb:

Starting program: /usr/bin/python crash.py
[Thread debugging using libthread_db enabled]
[New Thread 0xb7cbdb70 (LWP 11023)]
[New Thread 0xb72ffb70 (LWP 11024)]

Program received signal SIGSEGV, Segmentation fault.
0x0347bb8d in QDeclarativeEngine::baseUrl() const () from
/usr/lib/libQtDeclarative.so.4
(gdb) bt
#0  0x0347bb8d in QDeclarativeEngine::baseUrl() const () from
/usr/lib/libQtDeclarative.so.4
#1  0x03490194 in QDeclarativeComponent::loadUrl(QUrl const&) () from
/usr/lib/libQtDeclarative.so.4
#2  0x0295cb09 in Sbk_QDeclarativeComponentFunc_loadUrl ()
   from
/home/thp/pkg/pyside-sandbox/lib/python2.6/site-packages/PySide/QtDeclarative.so
#3  0x080de618 in PyEval_EvalFrameEx ()
#4  0x080dfbb2 in PyEval_EvalCodeEx ()
#5  0x080dfca7 in PyEval_EvalCode ()
#6  0x080fd956 in PyRun_FileExFlags ()
#7  0x080fdbb2 in PyRun_SimpleFileExFlags ()
#8  0x0805b6d3 in Py_Main ()
#9  0x0805a8ab in main ()

The QML file's contents are irrelevant, I'm just attaching a dummy QML file
that should have the same name as the one referenced in the Python script.
Comment 4 Matti Airas 2010-12-20 11:29:51 EET
Ooh, naughty - a crash in basic functionality. I'm prioritizing P2 - this will
be most likely fixed during the current sprint (before Jan 07).

Thanks for the report!
Comment 5 Hugo Parente Lima 2011-01-05 14:38:58 EET
Fixed in commit:

pyside/6383832408576175b60f608e02fa3424f782dbed
Comment 6 renato filho 2011-01-06 16:19:32 EET
released on beta3