Menu

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

Bug
closed-fixed
crash (9)
1
2013-04-18
2013-04-15
No

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.

Related

Bugs: #1909

Discussion

  • 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.

     
  • Chinh Nguyen

    Chinh Nguyen - 2013-04-16

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

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

    ScintillaCocoa::~ScintillaCocoa()
    {
    Finalise();
    [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.

     
  • Chinh Nguyen

    Chinh Nguyen - 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
     
  • Neil Hodgson

    Neil Hodgson - 2013-04-18

    Fix committed as [0d7b66].

     

    Related

    Commit: [0d7b66]


Log in to post a comment.