I'm getting a crash (EXC_BAD_ACCESS) inside an internal NSOutlineView
method. I'm sure it's my own fault but I'd like to know where I should
be looking to fix it. The stack trace is:
#0 0x92abf112 in -[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary:]
#1 0x92c1ef9a in -[NSOutlineView reloadItem:reloadChildren:]
#2 0x0009cfce in -[DKOLayerController layerStatusChange:] at
DKOLayerController.m:278
#3 0x941c3e1a in _nsnote_callback
The exact line it crashes at is here:
0x92abf0fa <+0171> je 0x92abf12b <-[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary
:]+220>
0x92abf0fc <+0173> xor %edi,%edi
0x92abf0fe <+0175> mov -0x20(%ebp),%eax
0x92abf101 <+0178> mov 0x4(%eax),%ecx
0x92abf104 <+0181> dec %ecx
0x92abf105 <+0182> lea 0x0(,%ecx,4),%edx
0x92abf10c <+0189> jmp 0x92abf118 <-[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary
:]+201>
0x92abf10e <+0191> mov 0x18(%esi),%eax
0x92abf111 <+0194> dec %ecx
0x92abf112 <+0195> add (%edx,%eax,1),%edi <----------------
crash
0x92abf115 <+0198> sub $0x4,%edx
0x92abf118 <+0201> test %ecx,%ecx
0x92abf11a <+0203> jns 0x92abf10e <-[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary
:]+191>
0x92abf11c <+0205> mov (%esi),%eax
0x92abf11e <+0207> inc %edi
0x92abf11f <+0208> test %eax,%eax
0x92abf121 <+0210> je 0x92abf12a <-[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary
:]+219>
0x92abf123 <+0212> mov %esi,-0x20(%ebp)
0x92abf126 <+0215> mov %eax,%esi
0x92abf128 <+0217> jmp 0x92abf0fe <-[NSOutlineView
_adjustSelectionForItemEntry:numberOfRows:adjustFieldEditorIfNecessary
:]+175>
The method I'm calling -reloadItem:reloadChildren from is a
notification handler:
- (void) layerStatusChange:(NSNotification*) aNote
{
DKLayer* layer = [aNote object];
//NSLog(@"layers controller got status change for layer %@", layer );
if([mLayersTable rowForItem:layer] != -1)
{
BOOL expand = [mLayersTable isItemExpanded:layer];
if( expand )
{
[mLayersTable reloadItem:layer reloadChildren:YES]; //<------
crashes here
[mLayersTable expandItem:layer];
}
else
{
// ... other code (irrelevant) ...
}
At this point all the data looks good - I have a valid object for
<layer> and <expand> returns as YES.
The outline view is an interface to a hierarchical list of layers, and
this is responding to a reordering of the layers within a group that
was triggered externally - i.e. not by interacting with the outline
view itself. The notification is sent by the containing group of the
layer being reordered and it's this group that is returned by [note
object].
tia,
--Graham
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]