• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Thread-related crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread-related crash


  • Subject: Re: Thread-related crash
  • From: Terrence Asselin <email@hidden>
  • Date: Wed, 7 Apr 2004 17:36:47 -0500

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.


  • Follow-Ups:
    • Re: Thread-related crash
      • From: John Stiles <email@hidden>
References: 
 >Thread-related crash (From: John Stiles <email@hidden>)

  • Prev by Date: Preferences
  • Next by Date: Re: Fixing a leak in an NSFormatter
  • Previous by thread: Re: Thread-related crash
  • Next by thread: Re: Thread-related crash
  • Index(es):
    • Date
    • Thread