• 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: PDFDocument, ARC and 10.9 question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDFDocument, ARC and 10.9 question


  • Subject: Re: PDFDocument, ARC and 10.9 question
  • From: Totte Alm <email@hidden>
  • Date: Thu, 23 Jan 2014 17:37:15 +0100

> Your problem is likely well before that point, since it looks like the failure has to do with a font. Either the font is damaged somehow, or the reference is invalid.

OK, this is really weird.

It works well in a compiled app, it works well running all different tests under Instruments, but running debug mode in XCode it throuws the __cxa_throw exception.

I've never in 25 years of Mac development had a problem the only surfaces under the debugger. The opposite is more common though, but trackable  ;-)

/ Totte

>
> On Jan 17, 2014, at 4:22 AM, Totte Alm <email@hidden> wrote:
>
>> Hello again,
>>
>> Still debugging my CG -> ARC move and I'm stuck with one problem that I just can't understand.
>>
>> DEBUG SNIP WHERE THIS HAPPENS
>> 	_thePDF = [[PDFDocument alloc] initWithData:_data];
>> 	// test-
>>   if (_thePDF) {
>>       @try {
>>   *CRASHES HERE* ->  [_thePDF writeToFile:[NSString stringWithFormat:@"%@/PDFtemp-%f-h.pdf", NSTemporaryDirectory(), [[NSDate date] timeIntervalSince1970]]];
>>       }
>>       @catch (NSException *exception) {
>>           NSLog(@"Ex:%@", [exception description]);
>>       }
>>       @finally {
>>           // None
>>           ;
>>       }
>> 	}
>>   // - test
>>
>> This code crashes with the dump below, but only when running from XCode. If I run the app under instruments (using zombies or allications) it works as expected.
>> Anyone has a Ptr on what I'm missing.
>>
>> Thread 1, Queue : com.apple.main-thread
>> #0	0x00007fff8e1e8def in __cxa_throw ()
>> #1	0x00007fff8e65621a in TcmapEncodingTable::GetSubtable(unsigned short, unsigned short, unsigned short, unsigned short*) ()
>> #2	0x00007fff8e66852b in TcmapEncodingTable::TcmapEncodingTable(TSFNTFont const&, unsigned short, unsigned short, unsigned short) ()
>> #3	0x00007fff8e6858a5 in FPFontGetTrueTypeEncoding ()
>> #4	0x00007fff97090888 in get_truetype_encoding ()
>> #5	0x00007fff926aeb32 in CGFontGetTrueTypeEncoding ()
>> #6	0x00007fff926ae919 in lookup_glyphs_by_cmap_nonsymbolic ()
>> #7	0x00007fff926ae75c in lookup_glyphs_by_cmap ()
>> #8	0x00007fff926ae6ed in get_truetype_glyph_vector ()
>> #9	0x00007fff926adf53 in CGPDFEncodingGetGlyphVector ()
>> #10	0x00007fff926ada20 in simple_draw ()
>> #11	0x00007fff926ad96a in CGPDFTextLayoutDrawGlyphs ()
>> #12	0x00007fff926ac0e1 in op_TJ ()
>> #13	0x00007fff9264144d in pdf_scanner_handle_xname ()
>> #14	0x00007fff92640753 in CGPDFScannerScan ()
>> #15	0x00007fff9263ea53 in CGPDFDrawingContextDrawPage ()
>> #16	0x00007fff9263e808 in pdf_page_draw_in_context ()
>> #17	0x00007fff9263e7a8 in CGContextDrawPDFPage ()
>> #18	0x00007fff900f9d77 in -[PDFPage(PDFPagePrivate) drawWithBox:inContext:] ()
>> #19	0x00007fff900f4f31 in -[PDFDocument(PDFDocumentInternal) writeToConsumer:withOptions:] ()
>> #20	0x00007fff900f11e9 in -[PDFDocument writeToURL:withOptions:] ()
>> #21	0x00007fff900f10c6 in -[PDFDocument writeToFile:withOptions:] ()
>> #22	0x00007fff900f1083 in -[PDFDocument writeToFile:] ()
>> #23	0x00000001000d5549 in -[FlaggingsObject getPreview:] at xxx/FlaggingsObject.m:107
>>
>> Btw, thx Ken Tomases for the "tampoline" idea, works perfect.
>>
>> / Totte
>>
>>
>> _______________________________________________
>>
>> 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
>
> --
> David Duncan
>


_______________________________________________

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: 
 >PDFDocument, ARC and 10.9 question (From: Totte Alm <email@hidden>)
 >Re: PDFDocument, ARC and 10.9 question (From: David Duncan <email@hidden>)

  • Prev by Date: Re: How to choose different implementations of an object method at runtime?
  • Next by Date: Re: How to choose different implementations of an object method at runtime?
  • Previous by thread: Re: PDFDocument, ARC and 10.9 question
  • Next by thread: Any way to determine where a string will be truncated?
  • Index(es):
    • Date
    • Thread