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 958 - Segmentation fault with resource files
: Segmentation fault with resource files
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtUiTools
: 1.0.5
: PC Linux
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-08-06 10:56 EEST by Rainer Poisel
Modified: 2011-08-23 00:35 EEST (History)
8 users (show)

See Also:


Attachments
source files (see bug description for more details) (3.68 KB, application/zip)
2011-08-06 10:56 EEST, Rainer Poisel
Details
backtrace for bug #958 (4.86 KB, text/plain)
2011-08-13 17:36 EEST, Victor Wåhlström
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Poisel 2011-08-06 10:56:56 EEST
Created attachment 389 [details]
source files (see bug description for more details)

Using resource files I get a segfault when starting my application. Basically
it seems to work as I can see the main window including my widget flashing up
for parts of a second. The segfault happens inside the exec_() method of the
QtGui.QApplication object. "gui_resources" has been compiled using
"pyside-rcc". It can be read without any errors. 

Attached to this bug-report you can find a zip-archive with my source files:
 * app.py: main appliation; loads the compiled resource
 * myresource.qrc: resource file; created using qtcreator 2.2.1
 * myresource.py: compiled resource file; created using pyside-rcc (Qt 4.7.3)
 * customwidget.ui: my widget .ui file
 * mainwindow.ui: my mainwindow .ui file; not used at the moment

To start the application do the following:
8<==================================
% python app.py
8<==================================

My system configuraiton is as follows:
 * Debian GNU/Linux testing/unstable on amd64

Here are the packages that I have installed:
8<==================================
% dpkg -l | grep -i pyside
ii  libpyside-dev 1.0.5-2
ii  libpyside1.0 1.0.5-2
ii  pyside-tools 0.2.11-1
ii  python-pyside 1.0.5-2
ii  python-pyside.phonon 1.0.5-2
ii  python-pyside.qtcore 1.0.5-2
ii  python-pyside.qtdeclarative 1.0.5-2
ii  python-pyside.qtgui 1.0.5-2
ii  python-pyside.qthelp 1.0.5-2
ii  python-pyside.qtnetwork 1.0.5-2
ii  python-pyside.qtopengl 1.0.5-2
ii  python-pyside.qtscript 1.0.5-2
ii  python-pyside.qtsql 1.0.5-2
ii  python-pyside.qtsvg 1.0.5-2
ii  python-pyside.qttest 1.0.5-2
ii  python-pyside.qtuitools 1.0.5-2
ii  python-pyside.qtwebkit 1.0.5-2
ii  python-pyside.qtxml 1.0.5-2
% dpkg -l | grep -i pyside-tools
ii  pyside-tools 0.2.12-1
% apt-cache policy python-pyside
python-pyside:
  Installed: 1.0.5-2
  Candidate: 1.0.5-2
  Version table:
 *** 1.0.5-2 0
         50 http://ftp.at.debian.org/debian/ unstable/main amd64 Packages
        100 /var/lib/dpkg/status
8<==================================

Any help/improvements highly appreciated. Please let me know if you need to
know more details!
Comment 1 Rainer Poisel 2011-08-06 11:00:00 EEST
I'm sorry, in the original description "gui_resources" should be "myresource".
Comment 2 Hugo Parente Lima 2011-08-10 20:47:38 EEST
Thanks for report, prioritizing as P2.
Comment 3 Victor Wåhlström 2011-08-13 17:36:36 EEST
Created attachment 397 [details]
backtrace for bug #958
Comment 4 Victor Wåhlström 2011-08-13 17:38:29 EEST
The bug title may be a bit misleading; I removed all references to the
resource, and loaded the file directly:

lLoader = QtUiTools.QUiLoader()
#lFile = QtCore.QFile(":/forms/customwidget.ui")
#lFile.open(QtCore.QFile.ReadOnly)
self.customwidget = lLoader.load("customwidget.ui", self)
#lFile.close()

And it still segfaults.

However, using pyside-tools to convert customwidget.ui to customwidget.py and
loading it that way works fine:

$ pyside-uic customwidget.ui > customwidget.py

---

cwidget = customwidget.Ui_customWidget()
cwidget.setupUi(self)

---

To me, it looks as if QtUiTools.QUiLoader.load isn't behaving as expected,
although that shouldn't cause app.exec_() to segfault.

Attaching stack trace.

Additional information:
Ubuntu 11.04 64bit
PySide 1.0.5 (PPA)
Qt 4.7.2
Comment 5 renato filho 2011-08-16 16:03:30 EEST
fixed on pyside commit:

commit 44eab232ed39e800048e74300c61a091ed3d71bc
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Mon Aug 15 17:54:08 2011 -0300
Comment 6 renato filho 2011-08-23 00:35:40 EEST
Released on PySide 1.0.6