Ok, I run into the good old “dangling pointer” gag, at last!
My app crashes repeatedly when my last window is closed. The crash messages are not always the same – many things can happen when the last window is closed. For example, I got something like "application should close when the last window is closed >bang<
The last line was always “libobjc.A.dylib 0x00007fff8cc9a150 objc_msgSend_vtable5 + 16”
Believe it or not, there are numerous web reference for this message, and every time the solutions are different, too. Fortunately we don’t see the “reformat the hard drive and make a clean installation of the system” sentence anymore.
Anyway, I used Instruments and tested allocations, leaks. and finally zombies. And when the last window of my app was closed, I saw “Zombie Messaged”
An Objective-C message was sent to a deallocated object (zombie) at address: 0x104155400.
ARC, I thought your were my friend. Sob.
Well, the little rascal appears to be a table column. Now. Why is this column called, and what is sending a message to this deallocated object? And why only for the last window (there is no problem as long there is one window opened)?
I have numerous columns in my app, in two windows and two drawers. I originally thought there was a problem with AutoSave, so I gave a name to every column. But normally Xcode warns “your column must be compliant” or something like that. I knew it was not the problem. And it was not, the zombie hides elsewhere.
The zombie is called precisely when the pointer reaches the “File” menu. Not before. Not another menu. No need to click. >BANG<
Does it remind something to someone of you? Some precisions: this is the Core Data version of my app: the non-Core version does not have the problem. Not to mention the ASOC version.
Any clue very, very welcome!
Regards,