Re: Application Hang (Cocoa-Java)
Re: Application Hang (Cocoa-Java)
- Subject: Re: Application Hang (Cocoa-Java)
- From: Graham <email@hidden>
- Date: Sun, 15 May 2005 12:00:46 -0400
I ran my app in the debugger and paused it when it hanged and the
following is the stack trace:
#0 0x9002ca78 in semaphore_wait_signal_trap
#1 0x9003125c in pthread_cond_wait
#2 0x93649830 in -[NSViewHierarchyLock lockForWriting]
#3 0x93634e5c in -[NSView renewGState]
#4 0x93634ccc in -[NSView _invalidateGStatesForTree]
#5 0x90759e04 in CFArrayApplyFunction
#6 0x93634dfc in -[NSView _invalidateGStatesForTree]
#7 0x9372d90c in -[NSTabView
_switchTabViewItem:oldView:withTabViewItem:newView:initialFirstResponder
:lastKeyView:]
#8 0x9372d278 in -[NSTabView selectTabViewItem:]
#9 0x93677f08 in -[NSWindow sendEvent:]
#10 0x9362113c in -[NSApplication sendEvent:]
#11 0x936185d0 in -[NSApplication run]
#12 0x93708e04 in NSApplicationMain
#13 0x00008b6c in main at main.m:13
Being new to Cocoa, could anyway help me understand this please?
I see that an attempt is being made to get a semaphore to lock the
views or something?
What could I be doing that would cause this lock?
Thanks
Graham
On May 15, 2005, at 10:56 AM, Graham wrote:
Hi,
I realize I am probably the only person out here programming Cocoa
in Java ;-), but here goes:
I have an app with an NSTabView. Each view on the NSTabView has a
Java Thread that is used to populate the view with data from a
remote site. I am encountering a deadlock of some kind whereby when
I click a tab to change the tabview, the tab partially highlights
(gray) but does not go blue and the app is unresponsive at his
point. The app only ever locks at this point, when a tab is clicked
and only sometimes, so it's clearly a race/deadlock. I realize it
may well be my logic relating to synchronized methods etc, but
after 2 days of pulling out my hair I wondered if there are any
Cocoa-Java specific gotchas I should be aware of?
Is anyone aware of issues regarding Cocoa and Java threads that
cause repeated view updates and tabviews?
Kind regards,
Graham
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden