EXC_BAD_ACCESS in a ~ResizeableBorder


In the latest juce, I’m getting crashes as shut down. When the destructor chain gets to deleting:

MyDocWindow > DocumentWindow > ResizeableWindow and it tries to set the resizableBorder member to 0, I get a crash in the ScopedPointer assignment method. It seems like the border component isn’t real? Can’t see why it would have already been deleted, or why it would be uninitialized, but there it is.

I would say a random memory corruption, but it seems consistent? Every time the ‘old’ resizeable component is deleted.

The only things I’m changing that seem related are:

[code] setResizable(true, false);
setResizeLimits (768, 480, 2560, 1200);



The only child is a component I added with setContentComponent, and have left for the window to erase.

Testing on Mac, latest xcode (3.2.5?).



Can’t see any reason why that’d happen… You’re not doing anything silly like calling deleteAllChildren() on the window are you?


No but yeah but no but… oops.

I guess that was in there for a while. I guess the content component stuff overrides it?


The content comp used to use deleteAllChildren() itself to delete its borders, rather than deleting them directly. But now that I’ve cleaned it up to use ScopedPointers, the extent of your evilness becomes apparent.

I’ll put in an assertion to catch any other miscreants who try the same thing…