Long story short:
If I put a NSTableView
with highlight style set to SourceList inside a NSPopover
, my app crashes when I close the window containing the popover.
EDIT: I can replicate this issue on a new project. https://dl.dropboxusercontent.com/u/7968745/PopoverFail.zip
Long story:
I have a very strange issue.
Currently debugging with NSZombie
seems to lead the problem to a NSPopover
, but I'm not completely sure because I cannot replicate it in a new project.
I have a NSWindow
and its controller which creates a NSViewController
and its view (everything created with IB).
In this view there is a button which opens a popover.
This popover has a simple NSTableView
with style set to SourceList. The popover is transient.
If I open the popover, and directly close the window everything is ok. If I open the popover, change focus to a textfield in the window (so that the popover closes) and then close the window, the app crashes.
Enabling zombie I see the following log
*** -[NSPopoverFrame _subviewGeometryChanged:]: message sent to deallocated instance 0x1005ce3d0
If I profile with NSZombie
this is the stack:
I can replicate the issue every time. I've change now the style of the table view to regular and the crash does not happen anymore (but I lost the translucent effect on yosemite.
I don't know what can be the problem, and if it is really the table view / popover combination
EDIT: More information: I'm using ARC. The issue arises at the deallocation of the window. I removed all the code of the application except the one needed to open the window. The crash happens also in this case.
EDIT: I can replicate this issue on a new project. https://dl.dropboxusercontent.com/u/7968745/PopoverFail.zip
I'll also open a bug report to Apple