• 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: Context leak detected, msgtracer returned -1 ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Context leak detected, msgtracer returned -1 ?


  • Subject: Re: Context leak detected, msgtracer returned -1 ?
  • From: Jonathan Mitchell <email@hidden>
  • Date: Mon, 22 May 2017 23:17:05 +0100

> On 22 May 2017, at 22:24, Greg Parker <email@hidden> wrote:
>
>
>> On May 22, 2017, at 8:52 AM, Jonathan Mitchell <email@hidden <mailto:email@hidden>> wrote:
>>
>> Context leak detected, msgtracer returned -1
>>
>
> The context is an IOAccelContext, which itself is deep in the graphics machinery. The log complains once for every 512 objects allocated. Try setting a breakpoint on IOAccelLogContextLeak or fprintf.
>
> You should also file a bug report that this log is too vague.
>
>
> --
> Greg Parker     email@hidden <mailto:email@hidden>     Runtime Wrangler
>
Thanks for that.

I can now see that an observation is triggering a button redraw.
I am processing a collection at this stage so the button redraw code is probably getting hammered.
This is in a tight loop and [NSView displayIfNeeded] is called repeatedly.
Removing this display update request silences the warning.

#0	0x00007fff8967b5c4 in IOAccelLogContextLeak ()
#1	0x00007fff8967c75d in IOAccelCommandQueueCreateWithQoS ()
#2	0x00007fff7e1de805 in -[MTLIOAccelCommandQueue initWithDevice:descriptor:] ()
#3	0x00007fff7b4f4d45 in CIMetalCommandQueueCreate ()
#4	0x00007fff7b4e621c in CI::MetalContext::init(void const*) ()
#5	0x00007fff7b3e332f in +[CIContext(Internal) internalContextWithMTLDevice:options:] ()
#6	0x00007fff7b3ddcd8 in -[CIContext initWithOptions:] ()
#7	0x00007fff7b3dd9f2 in +[CIContext contextWithOptions:] ()
#8	0x00007fff788b96e9 in -[NSCIImageRep CGImageForProposedRect:context:hints:] ()
#9	0x00007fff785879ff in -[NSImage _newSnapshotRepForRep:rect:context:processedHints:] ()
#10	0x00007fff785542c2 in -[NSImage _snapshotRepForRep:rect:context:processedHints:] ()
#11	0x00007fff78a0fcdb in __71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1352 ()
#12	0x00007fff78553543 in -[NSImage _usingBestRepresentationForRect:context:hints:body:] ()
#13	0x00007fff785907e8 in -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] ()
#14	0x00007fff78587480 in -[NSImage _drawMappingAlignmentRectToRect:withState:backgroundStyle:operation:fraction:flip:hints:] ()
#15	0x00007fff78586d93 in -[NSButtonCell drawImage:withFrame:inView:] ()
#16	0x00000001004efc7f in -[BPTimelineButtonCell drawImage:withFrame:inView:] at BPTimelineButtonCell.m:77
#17	0x00007fff78586650 in -[NSButtonCell _configureAndDrawImageWithRect:cellFrame:controlView:] ()
#18	0x00007fff78586285 in -[NSButtonCell drawInteriorWithFrame:inView:] ()
#19	0x00000001004ef525 in -[BPTimelineButtonCell drawInteriorWithFrame:inView:] at BPTimelineButtonCell.m:28
#20	0x00007fff7858531a in -[NSButtonCell drawWithFrame:inView:] ()
#21	0x00000001004ef42c in -[BPTimelineButtonCell drawWithFrame:inView:] at BPTimelineButtonCell.m:19
#22	0x00007fff785850d1 in -[NSControl drawRect:] ()
#23	0x00007fff7857cf99 in -[NSView _drawRect:clip:] ()
#24	0x00007fff785ccf2f in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#25	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#26	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#27	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#28	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#29	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#30	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#31	0x00007fff785cd39a in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#32	0x00007fff7857aad2 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] ()
#33	0x00007fff785786d8 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#34	0x00007fff78573fca in -[NSView displayIfNeeded] ()
#35	0x00000001001eb5be in -[BPTimelineButton setButtonHighlight:] at BPTimelineButton.m:211
#36	0x00000001001eb227 in -[BPTimelineButton highlightForOffState] at BPTimelineButton.m:134
#37	0x00000001001eb197 in -[BPTimelineButton stateDidChange] at BPTimelineButton.m:123
#38	0x00000001001eb29e in -[BPTimelineButton setEnabled:] at BPTimelineButton.m:147
#39	0x000000010005011d in -[BPPayslipTimelineButton setButtonStatus:] at BPPayslipTimelineButton.m:145
#40	0x0000000100051104 in -[BPPayslipTimelineButton observeValueForKeyPath:ofObject:change:context:] at BPPayslipTimelineButton.m:277

_______________________________________________

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

References: 
 >Context leak detected, msgtracer returned -1 ? (From: Jonathan Mitchell <email@hidden>)
 >Re: Context leak detected, msgtracer returned -1 ? (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Context leak detected, msgtracer returned -1 ?
  • Next by Date: inactive menu item
  • Previous by thread: Re: Context leak detected, msgtracer returned -1 ?
  • Next by thread: inactive menu item
  • Index(es):
    • Date
    • Thread