Re: PDFKit and 64-bit bugs

Antonio Nunes <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On 6 Sep 2009, at 00:10, Christiaan Hofman 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.

Hi,

Now that I've received many more crash reports from users, and have some more data to share, I would like to revive this thread to see if we can provide Apple with at least enough information to fix the issues with the areaOfInterestForMouse: method.

I contrast to my earlier message on this thread, I have meanwhile indeed received crash reports concerning areaOfInterestForMouse:.

My app is garbage collected, and all reports I have received list architecture "X86 (Native)".

For Mac OS X 10.5 I have 4 reports on crashes in the areaOfInterestForMouse: method.
For Mac OS X 10.6 I have 30 reports on crashes in the areaOfInterestForMouse: method.

Breakdown of listed objc_msgSend() selectors in reports:
10.5.x: reports do not list selector
10.6.0: no crash reports received
10.6.1: countByEnumeratingWithState:objects:count: (12 reports)
10.6.2: countByEnumeratingWithState:objects:count: (13 reports)
10.6.2: adjustedBounds (3 reports)
10.6.2: two reports do not list selector

Some reports list a thread with a garbage collection work queue, some don't.

The most common crash signature at the top of the stack is this (it applies to all crashes in countByEnumeratingWithState:objects:countobjects:count:):

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x9748e917 objc_msgSend + 23
1   com.apple.PDFKit              	0x925b6f79 -[PDFPage characterIndexAtPoint:] + 130
2   com.apple.PDFKit              	0x925a27c6 -[PDFView areaOfInterestForMouse:] + 611

==========
Two other signatures exist on 10.6.2:

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation      	0x962b873d _CFArrayFastEnumeration + 109
1   com.apple.PDFKit              	0x9423c55f -[PDFPage(PDFPageInternal) loadTextBounds] + 432
2   com.apple.PDFKit              	0x9423af79 -[PDFPage characterIndexAtPoint:] + 130
3   com.apple.PDFKit              	0x942267c6 -[PDFView areaOfInterestForMouse:] + 611

==

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x92ce8964 prepareForMethodLookup + 71
1   libobjc.A.dylib               	0x92ce9c17 lookUpMethod + 86
2   libobjc.A.dylib               	0x92ce1367 _class_lookupMethodAndLoadCache + 40
3   libobjc.A.dylib               	0x92ce1156 objc_msgSend_stret + 86
4   com.apple.PDFKit              	0x9517ef79 -[PDFPage characterIndexAtPoint:] + 130
5   com.apple.PDFKit              	0x9516a7c6 -[PDFView areaOfInterestForMouse:] + 611
==========

The only other signature occurs on 10.5.6 :

Thread 0:
0   libSystem.B.dylib             	0x902131c6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x9021a9bc mach_msg + 72
2   libSystem.B.dylib             	0x9023e11c vm_allocate + 135
3   libSystem.B.dylib             	0x902f557c _simple_salloc + 52
4   libSystem.B.dylib             	0x902ef389 szone_error + 29
5   libSystem.B.dylib             	0x9021c8d6 allocate_pages + 223
6   libSystem.B.dylib             	0x9021d12d large_and_huge_malloc + 203
7   libSystem.B.dylib             	0x90214228 szone_malloc + 463
8   libSystem.B.dylib             	0x9021daed szone_realloc + 383
9   libSystem.B.dylib             	0x9021d92e malloc_zone_realloc + 88
10  libSystem.B.dylib             	0x9021d8a1 realloc + 209
11  com.apple.CoreGraphics        	0x92039c79 pdf_object_stack_push + 46
12  com.apple.CoreGraphics        	0x92041166 read_objects + 291
13  com.apple.CoreGraphics        	0x9204039b CGPDFScannerScan + 166
14  com.apple.CoreGraphics        	0x9210b5c8 CGPDFTextExtractorGetTextString + 53
15  com.apple.CoreGraphics        	0x9210b409 CGPDFPageCopyTextString + 41
16  com.apple.PDFKit              	0x930e1063 -[PDFPage(PDFPageInternal) loadTextChars] + 53
17  com.apple.PDFKit              	0x930de7a4 -[PDFPage characterIndexAtPoint:] + 122
18  com.apple.PDFKit              	0x930c8728 -[PDFView areaOfInterestForMouse:] + 611
==========

Before I file a detailed bug report with Apple, along with all the crash reports, I would like to know if any other PDFKit consumers have any information to add. The more info we have the better. We badly need Apple to tackle this issue.

Cheers,
António

----------------------------------------------------
A merry heart does good like medicine
----------------------------------------------------


-----------------------------------------------------------
Some things have to be believed to be seen.

--Ralph Hodgson
-----------------------------------------------------------
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.