Re: Thread-related crash
Re: Thread-related crash
- Subject: Re: Thread-related crash
- From: John Stiles <email@hidden>
- Date: Wed, 7 Apr 2004 16:12:58 -0700
Your crash looks really similar to mine. However, I am not running any
NSTimers. Then again, this only happened one time in weeks and weeks of
testing.
I'd be willing to believe that your NSTimer made the bug occur more
frequently by calling displayIfNeeded more often, since the crash seems
to be occurring inside of displayIfNeeded. It sure looks like the
system's heartbeat thread is stepping on the toes of the main loop.
Could you try bringing back your NSTimer and cranking up the interval
so that the timer fires like crazy, and see if that brings the bug out
into the open more quickly? If we had a reproducible case, we could
whittle it down and maybe file a bug with Apple.
On Apr 7, 2004, at 3:36 PM, Terrence Asselin wrote:
I had been seeing something very similar to this. It was really hard
to track down and isolate.
We were calling displayIfNeeded on a progress bar from an NSTimer
spawned in the context of the main thread. That call was removed and
the problem hasn't cropped up since. I'm not totally convinced it's
solved though.
I'm not 100% certain if the NSTimer also executed in the context of
the main thread or not, but it looks like it was from the stack trace.
But it was weird because from our crash reports it didn't look like
anything bad was going on. displayIfNeeded was being called from the
main thread, but this strange heartBeatThread seemed to be doing
something bad at the same time. You'd figure whatever this system
thread was doing would be safe, but... we could never figure out what
the deal was with that heartbeat thread.
Here are a couple representative traces:
(Other threads trimmed just blocking on IO)
CRASH #1
Thread 0:
#0 0x9003ea08 in semaphore_wait_signal_trap
#1 0x9003e824 in _pthread_cond_wait
#2 0x930816c8 in -[NSViewHierarchyLock lockForWriting]
#3 0x93096378 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#4 0x930a5778 in -[NSView displayIfNeeded]
#5 0x930b5608 in -[NSWindow displayIfNeeded]
#6 0x930a03b0 in _handleWindowNeedsDisplay
#7 0x90148464 in __CFRunLoopDoObservers
#8 0x901487d4 in __CFRunLoopRun
#9 0x90180f58 in CFRunLoopRunSpecific
#10 0x969a3b70 in RunCurrentEventLoopInMode
#11 0x969b3b00 in ReceiveNextEventCommon
#12 0x969dabbc in BlockUntilNextEventMatchingListInMode
#13 0x9308dedc in _DPSNextEvent
#14 0x930a0158 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#15 0x930b1d88 in -[NSApplication run]
#16 0x9315fc58 in NSApplicationMain
#17 0x000028f0 in _start (crt.c:267)
#18 0x00002770 in start
Thread 6 Crashed:
#0 0x930754f8 in -[NSView lockFocusIfCanDraw]
#1 0x9309eca4 in -[NSView lockFocus]
#2 0x930a5b88 in -[NSUIHeartBeat
lockFocusForView:inRect:needsTranslation:]
#3 0x93097a20 in -[NSProgressIndicator heartBeat:]
#4 0x93081bf0 in -[NSUIHeartBeat _heartBeatThread:]
#5 0x97e2cc50 in forkThreadForFunction
#6 0x90020c88 in _pthread_body
CRASH #2
Thread 0:
#0 0x9003ea08 in semaphore_wait_signal_trap
#1 0x9003e824 in _pthread_cond_wait
#2 0x930816c8 in -[NSViewHierarchyLock lockForWriting]
#3 0x93096378 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#4 0x930a5778 in -[NSView displayIfNeeded]
#5 0x930b5608 in -[NSWindow displayIfNeeded]
#6 0x930a03b0 in _handleWindowNeedsDisplay
#7 0x90148464 in __CFRunLoopDoObservers
#8 0x901487d4 in __CFRunLoopRun
#9 0x90180f58 in CFRunLoopRunSpecific
#10 0x969a3b70 in RunCurrentEventLoopInMode
#11 0x969b3b00 in ReceiveNextEventCommon
#12 0x969dabbc in BlockUntilNextEventMatchingListInMode
#13 0x9308dedc in _DPSNextEvent
#14 0x930a0158 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#15 0x930b1d88 in -[NSApplication run]
#16 0x9315fc58 in NSApplicationMain
#17 0x000028f0 in _start (crt.c:267)
#18 0x00002770 in start
Thread 6 Crashed:
#0 0x930754f8 in -[NSView lockFocusIfCanDraw]
#1 0x9309eca4 in -[NSView lockFocus]
#2 0x930a5b88 in -[NSUIHeartBeat
lockFocusForView:inRect:needsTranslation:]
#3 0x93097a20 in -[NSProgressIndicator heartBeat:]
#4 0x93081bf0 in -[NSUIHeartBeat _heartBeatThread:]
#5 0x97e2cc50 in forkThreadForFunction
#6 0x90020c88 in _pthread_body
_______________________________________________
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.
_______________________________________________
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.