• 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: NSGraphicsContext PDF crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSGraphicsContext PDF crash


  • Subject: Re: NSGraphicsContext PDF crash
  • From: Wim Lewis <email@hidden>
  • Date: Mon, 3 Jan 2011 16:25:08 -0800

On 3 Jan 2011, at 4:10 PM, Wesley Smith wrote:
> Then, I do
>
> [NSGraphicsContext setCurrentContext:ctx];
> [[NSColor blackColor] set];
> NSBezierPath *p = [[NSBezierPath bezierPath] retain];
> [p lineToPoint:NSMakePoint(100, 100)];  // <----------------- crashes here
> [p stroke];
>
>
> Top of the stack on crash:
> #0	0x1726448f in PDFContentStreamDrawPath
> #1	0x17264ec6 in pdf_DrawPath
> #2	0x9845f545 in rips_DrawPath
> #3	0x900dd7af in CGContextDrawPath
> #4	0x900dd6fa in CGContextFillPath
> #5	0x9009db5c in CGContextFillRect
> #6	0x9087b072 in CUIRenderer::DrawWindowFrameDark
> #7	0x9087dc2f in CUIRenderer::Draw
> #8	0x92f06230 in _NSDrawThemeBackground
> #9	0x92fcd63b in -[NSGrayFrame drawWindowBackgroundRegion:]
> <snip>


Are you sure this crash corresponds to your code? It looks like this is crashing when Cocoa tries to draw a window border, but the lowest-level frames are PDF-related. Are you perhaps allowing the NSGraphicsContext to outlive the CGPDFGraphicsContext it references?


_______________________________________________

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

  • Follow-Ups:
    • Re: NSGraphicsContext PDF crash
      • From: Wesley Smith <email@hidden>
References: 
 >NSGraphicsContext PDF crash (From: Wesley Smith <email@hidden>)

  • Prev by Date: NSGraphicsContext PDF crash
  • Next by Date: Re: NSGraphicsContext PDF crash
  • Previous by thread: NSGraphicsContext PDF crash
  • Next by thread: Re: NSGraphicsContext PDF crash
  • Index(es):
    • Date
    • Thread