#1466 - [TimerTarget idleTriggered:] causing crash after editor has been closed

crash (6)

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.


Bugs: #1909


  • Neil Hodgson

    Neil Hodgson - 2013-04-16

    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.

  • chinhster

    chinhster - 2013-04-16

    I did verify that Editor::Finalise is never called.

    How about calling ScintillaCocoa::Finalise in ScintillaCocoa's destructor?

    [timerTarget release];

  • Neil Hodgson

    Neil Hodgson - 2013-04-16

    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.

  • chinhster

    chinhster - 2013-04-17

    Finalise in the destructor fixes the crash.

  • Neil Hodgson

    Neil Hodgson - 2013-04-18
    • status: open --> closed-fixed
    • assigned_to: Neil Hodgson

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks