NSViewHierarchyLock
NSViewHierarchyLock
- Subject: NSViewHierarchyLock
- From: "Jeff Evans" <email@hidden>
- Date: Mon, 26 Aug 2002 11:09:26 -0500
Hello list, I left my app running which continuously creates and destroys
subviews from a main window and its subviews and when I came in this
morning, found my app in a deadlock waiting for the main window's
NSViewHierarchyLock. I understand the need for the lock, but don't
understand why the deadlock occurs. Thread 1 is stuck at
CFRunLoopRunInMode->mach_msg->mach_msg_overwrite_trap, Thread 2 is at
_pthread_become_available->mach_msg->mach_msg_overwrite_trap and Thread 3 is
at [nsview addSubview]->[nswindow
lockviewheriarchyformodification]->[nsviewhierarchylock
lockforwriting]->_pthread_cond_wait->semaphore_wait_signal_trap (arrows are
call stack, not indirection). So, it looks like someone's got the lock, and
is waiting for my add subview thread to finish, which is waiting on the
lock. However, none of my code deals with that lock. I don't understand
why thread 2 is still sticking around, or what mach_msg_overwrite_trap
means. Earlier I had tried using a NSLock and NSRecursiveLock shared
between the threads to keep anything from modifying the view hierarchy
non-atomically, but i still ran into this deadlock situation. my app has no
user interaction; it's all timers and very repetitous stuff that does not
change much.
Another message I get right before my app deadlocks is this:
*** NSRunStorage, _NSBlockNumberForIndex(): index (1200) beyond array bounds
(1002)
I can not find any documentation for NSRunStorage or any clues as to what
could be causing this error. Does anyone on the list know?
Thanks in advance
-Jeff
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.