On Jan 6, 2017, at 10:14 AM, Tamas Nagy <tamas.lov.n...@gmail.com> wrote:
> 
> I ran into an issues with a multi-thread, multi-window app, where one or more 
> windows stop displaying after a while. […]

> And by saying a window stop displaying I mean there are subviews that has 
> been marked to be fully redrawn by setNeedsDisplay:YES on the main thread, 
> but views won’t be redrawn.

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?

> The window still processing events, so I can click on buttons for example 
> which sending their actions, etc. Also if I manually send a -display message 
> to [self window] the subviews going to be redrawn once, but then they are 
> stuck again.
> 
> I’ve overridden setNeedsDisplay: to check out what is going on, and of course 
> the views are on a valid NSWindow object, autoDisplay is enabled, and also 
> the window returns YES to viewsNeedsDisplay.
> 
> When the issue is happening the NSWindow object won’t call -display or 
> -displayIfNeeded, so probably this is why the window not getting redrawn.

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

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

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?

Regards,
Ken


_______________________________________________

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