another NSCFDictionary and GC problem?
another NSCFDictionary and GC problem?
- Subject: another NSCFDictionary and GC problem?
- From: Markus Guhe <email@hidden>
- Date: Thu, 5 Feb 2009 11:23:29 +0000
Hi all,
I get the following elusive crash (about once in 20 app launches). It
happens while decoding a dictionary using an NSKeyedUnarchiver from a
saved file when my application starts. The value of the dictionary
that causes this problem is an attributed string, and the crash only
occurs if the string that's being decoded contains a non-text
attachment (if it is an RTFD string).
The problem only occurs if GC is turned on (and only on slower
machines or when starting it with the standard Development profile
from Xcode). It always occurs at this point in NSCFDictionary.
I saw the recent discussion on NSCFDictionary and GC thread on this
list. Could this be related?
I've been banging my head over this for some time now; so any help or
hint is greatly appreciated! If this is a problem in the library: is
there a workaround?
Markus
Process: SlipBox [3177]
Path: /Applications/SlipBox.app/Contents/MacOS/SlipBox
Identifier: net.markusguhe.slipbox
Version: 0.9-b1 (213)
Code Type: PPC (Native)
Parent Process: launchd [76]
Date/Time: 2009-02-01 13:21:16.478 +0100
OS Version: Mac OS X 10.5.6 (9G55)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000028
Crashed Thread: 0
Application Specific Information:
objc[3177]: garbage collection is ON
Thread 0 Crashed:
0 libobjc.A.dylib 0xfffeff18 objc_msgSend_rtp + 24
1 com.apple.Foundation 0x92fc4564 -[NSCFDictionary
setObject:forKey:] + 288
2 com.apple.AppKit 0x90287afc -[NSRTFD
setObject:forKey:] + 340
3 com.apple.AppKit 0x90343f44 -[NSAKDeserializer
deserializePList:] + 596
4 com.apple.AppKit 0x90343cc0 -[NSDocumentDeserializer
deserializeNewPList] + 88
5 com.apple.AppKit 0x90343a5c -
[NSRTFD(NSSerializationSupport) initWithPasteboardDataRepresentation:]
+ 196
6 com.apple.AppKit 0x90343484 -[NSFileWrapper
initWithSerializedRepresentation:] + 104
7 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
8 com.apple.Foundation 0x92fd17d8 _decodeObject + 168
9 com.apple.AppKit 0x905553ac -[NSTextAttachment
initWithCoder:] + 216
10 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
11 com.apple.Foundation 0x92fd3148 -[NSKeyedUnarchiver
_decodeArrayOfObjectsForKey:] + 916
12 com.apple.Foundation 0x92ff0330 -
[NSDictionary(NSDictionary) initWithCoder:] + 804
13 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
14 com.apple.Foundation 0x92fd3148 -[NSKeyedUnarchiver
_decodeArrayOfObjectsForKey:] + 916
15 com.apple.Foundation 0x92fd370c -[NSArray(NSArray)
initWithCoder:] + 572
16 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
17 com.apple.Foundation 0x92fd17d8 _decodeObject + 168
18 com.apple.Foundation 0x92ff097c
_NSReadMutableAttributedStringWithCoder + 580
19 com.apple.Foundation 0x92ff05ac -[NSAttributedString
initWithCoder:] + 76
20 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
21 com.apple.Foundation 0x92fd17d8 _decodeObject + 168
22 net.markusguhe.slipbox 0x00003088 -[Slip initWithCoder:] +
116
23 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
24 com.apple.Foundation 0x92fd3148 -[NSKeyedUnarchiver
_decodeArrayOfObjectsForKey:] + 916
25 com.apple.Foundation 0x92ff0330 -
[NSDictionary(NSDictionary) initWithCoder:] + 804
26 com.apple.Foundation 0x92fd21e8 _decodeObjectBinary + 2376
27 com.apple.Foundation 0x92fd17d8 _decodeObject + 168
28 net.markusguhe.slipbox 0x0001582c -[Box
readFromData:ofType:error:] + 364
29 com.apple.AppKit 0x9041af1c -[NSDocument
readFromURL:ofType:error:] + 684
30 net.markusguhe.slipbox 0x000156ac -[Box
readFromURL:ofType:error:] + 40
31 com.apple.AppKit 0x90303e04 -[NSDocument
initWithContentsOfURL:ofType:error:] + 260
32 com.apple.AppKit 0x902d7860 -[NSDocumentController
makeDocumentWithContentsOfURL:ofType:error:] + 328
33 com.apple.AppKit 0x902d6f4c -[NSDocumentController
openDocumentWithContentsOfURL:display:error:] + 340
34 net.markusguhe.slipbox 0x0000cb90 -[SlipBoxController
openDocumentWithContentsOfURL:display:error:] + 1080
35 net.markusguhe.slipbox 0x0000d1dc -[SlipBoxController
openDefaultDocIfNothingYetOpen] + 616
36 net.markusguhe.slipbox 0x0000a500 -[SlipBoxApplication
applicationWillFinishLaunching:] + 80
37 com.apple.Foundation 0x92fc8064 _nsnote_callback + 196
38 com.apple.CoreFoundation 0x935927c8
_CFXNotificationPostNotification + 920
39 com.apple.Foundation 0x92fc57bc -[NSNotificationCenter
postNotificationName:object:userInfo:] + 88
40 com.apple.AppKit 0x90037fdc -[NSApplication
finishLaunching] + 424
41 com.apple.AppKit 0x90037b18 -[NSApplication run] + 96
42 com.apple.AppKit 0x9000879c NSApplicationMain + 440
43 net.markusguhe.slipbox 0x00001d14 start + 64
Thread 1:
0 libSystem.B.dylib 0x94bd1b6c __semwait_signal + 12
1 libSystem.B.dylib 0x94c0e3cc _pthread_cond_wait + 1580
2 libauto.dylib 0x961fd0a8
auto_collection_thread(void*) + 104
3 libSystem.B.dylib 0x94c0d024 _pthread_start + 316
--
email@hidden
http://markusguhe.net/prof/
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
_______________________________________________
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