• 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: [Q] Assertion failure in -[NSThemeFrame lockFocus]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Assertion failure in -[NSThemeFrame lockFocus]


  • Subject: Re: [Q] Assertion failure in -[NSThemeFrame lockFocus]
  • From: Mark de Jong <email@hidden>
  • Date: Sun, 6 Oct 2002 01:07:57 -0700

I seem to have fixed this problem by making sure the progress window is displayed from the main runLoop and the NSThread updates the progress window.

Now, I'm having a display issue. Let's say the work thread has to process 400 "items". What I'm seeing in the progress bar display is an initially blank progress bar (0 items processed) and then it jumps to item 280. Then it updates the progress bar as it processes items 280 thru 400.

I understand that because the thread is doing work separate from the main thread, that I won't see each item processed. However, what I don't understand is the initial jump from 0 to 280 (ish) and then the progress bar jumps by twos thru twelves (or so), which is more reasonable.

It nearly seems like the thread gets a bunch of time at the beginning of its processing and then finally relinquishes control back to the main thread. I thought the threads themselves were preemptive, which should make it impossible for the thread to "hang onto control" for more than its allocated time-slice. (Sorry about the lack of proper nomenclature here ... I hope it makes some sense. :-) )

Thanks for any ideas you may have to explain this behavior.

-- Mark

On Friday, October 4, 2002, at 01:32 PM, Mark de Jong wrote:

Every-so-often I get this assertion failure:

2002-10-04 13:20:18.462 myProgram[15196] *** Assertion failure in -[NSThemeFrame lockFocus], AppKit.subproj/NSView.m:2343

This is coming from a window created in its own NSThread. Is it a problem having a window run in its own thread?

Sometimes the window operates fine. Other times, it gets this assertion. All it contains is an informative progress bar that is updated as the thread does its work.

Thanks, in advance, for any suggestions you might have,

-- Mark

_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
_______________________________________________
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.

References: 
 >[Q] Assertion failure in -[NSThemeFrame lockFocus] (From: Mark de Jong <email@hidden>)

  • Prev by Date: Re: How to draw a 1-pixel non Antialiased line
  • Next by Date: Re: <no subject>
  • Previous by thread: Re: [Q] Assertion failure in -[NSThemeFrame lockFocus]
  • Next by thread: Re: [semi-newbie] Message sent to NSWindowController after
  • Index(es):
    • Date
    • Thread