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 704 - Program crashe sometimes when the class multiple inherits from an old style class
: Program crashe sometimes when the class multiple inherits from an old style c...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.0 rc1
: All All
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-28 22:49 EET by flyaflya
Modified: 2011-04-01 23:15 EEST (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 flyaflya 2011-02-28 22:49:43 EET
My project has many class using multiple inheritance to reuse some code, like
thses:

Class FooDialog(QDialog, MixinBase):
          .....

I find when the MixinBase defined as an old style class, the program often
crash.

Class MixinBase:
     pass

But when make it a new style class, the problem goes awary.

Class MixinBase(object):
    pass

Because it is only occasional, I can't write some code to display it, just post
the issue here.
Comment 1 Hugo Parente Lima 2011-03-01 11:21:50 EET
Thanks for reporting.
Comment 2 renato filho 2011-03-16 22:07:58 EET
After some discussion we decided does not allow use old style classes in
multiple inheritance with PySide classes, because this can cause a
unpredictable behavior on shiboken code.

Because of that PySide will raise a error when using a old style class for
multiple inheritance.

fixed on shiboken commit:

commit a72c6be47d0be58a1c3ab174397b79662400e181
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Mon Mar 14 18:17:03 2011 -0300
Comment 3 Matti Airas 2011-03-18 11:14:11 EET
The decision sounds sensible, but have you documented this on the wiki or the
ref docs? I think it'd be essential to describe these kinds of design decisions
there.
Comment 4 Hugo Parente Lima 2011-03-18 16:42:29 EET
(In reply to comment #3)
> The decision sounds sensible, but have you documented this on the wiki or the
> ref docs? I think it'd be essential to describe these kinds of design decisions
> there.

Now an exception with a useful description is throw when you inherit from an
old style class.
Comment 5 renato filho 2011-03-18 19:28:46 EET
documentation added on shiboken, in commit:

commit 9c82464874bef7535690d245f84b70932109087b
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Fri Mar 18 11:16:50 2011 -0300
Comment 6 Hugo Parente Lima 2011-04-01 23:15:59 EEST
Closing bug after release of PySide 1.0.1.