Hi,

In my garbage collected app I'm seeing a crash after saving a document to disk (or any of the other export metods that bring up the save panel). The crash doesn't happen always, but still with some frequency (I can usually get it to reproduce between every 10-20 saves/exports). I _think_ the perpetrator is the save panel. The curious bit though is, that the crash happens not only after the panel having been dismissed. It happens after the sometimes lengthy save ends. I bring up a progress info sheet during the write, but when I tested without putting the sheet up the crash still happened, so that's not a factor. At any rate, why would the panel be asked to redraw long after it has been removed from the screen is a mystery to me. Everything is done on the main thread.

I've seen in the archives and by Googling that the open and save panels have been somewhat problematic for a long time and more so in Leopard, sometimes with similar backtraces to the one below, and in 10.5.4 it is apparently still not fixed. I'm rather hoping someone has some pointers on how I can investigate further, or maybe even work around the problem.

The back trace looks like this (although the top few items can vary starting from the NSMatrix and deeper calls):

#0  0x92f4109b in CFDictionaryGetValue ()
#1 0x90333954 in -[NSNavExpandedNodeObservingCenter cachedChildrenForExpandedNode:] () #2 0x9033383a in -[NSNavDataSource _cachedChildrenForNode:createIfNeeded:] ()
#3  0x903337fc in -[NSNavDataSource cachedChildrenForNode:] ()
#4 0x90341e3c in -[NSNavBrowserDelegate browser:willDisplayCell:atRow:column:] () #5 0x90341d5d in -[NSBrowser _sendDelegateWillDisplayCell:atRow:column:] ()
#6  0x90341ca5 in -[NSBrowser _loadCell:atRow:col:inMatrix:] ()
#7  0x9030f713 in -[NSMatrix drawRect:] ()
#8  0x901c6984 in -[NSView _drawRect:clip:] ()
#9 0x901c547b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #10 0x901c5812 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #11 0x901c5812 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () #12 0x901c3dd1 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #13 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #14 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #15 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #16 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #17 0x9033aff5 in -[NSBrowser _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #18 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #19 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #20 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #21 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #22 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #23 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #24 0x901c4c2b in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #25 0x901c3713 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView :] () #26 0x901c0237 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#27 0x90100c8f in -[NSView displayIfNeeded] ()
#28 0x9010083d in -[NSWindow displayIfNeeded] ()
#29 0x90100660 in _handleWindowNeedsDisplay ()
#30 0x92f6c9a2 in __CFRunLoopDoObservers ()
#31 0x92f6dd05 in CFRunLoopRunSpecific ()
#32 0x92f6ecf8 in CFRunLoopRunInMode ()
#33 0x93197da4 in RunCurrentEventLoopInMode ()
#34 0x93197af6 in ReceiveNextEventCommon ()
#35 0x93197a31 in BlockUntilNextEventMatchingListInMode ()
#36 0x900fe505 in _DPSNextEvent ()
#37 0x900fddb8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#38 0x900f6df3 in -[NSApplication run] ()
#39 0x900c4030 in NSApplicationMain ()
#40 0x0003b0c4 in main (argc=1, argv=0xbffff678) at /Users/user/ Documents/Xcode Projects/MyProject/main.m:13

Just before the EXC_BAD_ACCESS crash the console logs loads of invalid context errors for all kinds of CGContext rendering calls, like:
CGContextResetClip: invalid context
CGContextReplaceTopGState: invalid context
CGContextClipToRect: invalid context
... etc ...

Thanks,
António

----------------------------------------------------
Disapprove of sin but not of the sinner
----------------------------------------------------


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to