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 1137 - Internal C++ object already deleted
: Internal C++ object already deleted
Status: RESOLVED ALREADYFIXED
Product: PySide
Classification: Unclassified
Component: QtUiTools
: HEAD
: PC Linux
: P5 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-08 11:07 EET by Diego Gaustein
Modified: 2012-02-26 06:47 EET (History)
11 users (show)

See Also:


Attachments
Working example (551 bytes, text/plain)
2012-02-09 14:41 EET, Vladimir Rutsky
Details
UI file for working example (1.56 KB, application/x-designer)
2012-02-09 14:41 EET, Vladimir Rutsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Gaustein 2012-02-08 11:07:05 EET
Hi. In PySide 1.0.9 I could do

widgets = dict()

class FormLoader(QUiLoader):
  def createWidget(self, className, parent=None, name=""):
  obj = super(FormLoader, self).createWidget(className, parent, name)
  self.widgets[name] = obj
  return obj

and then set properties on the loaded form. Now, using HEAD, I get

Traceback (most recent call last):
  File "...", line 158, in ...
    self.loader.widgets[...].setProperty(...)
RuntimeError: Internal C++ object (PySide.QtGui.QLineEdit) already deleted.

Thanks.
Comment 1 Diego Gaustein 2012-02-09 06:30:03 EET
I had to go back to an older version in order to continue development. 1.1.0
also suffers from this bug, while it works alright in 1.0.9.
Cheers.
Comment 2 Vladimir Rutsky 2012-02-09 14:04:12 EET
I believe this bug is duplicate of bug #1060, which is fixed in 1.1.0.
Comment 3 Diego Gaustein 2012-02-09 14:07:01 EET
(In reply to comment #2)
> I believe this bug is duplicate of bug #1060, which is fixed in 1.1.0.

It seems to have reocurred. Someone else reported the same bug #1138, and it
has a patch.
Comment 4 Vladimir Rutsky 2012-02-09 14:11:14 EET
(In reply to comment #3)
> (In reply to comment #2)
> > I believe this bug is duplicate of bug #1060, which is fixed in 1.1.0.
> 
> It seems to have reocurred. Someone else reported the same bug #1138, and it
> has a patch.

I reported bug #1138 :) It relates to case when you override other than
createWidget() methods (like createLayout() and possible createAction(),
createActionGroup() etc). Can you provide complete example on which bug
reproduces?
Comment 5 Diego Gaustein 2012-02-09 14:14:10 EET
The example in the first comment is pretty much a test case. I build a
dictionary of widgets, and then try to access them: the c++ objects had already
been deleted. I reverted to 1.0.9 and I am no longer having this issue.
Comment 6 Vladimir Rutsky 2012-02-09 14:41:19 EET
Created attachment 487 [details]
Working example

Diego,

I can't reproduce this bug according to your description. See attached example
that works for me in PySide 1.1.0.
Comment 7 Vladimir Rutsky 2012-02-09 14:41:49 EET
Created attachment 488 [details]
UI file for working example
Comment 8 Paulo Alcantara 2012-02-26 06:47:12 EET
Hi Diego,

This bug is already fixed since PySide commit
ace1372c1a091faabdc6cfb00f187a993d31b2c4.

Marking this report as ALREADYFIXED.