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 762 - Crash with QMenu.addSeparator() and QMenu.clear()
: Crash with QMenu.addSeparator() and QMenu.clear()
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.0
: PC Linux
: P2 major
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-03-19 02:26 EET by john haddon
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 john haddon 2011-03-19 02:26:50 EET
Below is a test case which creates a menubar which causes crashes. To cause a
crash, click the menubar to lower a menu, and then move the mouse right and
left over the menubar to alternately show and hide each menu. After doing this
a few times you should see a crash. Removing the m.addSeparator line causes the
crashing to stop.

import functools
from PySide import QtGui

app = QtGui.QApplication( [] )

def updateMenu( m ) :

    m.clear()

    for i in range( 0, 5 ) :

        action = QtGui.QAction( str( i ), m )
        m.addAction( action )

        # commenting the line beloew will prevent the crashes
        m.addSeparator()

mb = QtGui.QMenuBar()

for i in range( 0, 5 ) :

    subMenu = mb.addMenu( str( i ) )
    subMenu.aboutToShow.connect( functools.partial( updateMenu, subMenu ) )

mb.show()
app.exec_()
Comment 1 Hugo Parente Lima 2011-03-21 18:57:00 EET
Thanks for the report, I can reproduce it, prioritizing as P2.
Comment 2 renato filho 2011-03-23 23:03:54 EET
This work fine with the current GIT version. Probably fixed in previous commit.
Could you confirm that?

I will close the bug, but feel free to reopen, if the bug still happen in your
computer.
Comment 3 Hugo Parente Lima 2011-03-23 23:36:22 EET
I also can't reproduce it anymore with the latest version from git.
Comment 4 Hugo Parente Lima 2011-04-01 23:15:57 EEST
Closing bug after release of PySide 1.0.1.