Re: Progress bar problems on server persist
Re: Progress bar problems on server persist
- Subject: Re: Progress bar problems on server persist
- From: Ken Thomases <email@hidden>
- Date: Thu, 05 May 2016 09:31:26 -0500
On May 5, 2016, at 9:15 AM, Steve Mills <email@hidden> wrote:
>
> A while back I started a thread about NSProgressIndicator locking up on a Mac with no monitor. The suggested fix was to change them to use timers instead of threads for animation.
Where did the idea to use timers come from?
> We thought that fixed it, but no, it's back. Any other ideas on how to fix this? We put in a workaround to not show the window on launch on the servers, and only show it if we need to vnc to it, but then need to remember to quit and relaunch the app before we log out. Again, this is 10.10.x. IT hasn't OK'd 10.11 yet. Corporate @$^%^&*. The relevant part of the stuck thread is below.
>
> thread #12: tid = 0x5cd6a1, 0x00007fff8955b4de libsystem_kernel.dylib`mach_msg_trap + 10, name = 'ProofProcessor - 000010'
> * frame #0: 0x00007fff8955b4de libsystem_kernel.dylib`mach_msg_trap + 10
> frame #1: 0x00007fff8955a64f libsystem_kernel.dylib`mach_msg + 55
> frame #2: 0x00007fff8f0db727 CoreGraphics`_CGSSynchronizeWindowBackingStore + 110
> frame #3: 0x00007fff8f09f087 CoreGraphics`CGSWindowSynchronizeBacking + 40
> frame #4: 0x00007fff8f09ed68 CoreGraphics`lock_window_backing + 910
> frame #5: 0x00007fff8f09e8ab CoreGraphics`CGSDeviceLock + 52
> frame #6: 0x0000000106ba9f94 libRIP.A.dylib`ripd_Lock + 40
> frame #7: 0x0000000106ba88dd libRIP.A.dylib`RIPLayerBltImage + 283
> frame #8: 0x0000000106ba8591 libRIP.A.dylib`ripc_RenderImage + 265
> frame #9: 0x0000000106bae643 libRIP.A.dylib`ripc_EndLayer + 1204
> frame #10: 0x00007fff8f0b34a7 CoreGraphics`CGContextEndTransparencyLayer + 53
> frame #11: 0x00007fff8c97c19a CoreUI`CUICoreThemeRenderer::DrawProgressBar(CUIDescriptor const*) + 2904
> frame #12: 0x00007fff8c977ea9 CoreUI`CUICoreThemeRenderer::Draw(CUIDescriptor const*, CGAffineTransform, CUIReturnInfo&) + 405
> frame #13: 0x00007fff8c94b391 CoreUI`CUIRenderer::Draw(CGRect, CGContext*, __CFDictionary const*, __CFDictionary const**) + 2275
> frame #14: 0x00007fff8c987d6e CoreUI`CUIDraw + 217
> frame #15: 0x00007fff8db7aada AppKit`__44-[NSAppearance _drawInRect:context:options:]_block_invoke + 64
> frame #16: 0x00007fff8dae8f6b AppKit`-[NSCompositeAppearance _callCoreUIWithBlock:] + 183
> frame #17: 0x00007fff8db7aa93 AppKit`-[NSAppearance _drawInRect:context:options:] + 127
> frame #18: 0x00007fff8de7be84 AppKit`-[NSProgressIndicator _drawBar:] + 498
> frame #19: 0x00007fff8e15e364 AppKit`-[NSProgressIndicator _animationIdler:] + 800
> frame #20: 0x00007fff86f8aa23 Foundation`__NSFireTimer + 95
> frame #21: 0x00007fff8d7f82e4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
> frame #22: 0x00007fff8d7f7f73 CoreFoundation`__CFRunLoopDoTimer + 1059
> frame #23: 0x00007fff8d86b53d CoreFoundation`__CFRunLoopDoTimers + 301
> frame #24: 0x00007fff8d7b3608 CoreFoundation`__CFRunLoopRun + 2024
> frame #25: 0x00007fff8d7b2bd8 CoreFoundation`CFRunLoopRunSpecific + 296
> frame #26: 0x00007fff86fcfb29 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 278
> frame #27: 0x00007fff86fedd9e Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 108
> frame #28: 0x0000000100271208 RRD`-[RESTClient sendRESTCall:] + 1032
This doesn't look like the main thread. Why is anything involving a progress indicator happening on a non-main and non-private-to-AppKit thread? Are you manipulating the GUI from background threads (like setting the progress bar's value)?
Also, if you run a run loop to wait for some specific source — as RRD`-[RESTClient sendRESTCall:] appears to be doing — you should basically always schedule that source on a private mode and run the run loop in that mode. That prevents any other unknown sources from firing.
Finally, what are the other threads doing when this happens? It may be a conflict between threads.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden