Re: NSLayoutManager Background Layout Crash
Re: NSLayoutManager Background Layout Crash
- Subject: Re: NSLayoutManager Background Layout Crash
- From: Philip Dow <email@hidden>
- Date: Mon, 1 Aug 2005 19:04:40 +0200
John, looks like I found the problem. I was focusing on the wrong
text object, the main textview in my program. That's not where the
trouble is. Every now and then I'm creating an autoreleased NSText
object on another thread to do some work that I should be doing with
an attributed string. Looks like this thing or some of its associated
objects are being released before I and the layout manager are
actually finished working with them. So not just a few attributes,
but an entire set of text storage objects!
Thanks for the help,
-Phil
http://phildow.net
Am Jul 29, 2005 um 8:10 PM schrieb John Brownlow:
look for a non-retained attribute, such as a paragraph style or
something similar, that gets applied to the text and is then
prematurely released.
On Jul 29, 2005, at 1:57 PM, phil wrote:
__objc_error indicates an internal error detected by the
Objective-C
runtime. There are a variety of things that can cause it, but none
of them are particularly common. It's possible there's a memory
smasher that has overwritten something in the runtime. I believe
it's also possible for this to occur in some cases from use of a
dangling reference to a released object. Try running (a) with
zombies enabled, and (b) with libgmalloc.
Will do and see what I come up with. A problem though, is that an
__objc_error is not always responsble for bringing
the program down. Two other reports (from _NSPostBackgroundLayout
on), look like this:
0 com.apple.CoreFoundation 0x9028def0
__CFArrayRepositionDequeRegions + 56
1 com.apple.CoreFoundation 0x90285e6c _CFArrayReplaceValues
+ 1472
2 com.apple.Foundation 0x90afc4f4 -[NSCFArray
removeLastObject] + 192
3 com.apple.AppKit 0x9254a3bc -[NSSortedArray
removeLastObject] + 48
4 com.apple.Foundation 0x90b11240 -[NSMutableArray
removeAllObjects] + 68
5 com.apple.AppKit 0x9253db98 -[NSLayoutManager
(NSPrivate)
_fillLayoutHoleAtIndex:desiredNumberOfLines:] + 2720
6 com.apple.AppKit 0x9258fa50 +[NSLayoutManager
(NSPrivate) _doSomeBackgroundLayout] + 556
7 com.apple.AppKit 0x9258f6a0
_NSPostBackgroundLayout + 364
...
0 com.apple.AppKit 0x92e782ac -
[NSLayoutManager setTextContainer:forGlyphRange:] + 0x17c
1 com.apple.AppKit 0x92eea9cc -[NSLayoutManager
(NSPrivate)
_doLayoutWithFullContainerStartingAtGlyphIndex:nextGlyphIndex:] +
0xe0
2 com.apple.AppKit 0x92e88a84 -[NSLayoutManager
(NSPrivate)
_fillLayoutHoleAtIndex:desiredNumberOfLines:] + 0x4e8
3 com.apple.AppKit 0x92f11af0 +[NSLayoutManager
(NSPrivate) _doSomeBackgroundLayout] +
0x224
4 com.apple.AppKit 0x92edd7e0
_NSPostBackgroundLayout + 0xa0
...
-Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40johnbrownlow.com
This email sent to email@hidden
_______________________________________________
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