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 592 - shiboken.dll produces a segmentation fault when reloading a PySide module
: shiboken.dll produces a segmentation fault when reloading a PySide module
Status: CLOSED WORKSFORME
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.0 beta1
: PC MS Windows XP/Vista/7
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-01-10 09:24 EET by Andreas Dewes
Modified: 2011-01-21 15:44 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Dewes 2011-01-10 09:24:45 EET
For the Windows XP binary (1.0.0beta1), shiboken.dll gives a segmentation fault
when I import a Python module that defines some PySide classes, reload it
afterwards and import it again. Example:

pyside_reload_test.py:
---
import sys

from pyside_module_test import *
reload(sys.modules['pyside_module_test'])
from pyside_module_test import *
---

pyside_module_test.py:
---
from PySide.QtGui import * 
from PySide.QtCore import *

class test(QWidget):
  pass
---

Running "python pyside_reload.test.py" produces a segmentation fault in
shiboken.dll. I'm running Windows XP 32 bit Service Pack 3 and Python 2.6
Comment 1 Matti Airas 2011-01-10 10:50:28 EET
Thanks for the bug report. I wasn't able to reproduce the bug with PySide 1.0.0
beta 3 on Ubuntu 10.10, so this might be already fixed, or then it's a issue
specific to Windows. In any case, I'm prioritizing the P3. This will be fixed
during the next sprint, at latest (in 4 weeks).
Comment 2 Hugo Parente Lima 2011-01-10 11:33:25 EET
Shiboken-based bindings doesn't support module reloading (yet), so I'm a bit
surprised that it doesn't seg fault on Linux too.
Comment 3 Matti Airas 2011-01-10 12:31:28 EET
Hugo, in your opinion, should I reprioritize to P4, to make this post-1.0
content?
Comment 4 Andreas Dewes 2011-01-10 13:30:27 EET
Thanks for your feedback, I guess this is a problem specific to Windows (or
even some special version of XP). I will recompile the library from source and
check if the bug is still there afterwards.
Comment 5 Hugo Parente Lima 2011-01-10 14:30:47 EET
Matti, IMO P3 or P2, as I said our generated code is not prepared for a module
reloading, so I'm a bit surprised that it doesn't crash on Linux too.
Comment 6 Matti Airas 2011-01-11 06:28:52 EET
OK. I thought support for reloading should've been regarded a new feature, and
that's why I was proposing postponing it. If not, I'm raising the priority to
P2 because it's a crasher issue, and (theoretically) not limited to a single
platform.
Comment 7 Marcelo Lira 2011-01-19 18:37:51 EET
Andreas, I turned your example into tests for Shiboken and PySide:

shiboken/tests/samplebinding/module_reload_test.py
shiboken/tests/samplebinding/test_module_template.py
pyside/tests/QtGui/pyside_reload_test.py
pyside/tests/QtGui/test_module_template.py

I've run them on Linux and Windows they worked for me.
I'll mark the bug as works for me, if you run the tests and the problem persist
please reopen it with any new information that arises from running the tests.

For information sake here's a link from Python bugs telling that proper reload
for C extension modules is not supported:
http://bugs.python.org/issue1144263
Comment 8 renato filho 2011-01-21 15:44:49 EET
release beta4