Under certain circumstances, the Scintilla editor crashes after it has been closed in OS X. The crash log shows that the idleTriggered: method was called. I think the problem is that there is still a repeating idleTimer scheduled before everything is destroyed/released and it fires afterwards.
Perhaps the ScintillaCocoa::~ScintillaCocoa() destructor needs a SetIdle(false) as well. That seems to clear up the problem for me.
Editor::Finalise does the SetIdle(false). Finalise should be called before destruction but doesn't apper to be on Cocoa. Could probably inserted a call to Finalise in the dealloc for ScintillaView. My projects never destroy Scintilla objects, so I can't test this.
I did verify that Editor::Finalise is never called.
How about calling ScintillaCocoa::Finalise in ScintillaCocoa's destructor?
ScintillaCocoa::~ScintillaCocoa()
{
Finalise();
[timerTarget release];
}
If adding it to the destructor works then that is good.
If I recall correctly, there were problems with the order of deallocation on Windows or GTK+ which is why Finalise is called before destruction.
Finalise in the destructor fixes the crash.
Fix committed as [0d7b66].
Related
Commit: [0d7b66]