Bug in 2.2.0.5 (17148)

I’m hitting a bug trying to Sync my project to an external folder. I have the Sync button on my toolbar, and when I hit it, it always fails at the same point. Scrivener just hangs forever, and I have to Force Quit to get out. I just updated to the latest beta and still hit it, so here you go. 0-]

Console log is below:

4/26/12 9:51:36.197 AM Scrivener: NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds

4/26/12 9:51:36.199 AM Scrivener: (
	0   CoreFoundation                      0x91059b67 __raiseError + 231
	1   libobjc.A.dylib                     0x977f9149 objc_exception_throw + 155
	2   CoreFoundation                      0x90fc1369 +[NSException raise:format:arguments:] + 137
	3   CoreFoundation                      0x90fc12d9 +[NSException raise:format:] + 57
	4   Foundation                          0x91f871b8 -[NSRLEArray objectAtIndex:effectiveRange:] + 115
	5   Foundation                          0x91f8cfd8 -[NSConcreteMutableAttributedString attribute:atIndex:effectiveRange:] + 51
	6   AppKit                              0x99eeab7e -[NSRTFWriter writeCellTerminator:atIndex:nestingLevel:] + 394
	7   AppKit                              0x99eecfc1 -[NSRTFWriter writeBody] + 5182
	8   AppKit                              0x99eea25e -[NSRTFWriter writeRTF] + 120
	9   AppKit                              0x99ee9bb7 -[NSRTFWriter RTF] + 34
	10  AppKit                              0x99c516e8 -[NSAttributedString(NSAttributedStringKitAdditions) dataFromRange:documentAttributes:error:] + 780
	11  AppKit                              0x99c4c56a -[NSAttributedString(NSAttributedStringKitAdditions) RTFFromRange:documentAttributes:] + 136
	12  ScrAppKit                           0x0039e686 -[NSAttributedString(KBAdditions) scrivenerPackageRTFFromRange:documentAttributes:isMainText:] + 3154
	13  Scrivener                           0x0024748b Scrivener + 2385035
	14  Scrivener                           0x0024715c Scrivener + 2384220
	15  Scrivener                           0x00246b52 Scrivener + 2382674
	16  Scrivener                           0x00019d0d Scrivener + 101645
	17  Scrivener                           0x0027297c Scrivener + 2562428
	18  Scrivener                           0x002713ed Scrivener + 2556909
	19  Scrivener                           0x00271c41 Scrivener + 2559041
	20  Scrivener                           0x000e0c7a Scrivener + 916602
	21  CoreFoundation                      0x90faede1 -[NSObject performSelector:withObject:] + 65
	22  AppKit                              0x9a045108 -[NSToolbarButton sendAction:to:] + 99
	23  AppKit                              0x9a045166 -[NSToolbarButton sendAction] + 82
	24  AppKit                              0x99b14778 -[NSToolbarItemViewer mouseDown:] + 5944
	25  AppKit                              0x99a38ca5 -[NSWindow sendEvent:] + 7533
	26  AppKit                              0x999d10e7 -[NSApplication sendEvent:] + 4788
	27  Scrivener                           0x00048935 Scrivener + 293173
	28  AppKit                              0x999626d5 -[NSApplication run] + 1007
	29  AppKit                              0x99bf6261 NSApplicationMain + 1054
	30  Scrivener                           0x00002dc9 Scrivener + 7625
	31  Scrivener                           0x00002ce8 Scrivener + 7400
)

That looks like an internal Apple error in trying to write to RTF (it’s unlikely to be related to the new beta specifically). Could you please zip up and send the project to us at mac.support AT literatureandlatte DOT com for testing?

Thanks!

All the best,
Keith