NSRunStorage and _NSBlockNumberForIndex exceptions...
NSRunStorage and _NSBlockNumberForIndex exceptions...
- Subject: NSRunStorage and _NSBlockNumberForIndex exceptions...
- From: Keith Blount <email@hidden>
- Date: Sun, 11 Nov 2007 13:22:27 -0800 (PST)
Hi,
In my program I have been getting the following error message in the debugger console from time to time:
2007-11-11 21:10:11.269 AppName[39092:813] Exception raised while text storage 0x126ab1d0 was responding to font set changed notification: *** NSRunStorage, _NSBlockNumberForIndex(): index (16572) beyond array bounds (16571)
2007-11-11 21:10:11.273 AppName[39092:813] Exception raised during background layout: *** NSRunStorage, _NSBlockNumberForIndex(): index (16572) beyond array bounds (16571)
My app holds a number of documents and you can browse through them (basically like an outliner). It uses an NSTextStorage subclass to display these documents, which does nothing special other than provide a running word count. The above exceptions occur apparently randomly, but are clearly associated with a particular document in the app: the index and bounds numbers match with a text that has an NSFormFeedCharacter as the first character, though I have tried inserting this character at the beginning of other texts to see if loading them throws a similar exception with little luck so far. The exception usually occurs when browsing through documents in a different window, or when the window containing this document either loses or gains focus.
It looks as though it could be my text storage subclass, I suppose, which can be downloaded here:
http://www.literatureandlatte.com/freestuff/KBWordCountingTextStorage.zip
If anyone has any ideas about what might be causing this, I would be very grateful (this is running on Leopard, btw).
Thanks and all the best,
Keith
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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