• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crash in _blinkCaretTimerAction (NSTextView)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in _blinkCaretTimerAction (NSTextView)


  • Subject: Re: Crash in _blinkCaretTimerAction (NSTextView)
  • From: "Martin" <email@hidden>
  • Date: Mon, 09 Jan 2006 20:11:22 -0800

Douglas,

>> Is there anything more specific I might need to know? For instance, which
>> text view is responsible for the invalidation?
>
> Actually, to be more specific, the timer is invalidated when the
> NSTextViewSharedData is deallocated, which happens when all of the text
> views for a given layout manager have been deallocated.

I've continued debugging with this new information, but I still don't see what could be going wrong. I've posedAs NSTextViewSharedData and overridden _fixSharedData to view the sequence of events. Here is what I see:

I. The NSLayoutManager deallocates and releases all of its NSTextContainers.
	A. Each NSTextContainer deallocates.
		1. The container nils the container on its NSTextView.
			a. The NSTextView autoreleases its original shared data (call it "A").
			b. A new shared data instance (call it "B") is assigned to the NSTextView.
		2. The container releases its NSTextView causing it to deallocate.
			a. The new shared data "B" is released and deallocates.
II. An autorelease pool is popped and the original shared data "A" is deallocated.
III. Timer fires.
	B. _blinkCaretTimerAction tries to access an NSTextView deallocated in step 2 above.

If I understand this interaction correctly, the timers should all be invalid. The original shared data for the NSLayoutManager is deallocated in step II, while each temporary shared data is deallocated ASAP in step 2.a.

Is there any other line of investigation that you think I should follow? Thanks again,

~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

  • Follow-Ups:
    • Re: Crash in _blinkCaretTimerAction (NSTextView)
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Getting started with WebKit plugins
  • Next by Date: Re: Checkbox, Dictionary, Bindings
  • Previous by thread: Re: Crash in _blinkCaretTimerAction (NSTextView)
  • Next by thread: Re: Crash in _blinkCaretTimerAction (NSTextView)
  • Index(es):
    • Date
    • Thread