[Qt-interest] Qt 4.7 bug in Mac OS X ?

Kustaa Nyholm Kustaa.Nyholm at planmeca.com
Thu Sep 23 14:30:13 CEST 2010


Hi,

still trying to trace my mysterious crash.

Below is the valgrind output for something that happens prior to the crash.

Sorry about the line wrappingm it is a bit of a pain to read.

But to me this reads that QCocoaView::mouseEntered tried to access some
internal widget structure that had already been disposed of when my
PlanMenuHelper widget was disposed.

This matches the symptoms because the crash always happens when
the mouse enters the area where my disposed widget was.

This is the first and only memory access violation valgrind reports
before the actual crash and I've spent quite a lot time combing through my
code to find anything suspicious but have not found anything. The very same
code paths in my code get executed time and time again and
widgets get created and destroyed without any problems, except if
I move the mouse outside my Helper widget and then back inside it.

So my current thinking is that this is a bug in Qt 4.7/Mac OS X.

br Kusti


==68577== Invalid read of size 8
==68577==    at 0x100402F08: -[QCocoaView mouseEntered:] (in
/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x10187DDC5: -[NSApplication sendEvent:] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==68577==    by 0x10040B809: -[QNSApplication sendEvent:] (in
/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x101814921: -[NSApplication run] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==68577==    by 0x100415483:
QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
(in /Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x1012EEE53:
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in
/Library/Frameworks/QtCore.framework/Versions/4/QtCore)
==68577==    by 0x1012EF173:
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in
/Library/Frameworks/QtCore.framework/Versions/4/QtCore)
==68577==    by 0x1012F079B: QCoreApplication::exec() (in
/Library/Frameworks/QtCore.framework/Versions/4/QtCore)
==68577==    by 0x1000033F3: main (in ./PlanGuiDesktop)
==68577==  Address 0x11970ecd0 is 176 bytes inside a block of size 248
free'd
==68577==    at 0x1000B546F: free (vg_replace_malloc.c:366)
==68577==    by 0x103FB771A: _internal_object_dispose (in
/usr/lib/libobjc.A.dylib)
==68577==    by 0x10284A3B9: -[NSObject(NSObject) dealloc] (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio
n)
==68577==    by 0x101879A00: -[NSResponder dealloc] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==68577==    by 0x1018785DE: -[NSView dealloc] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==68577==    by 0x101941026: -[NSControl dealloc] (in
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
==68577==    by 0x100402119: -[QCocoaView dealloc] (in
/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x10282ACC5: _CFAutoreleasePoolPop (in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio
n)
==68577==    by 0x106019E5E: -[NSAutoreleasePool release] (in
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation)
==68577==    by 0x1003F60B2: QWidget::destroy(bool, bool) (in
/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x1004AC632: QWidget::~QWidget() (in
/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
==68577==    by 0x11EF027D1: PlanMenuHelper::~PlanMenuHelper() (in
/Users/nyholku/GUI2/src/SovereignGui/bin/views/libDefaultViews.dylib)






More information about the Qt-interest-old mailing list