Re: Crash in _blinkCaretTimerAction (NSTextView)
Re: Crash in _blinkCaretTimerAction (NSTextView)
- Subject: Re: Crash in _blinkCaretTimerAction (NSTextView)
- From: "Martin" <email@hidden>
- Date: Tue, 10 Jan 2006 20:49:59 -0800
Replying to myself here, but I've found the problem.
>If I understand this interaction correctly, the timers should all be invalid.
All the shared data instances assigned via NSTextView's _fixSharedData deallocate before the timer fires. Based on that I decided to check for NSTimers that weren't part of the shared data. I set breakpoints on CFRunLoopTimerCreate and found the source of the additional timer:
#0 CFRunLoopTimerCreate
#1 -[NSTextView(NSSharing) updateInsertionPointStateAndRestartTimer:]
#3 -[NSLayoutManager(NSPrivate) _invalidateDisplayIfNeeded]
#4 -[NSLayoutManager textContainerForGlyphAtIndex:effectiveRange:]
..
#15 -[NTTextStorage processEditing]
#16 -[NSTextStorage endEditing]
..
#21 -[NTTextView(TypingSupport) insertNewline:]
#22 -[NTTextView performSelector:withObject:]
#23 -[NSTextView doCommandBySelector:]
#24 -[NSKeyBindingManager interpretEventAsCommand:forClient:]
#25 -[NSTSMInputContext interpretKeyEvents:]
#26 -[NSView interpretKeyEvents:]
#27 -[NSTextView keyDown:]
If I prevent NSTextView's updateInsertionPointStateAndRestartTimer method from doing anything when NSLayoutManager is invalidating display then the crashing bug is gone.
~Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden