[Qt4-preview-feedback] Qt 4.5 Cocoa EXEC_BAD_ACCESS
Niti Hantaweepant
nhantawe at adobe.com
Tue Feb 3 20:30:57 CET 2009
Hi everyone,
I've built Qt 4.5 on Mac Leopard with -arch cocoa flag. With the built Qt framework using the Cocoa framework, without changing any code I got the signal "EXEC_BAD_ACCESS" at QPaintEngine::setSystemClip when running my application.
The call stack is attached below. Basically the following line is the code in main.cpp.
result = app->exec(); // app is QApplication object
Before running into this EXEC_BAD_ACCESS, the program tried to create a new QScrollArea/QWidget as a child to QMainWindow, the following are the code executed before:
DocWindow *AppWindow::createDocWindow() // AppWindow is a class inherited from QMainWindow
{
DocWindow *child = new DocWindow(this); // DocWindow is an object of class inherited from QScrollArea
workspace->addWindow(child); // workspace is a pointer to QWorkspace object
connect(child, SIGNAL( aboutToClose( DocWindow* ) ), this, SLOT( docWindowClosing( DocWindow* ) ));
}
DocWindow::DocWindow( AppWindow* appWin ):
fAGMArea( new AGMArea( this ) )
{
setAttribute(Qt::WA_DeleteOnClose);
setAttribute(Qt::WA_InputMethodEnabled );
setWidget( &(*fAGMArea) ); // fAGMArea is an object of class inherited from QWidget
}
Can you please advise what could go wrong here and if I need to change my code to use the new Qt with Cocoa framework? Note that this code works fine with Qt 4.4.3 using Carbon framework. Qt support suggested the code should work in the same way with Qt 4.4 and I should send this query to this list.
Thanks,
--Niti
#0 0x03529e78 in QPaintEngine::setSystemClip
#1 0x034034b8 in -[QCocoaView drawRect:]
#2 0x91ccc29c in -[NSView _drawRect:clip:]
#3 0x91ccad93 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#4 0x91ccb12a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#5 0x91ccb12a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#6 0x91ccb12a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#7 0x91cc96e9 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#8 0x91cca543 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#9 0x91cca543 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#10 0x91cca543 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#11 0x91cca543 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#12 0x91cc902b in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#13 0x91cc5b4f in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#14 0x91c06523 in -[NSView displayIfNeeded]
#15 0x91c060d1 in -[NSWindow displayIfNeeded]
#16 0x91c05ef4 in _handleWindowNeedsDisplay
#17 0x929a59a2 in __CFRunLoopDoObservers
#18 0x929a6cfc in CFRunLoopRunSpecific
#19 0x929a7cd8 in CFRunLoopRunInMode
#20 0x94f962c0 in RunCurrentEventLoopInMode
#21 0x94f96012 in ReceiveNextEventCommon
#22 0x94f95f4d in BlockUntilNextEventMatchingListInMode
#23 0x91c03d7d in _DPSNextEvent
#24 0x91c03630 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#25 0x91bfc66b in -[NSApplication run]
#26 0x0340c606 in QEventDispatcherMac::processEvents
#27 0x0328dc41 in QEventLoop::processEvents
#28 0x0328dded in QEventLoop::exec
#29 0x032919ee in QCoreApplication::exec
#30 0x0006f9ce in main at main.cpp:294
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090203/d221779a/attachment.html
More information about the Qt4-feedback
mailing list