Skip navigation.
 
mlstumped with sigbus
FROM : Jim Thomason
DATE : Mon Nov 29 22:03:08 2004

I've got a bus error somewhere in my program.

So far, NSDebug and NSZombieEnabled did nothing more than confirm
exactly where the error is occurring, but I still don't know why.

Basically, here's what happens.

I have a panel with a tableview. The tableview has another object as
its data source. Both of these objects are governed by my document.
The document goes away, the panel and the data source go away.

But the data source is getting a
tableView:objectValueForTableColumn:row: after the data source has
been released, so my program is crashing.

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.

Personally, I can't even tell how it's happening, since the panel that
owns the table has already been deallocated. But it is.

Are there further debugging tricks or documentation I can look at to
help me track this down? Since I'm stumped. Incidentally, if I ensure
that the data source always exists (give it an extra retain), then
everything works fine, and it does leak memory (as expected).

-Jim.....

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