Hi Ken,

> 
> You say you're calling -setNeedsDisplay: on the main thread, but other than 
> that, what do you mean by "multi-thread, multi-window app"?  Are you doing 
> _any_ GUI manipulation from background threads?  If so, what?

This is a video mixer app. There are multiple windows for controlling layers, 
effects, etc. Rendering is done on a CVDisplayLink thread by OpenGL. Whenever I 
need to update something on the UI from that CVDisplayLink thread I call 
dispatch_async(dispatch_get_main…).

But double-checking my code I found sometimes I call [NSSlider cell] 
setFloatValue:] from the CVDisplayLink thread followed by a 
setNeedsDisplayInRect… on the main thread, but [NSSlider cell] setFloatValue:] 
might be already calling setNeedsDisplay…? Than it could be the reason of the 
problem I guess.

Hmm, I should double-check if drawing is always happening from the main thread. 
What is the common way to do that? Can Instruments helpful to debug that? 

> 
> Are there any exceptions on the main thread, especially during a window 
> display cycle, prior to this happening?

No error message at all.

> 
> Have you implemented any properties or methods in your window subclass that 
> might inadvertently shadow properties or methods of NSWindow?

No.

> 
> Are you doing anything unusual with the main application object or its event 
> loop or run loop?  Are you permanently running an inner loop inside of an 
> event/run loop callout from the main loop?  Have you dispatched a block to 
> the main dispatch queue that's still running?

No, it does not seem to anything is blocking the main loop. All other windows 
are updating as expected and everything is running well on the main loop - and 
the problematic window even redraw it’s subviews correctly if I explicitly call 
[NSWindow displayIfNeeded].


Thanks!
Tamas
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to