On Sep 5, 2009, at 14:13, Christiaan Hofman wrote: > > On Sep 5, 2009, at 11:43, Christiaan Hofman wrote: > >> >> On Sep 5, 2009, at 2:50, Adam R. Maxwell wrote: >> >>> >>> On Sep 4, 2009, at 4:08 PM, Christiaan Hofman wrote: >>> >>>> On Sat, Sep 5, 2009 at 1:00 AM, Maxwell, Adam R <adam.maxw...@pnl.gov >>>> > wrote: >>>> On 09/04/09 15:49, "Christiaan Hofman" <cmhof...@gmail.com> wrote: >>>> >>>> > Even on Leopard? How could Apple have this bug for so long >>>> then? And >>>> > what baffles me is how Preview can get away with this. >>>> >>>> Yes, I forgot to say I was running 10.5.8 here. I should see if >>>> a sample >>>> program that calls areaOfInterestForMouse: also crashes. >>>> >>>> I do know that a trivial 64-bit executable that uses either - >>>> [PDFBorder dashPattern] or -[PDFPage attributedString] crashes on >>>> 10.6, reliably. With 32-bits the latter gives warnings about >>>> overreleasing objects. >>> >>> Ouch. I see a crash with -attributedString on 10.6 (64 bit), but >>> calling areaOfInterestForMouse: on 10.6 (64 bit) seems to work, in >>> a test app and in Skim. Regardless, it looks like PDF Kit is >>> broken with x86_64 on 10.5 and 10.6. >>> >>> I set a breakpoint on -[PDFPage attributedString] in Preview, but >>> couldn't hit it. >> >> I can imagine they won't use it very much, or perhaps not at all. I >> think Skim only uses -[PDFPage attributedString] for AppleScript. >> And as for -[PDFBorder dashPattern], they may not use it because >> you cannot control that in Preview (it's set to a fixed value). So >> apparently Preview just got lucky not to hit the problem spots. Or >> more likely, they weren't discovered by Apple because Preview >> didn't hit them. >> >> I am actually more worried about the 10.5 bug, because it's far >> less likely to be fixed soon. Also, for the attributedString I have >> a workaround (by leaking it), but not for the others. >> >> Christiaan >> > > I found workarounds for the bugs in 10.6. I wonder if those bugs are > present on 10.5.8. Pretty ugly though. Adam could you test this on > 10.5.8? To see the PDFBorder bug, simply try to add a new note with > a line style (e.g. circle). If it succeeds, there's no bug, > otherwise it crashes. > > Christiaan
And now I know why PDFKit doesn't work on 64 bits. They are really messing up writing to ivars. Remember they use weird private classes to hide the ivars. This means they must be using runtime functions to read/write to these ivars, because these private classes don't have accessors. However, they're doing it wrong: they're writing the values for the ivars to the /addresses/ of the ivars rather than the ivars itself! So when they write or read something like an integer, they get into problems on 64-bits because they're not pointer-size anymore. This is absolutely incredible. Bug filed. Christiaan ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop