Re: PDFKit and 64-bit bugs

"Adam R. Maxwell" <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Sep 6, 2009, at 1:37 AM, Ken Ferry wrote:

> Since these problems are so easy for you to reproduce, you might  
> consider
> tossing in a demo that exercises the bug.  I don't think the repro  
> steps can
> really be as generic as they seem. For example, one says "Whenever I  
> try to
> get the attributedString property of a PDFPage object, I get a  
> warning that
> a deallocated object is autoreleased."  Well, Preview is a 64 bit  
> app that
> uses PDFKit.  I just tried calling attributedString in there via  
> gdb, and it
> seemed to work okay.

Does PyObjC count?  On 10.6 this crashes reliably:

#!/usr/bin/env python
from Quartz import *
path = "/Developer/About Xcode.app/Contents/Resources/English.lproj/ 
About Xcode.pdf"
doc = PDFDocument.alloc().initWithURL_(NSURL.fileURLWithPath_(path))
print doc.pageAtIndex_(0).attributedString().length()

It's equally trivial to reproduce in an Obj-C app, at least one that's  
not garbage collected.  Replace the last line with

x = PDFBorder.alloc().init().dashPattern()

to see the other crash that Christiaan mentioned.

> A bug that is reproducible is fixable.  A bug report that is  
> obviously valid
> and reproducible is easy pickings. :-)
>
> -Ken
>
> On Sat, Sep 5, 2009 at 3:10 PM, Christiaan Hofman  
> <[email protected]>wrote:
>
>> I've finally moved to upgrade a PDFKit app to 64-bits. However,  
>> it's giving
>> me all kinds of crashers which I'm pretty sure are bugs in PDFKit.  
>> It seems
>> that whenever I call -[PDFBorder dashPattern] or -[PDFPage  
>> attributedString]
>> it crashes, and on 10.5.8 also -[PDFView areaOfInterestForMouse:]  
>> (though
>> that seems to originate in -[PDFPage loadTextChars]). I've found  
>> some ugly
>> workarounds for the first two, but the last one remains illusive.
>>
>> I wonder whether others on this list had similar problems? And in
>> particular, whether others know workarounds for these bugs, in  
>> particular
>> the third one?
>>
>> Thanks,
>> Christiaan
>>
>> _______________________________________________
>> MacOSX-dev mailing list
>> [email protected]
>> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>>
> _______________________________________________
> MacOSX-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/macosx-dev

_______________________________________________
MacOSX-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.