Skip navigation.
 
mlNSRunStorage and _NSBlockNumberForIndex exceptions...
FROM : Keith Blount
DATE : Sun Nov 11 22:22:27 2007

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

Related mailsAuthorDate
mlNSRunStorage and _NSBlockNumberForIndex exceptions... Keith Blount Nov 11, 22:22
mlRe: NSRunStorage and _NSBlockNumberForIndex exceptions... Keith Blount Nov 12, 00:13