NSOutlineView blowing stack
NSOutlineView blowing stack
- Subject: NSOutlineView blowing stack
- From: Tom Harrington <email@hidden>
- Date: Thu, 19 Feb 2004 15:53:58 -0700
I'm using an NSOutlineView that, when I call -reloadData, will
sometimes get into a recursive loop of function calls until it runs out
of stack space. A representative section of a stack trace would be:
#4 0x90147960 in __CFArrayEqual
#5 0x901369d4 in CFEqual
#6 0x901474a8 in __CFDictionaryEqual
#7 0x901369d4 in CFEqual
#8 0x901474a8 in __CFDictionaryEqual
#9 0x901369d4 in CFEqual
#10 0x90147960 in __CFArrayEqual
#11 0x901369d4 in CFEqual
#12 0x901474a8 in __CFDictionaryEqual
#13 0x901369d4 in CFEqual
#14 0x901474a8 in __CFDictionaryEqual
#15 0x901369d4 in CFEqual
...rinse, lather, repeat until out of stack.
The NSOutlineView is in a window that can be opened or closed by the
user. I get the crash when that window has been opened, closed, and
then opened again, and-- crucially-- one of the items was left expanded
when closing the window. The window reloads the data from the model
when it's opened, so the flow of control is the same on both opens, and
I've verified that all my data-source objects get cleaned up when the
window closes.
It seems that making sure all of the items are collapsed before
reloading will avoid crashing. I've been all over my data source and
can't find any problems with it.
Does collapsing the items actually fix anything, or am I just putting
off a crash until some other time with as-yet-unknown causes?
--
Tom Harrington
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.