Skip navigation.
 
mlRe: stumped with sigbus
FROM : Jim Thomason
DATE : Mon Nov 29 23:52:08 2004

Unfortunately, all is not well in mudville.

Now the blasted thing is crashing when I run it through ObjectAlloc.
Terminates immediately with a signal 5. The only suggestion I tracked
down for that is to make sure that ZeroLink is off, and it is.
Deployment build, no debugging stuff on (AFAIK). I even just
successfully ran the program from a separate machine.

But ObjectAlloc still doesn't work.

In the grand scheme of things, I suppose this is minor since the
program is otherwise functional. But the fact that I can't run it from
there makes me nervous.

Any suggestions for this issue?

-Jim....


On Mon, 29 Nov 2004 16:43:42 -0600, Jim Thomason <<email_removed>> wrote:
> Wowee.
>
> You're absolutely correct. Looking at it in ObjectAlloc, I've got 4
> NSWindows hanging around (including the one that contains my
> NSTableView) despite the fact that their controllers were all
> autoreleased and properly disappeared.
>
> If I explicitly break the table's delegate and datasource, then the
> program behaves as expected w/o issue. I couldn't tell you exactly why
> the table is trying to reload the data, but shutting off the
> datasource takes care of it.
>
> -Jim....
>
>
>
> On Mon, 29 Nov 2004 23:22:07 +0100, Christoph Nadig <<email_removed>> wrote:
> > Hello Jim,
> >
> >
> >
> > >The order of events to cause it are:
> > >1) launch program.
> > >2) new document prompts for parameters (required to make document)
> > >3) cancel document (don't create one)
> > >4) document deallocates, panel window controller deallocates, data
> > >source deallocates (I'm logging inside these methods so I see it
> > >happen)
> > >5) datasource gets the tableView:objectValueForTableColumn:row:
> > >message, and the whole works goes down because the datasource no
> > >longer exists.
> >
> > I've seen this too with both table views and outline views, and it seems
> > that the panel is not released but autoreleased when the controller is
> > deallocated, therefore the panel is still valid until the next time the
> > run loop is passed - if another event is received that causes the panel
> > to redraw/update, it tries to access the data source.
> >
> > What I found to fix the problem is to detach the data source and
> > delegates from
> > the table view before deallocating the panel controller, for example in the
> > panel controller (or whetever your window delegate is):
> >
> > - (void)windowWillClose:(NSNotification *)aNotification
> > {
> >    // disconnect the outline view
> >    [outlineView setDelegate:nil];
> >    [outlineView setDataSource:nil];
> > }
> >
> > Hope this helps,
> > Christoph
> >
> >
>

Related mailsAuthorDate
mlstumped with sigbus Jim Thomason Nov 29, 22:03
mlRe: stumped with sigbus Christoph Nadig Nov 29, 23:22
mlRe: stumped with sigbus Jim Thomason Nov 29, 23:52