Re: Possible causes of "attempted layout while textStorage is editing"?
Re: Possible causes of "attempted layout while textStorage is editing"?
- Subject: Re: Possible causes of "attempted layout while textStorage is editing"?
- From: Gideon King <email@hidden>
- Date: Thu, 01 Sep 2011 16:08:19 +1000
Here is the complete stack trace
2011-08-31 15:25:11 -0400[5]: ERROR - 14764064ms (NMApplication.m:81) -[NMApplication handleRunException:] - NSException Exception encountered: -[AAMainEditingLayoutManager _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] *** attempted layout while textStorage is editing. It is not valid to cause the layoutManager to do layout while the textStorage is editing (ie the textStorage has been sent a beginEditing message without a matching endEditing.)
2011-08-31 15:25:11 -0400[5]: 0 CoreFoundation 0x00007fff8b3e0986 __exceptionPreprocess + 198
2011-08-31 15:25:11 -0400[5]: 1 libobjc.A.dylib 0x00007fff8bb11d5e objc_exception_throw + 43
2011-08-31 15:25:11 -0400[5]: 2 CoreFoundation 0x00007fff8b3e07ba +[NSException raise:format:arguments:] + 106
2011-08-31 15:25:11 -0400[5]: 3 CoreFoundation 0x00007fff8b3e0744 +[NSException raise:format:] + 116
2011-08-31 15:25:11 -0400[5]: 4 AppKit 0x00007fff89f1d0bc -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 432
2011-08-31 15:25:11 -0400[5]: 5 AppKit 0x00007fff89f1ccce -[NSLayoutManager(NSPrivate) _fillLayoutHoleAtIndex:desiredNumberOfLines:] + 203
2011-08-31 15:25:11 -0400[5]: 6 AppKit 0x00007fff89f1af46 _NSFastFillAllLayoutHolesUpToEndOfContainerForGlyphIndex + 500
2011-08-31 15:25:11 -0400[5]: 7 AppKit 0x00007fff89f1ac5e -[NSLayoutManager textContainerForGlyphAtIndex:effectiveRange:] + 223
2011-08-31 15:25:11 -0400[5]: 8 AppKit 0x00007fff89f1aa42 -[NSLayoutManager glyphRangeForTextContainer:] + 304
2011-08-31 15:25:11 -0400[5]: 9 NovaMind5 0x000000010014453c -[AARichTextModel recalculateSize] + 1640
2011-08-31 15:25:11 -0400[5]: 10 NMFoundation 0x0000000100476f2f -[MAKVObservation observeValueForKeyPath:ofObject:change:context:] + 122
2011-08-31 15:25:11 -0400[5]: 11 Foundation 0x00007fff8b83118a NSKeyValueNotifyObserver + 387
2011-08-31 15:25:11 -0400[5]: 12 Foundation 0x00007fff8b852387 NSKeyValueDidChange + 486
2011-08-31 15:25:11 -0400[5]: 13 Foundation 0x00007fff8b7fea2f -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 130
2011-08-31 15:25:11 -0400[5]: 14 CoreData 0x00007fff8f7e7007 _PF_ManagedObject_DidChangeValueForKeyIndex + 103
2011-08-31 15:25:11 -0400[5]: 15 CoreData 0x00007fff8f7e6558 _sharedIMPL_setvfk_core + 264
2011-08-31 15:25:11 -0400[5]: 16 NovaMind5 0x000000010016118e -[AATopicShapeModelBase setNewWidthForMainRect:fromOldWidth:] + 2657
2011-08-31 15:25:11 -0400[5]: 17 NovaMind5 0x00000001001606b4 -[AATopicShapeModelBase setNewSizeForMainRect:fromOldSize:] + 130
2011-08-31 15:25:11 -0400[5]: 18 NovaMind5 0x00000001001882e2 -[AAMapView(mouse) resizeTopicNodeVisual:usingHandle:withEvent:] + 2287
2011-08-31 15:25:11 -0400[5]: 19 NovaMind5 0x0000000100187721 -[AAMapView(mouse) mouseDown:] + 5283
2011-08-31 15:25:11 -0400[5]: 20 AppKit 0x00007fff89f4066e -[NSWindow sendEvent:] + 6280
2011-08-31 15:25:11 -0400[5]: 21 AppKit 0x00007fff89ed8f19 -[NSApplication sendEvent:] + 5665
2011-08-31 15:25:11 -0400[5]: 22 OmniAppKit 0x0000000100574900 -[OAApplication sendEvent:] + 144
2011-08-31 15:25:11 -0400[5]: 23 AppKit 0x00007fff89e6f42b -[NSApplication run] + 548
2011-08-31 15:25:11 -0400[5]: 24 OmniAppKit 0x0000000100571774 -[OAApplication run] + 132
2011-08-31 15:25:11 -0400[5]: 25 AppKit 0x00007fff8a0ed52a NSApplicationMain + 867
2011-08-31 15:25:11 -0400[5]: 26 NovaMind5 0x0000000100001688 start + 52
2011-08-31 15:25:11 -0400[5]: 27 ??? 0x0000000000000002 0x0 + 2
There are no other console log messages before this.
Regards
Gideon
On 01/09/2011, at 8:02 AM, Martin Wierschin wrote:
>> _fillLayoutHoleForChar acterRange:desiredNumberOfLines:isSoft: *** attempted layout while textStorage is editing. It is not valid to cause the layoutManager to do layout while the textStorage is editing (ie the textStorage has been sent a beginEditing message without a matching endEditing.)
>
> ...
>> I have not called begin editing or end editing at all, and there are no unmatched begin and end editing calls in my code, and there are no other threads editing the text storage. Nothing that I can see that would trigger this.
>
> That might be, but perhaps the begin/end editing calls are made for you automatically as part of some bigger operation your code (or the user) requested. For example, it might be that Apple's implementation of -[NSTextView changeFont:] wraps its changes in begin/end editing.
>
>> The offending line of code is:
>>
>> [layoutManager glyphRangeForTextContainer:[[layoutManager textContainers] firstObject]];
>
>
> When are you requesting this layout exactly? Can you post the full backtrace for the exception?
>
> I'd ask the user to submit a recent console log to see if there have been any other errors. It could be that an earlier exception is unwinding the stack during text storage editing, leaving the storage in its invalid state. You might also make sure the user isn't running any text system haxies.
>
> ~Martin
>
_______________________________________________
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