App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?]
App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?]
- Subject: App hangs when displaying any sheet in 10.5 [was Re: Where to start looking to fix hang?]
- From: Graham Cox <email@hidden>
- Date: Thu, 5 Jun 2008 15:07:44 +1000
Thanks for the tip - easy!
I wish the bug was that easy.... here's my stack trace. Looks like the
hang is in actually trying to display the "save changes" sheet itself,
rather than any particular logic problem, which is what I was assuming
was going on. So, I tried some other sheets I have in my app - they
*all* hang in a similar fashion with this SDK, but work fine with the
10.4 SDK.
Anyone able to give me a clue here? What's different in 10.5 compared
with 10.4 relating to animating a sheet? (Easy to imagine that lots
did change, actually, with Core Animation and so forth). Is it
deadlocked somehow? If so I should mention I'm not using any
additional threads other than what an application creates by default.
Running 10.5.3.
#0 0x94fc54a6 in mach_msg_trap
#1 0x94fccc9c in mach_msg
#2 0x9234f0be in CFRunLoopRunSpecific
#3 0x9234fcf8 in CFRunLoopRunInMode
#4 0x905c7c3f in -[NSMoveHelper _doAnimation]
#5 0x905c6756 in -[NSMoveHelper(NSSheets) _moveParent:andOpenSheet:]
#6 0x905c5f7c in -[NSWindow(NSSheets) _orderFrontRelativeToWindow:]
#7 0x90422465 in -[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
#8 0x904642e7 in -[NSApplication
_orderFrontModalWindow:relativeToWindow:]
#9 0x90463d4f in -[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo
:]
#10 0x9062fffc in _NXDoLocalRunAlertSheet
#11 0x9062fb85 in NSBeginAlertSheet
#12 0x9053e7b7 in -[NSDocument
canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:]
#13 0x9050fe2f in -[NSWindow __close]
#14 0x9050fd71 in -[NSWindow _close:]
#15 0x90435c23 in -[NSApplication sendAction:to:from:]
[...]
Another example for one of my own sheets, but the hang is in the same
place:
#0 0x94fc54a6 in mach_msg_trap
#1 0x94fccc9c in mach_msg
#2 0x9234f0be in CFRunLoopRunSpecific
#3 0x9234fcf8 in CFRunLoopRunInMode
#4 0x905c7c3f in -[NSMoveHelper _doAnimation]
#5 0x905c6756 in -[NSMoveHelper(NSSheets) _moveParent:andOpenSheet:]
#6 0x905c5f7c in -[NSWindow(NSSheets) _orderFrontRelativeToWindow:]
#7 0x90422465 in -[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
#8 0x904642e7 in -[NSApplication
_orderFrontModalWindow:relativeToWindow:]
#9 0x90463d4f in -[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo
:]
#10 0x0001040b in -[GCPolarDuplicateController
beginPolarDuplicationDialog:polarDelegate:] at
GCPolarDuplicateController.m:69
#11 0x000024ee in -[GCOrteliusDocument polarDuplicate:] at
GCOrteliusDocument.m:99
#12 0x90435c23 in -[NSApplication sendAction:to:from:]
[...]
On 5 Jun 2008, at 2:24 pm, j o a r wrote:
On Jun 4, 2008, at 9:17 PM, Graham Cox wrote:
Where should I start to look to debug/fix this? I just can't see
where I need to set a breakpoint to begin with.
Run your app in the debugger. When it hangs, hit the "pause" button
in the debugger and take a look at the backtrace in the thread list.
That would tell you where it's hanging.
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden