Menu

#1960 Scite crashes during OSX application state restore

Bug
closed-fixed
nobody
5
2017-08-16
2017-07-17
Isiledhel
No

Hello,

On OS X, SciTE systematically crashes when reopening from a abrupt closing (eg OS crash or SciTE forcefully stopped through activity monitor).
A workaround is to start it while holding shift key to prevent OS X application state restoration (then SciTE uses the session from last clean exit).
I reported this by mail to Neil last year and he's the one who helped me with the workaround, but I am still encountering the crash situation on occasions and lose my session each time.

Steps to reproduce (100% hit on my computer, I don't know if some parameters apply):
1- Open a few files to populate a session for reference
2- Quit SciTE cleanly once, for reference
3- Repoen SciTE: it works
4- Open Activity Monitor and kill SciTE through "Force Quit"
5- Reopen SciTE: it crashes, and will keep crashing until opened while holding shift key.
=> Session is basically the same in both cases but in second case, restoration crashes.

Crash log info:
Assertion failed: (CurrentBufferConst()->pFileWorker == NULL), function Open, file /Users/neil/merc/scite/src/SciTEIO.cxx, line 561.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystemkernel.dylib pthreadkill + 10
1 libsystempthread.dylib pthreadkill + 90
2 libsystemc.dylib abort + 129
3 libsystemc.dylib assertrtn + 321
4 org.scintilla.SciTE SciTEBase::Open(FilePath const&, SciTEBase::OpenFlags) + 1873
5 org.scintilla.SciTE SciTEBase::AddFileToBuffer(BufferState const&) + 49
6 org.scintilla.SciTE SciTEBase::RestoreFromSession(Session const&) + 41
7 org.scintilla.SciTE SciTECocoa::DecodeState(NSCoder) + 2211
8 org.scintilla.SciTE -[scitexAppDelegate application:didDecodeRestorableState:] + 23
9 com.apple.AppKit -[NSApplication restoreStateWithCoder:] + 121
...
25 com.apple.AppKit NSApplicationMain + 1176
26 org.scintilla.SciTE SciTECocoa::Run(int, char) + 369
27 org.scintilla.SciTE main + 135
28 org.scintilla.SciTE start + 52*

Warm Regards

Discussion

  • Neil Hodgson

    Neil Hodgson - 2017-07-18

    The only way I have been able to see something like this is when the platform-independent session code (save.session=1) is clashing with the macOS application state restore. Do you have save.session turned on?

     
    • Isiledhel

      Isiledhel - 2017-07-18

      Hi Neil,

      I have it active indeed, and I confirm that if I set it to 0, there is no crash anymore.

      Stephane

      On Tuesday, 18 July 2017 at 11:45 AM, Neil Hodgson wrote:

      The only way I have been able to see something like this is when the platform-independent session code (save.session=1) is clashing with the macOS application state restore. Do you have save.session turned on?
      [bugs:#1960] (https://sourceforge.net/p/scintilla/bugs/1960/) Scite crashes during OSX application state restore
      Status: open
      Group: Bug
      Labels: SciTE on Mac El Capitan
      Created: Mon Jul 17, 2017 05:30 PM UTC by Isiledhel
      Last Updated: Mon Jul 17, 2017 05:30 PM UTC
      Owner: nobody
      Hello,
      On OS X, SciTE systematically crashes when reopening from a abrupt closing (eg OS crash or SciTE forcefully stopped through activity monitor).
      A workaround is to start it while holding shift key to prevent OS X application state restoration (then SciTE uses the session from last clean exit).
      I reported this by mail to Neil last year and he's the one who helped me with the workaround, but I am still encountering the crash situation on occasions and lose my session each time.
      Steps to reproduce (100% hit on my computer, I don't know if some parameters apply):
      1- Open a few files to populate a session for reference
      2- Quit SciTE cleanly once, for reference
      3- Repoen SciTE: it works
      4- Open Activity Monitor and kill SciTE through "Force Quit"
      5- Reopen SciTE: it crashes, and will keep crashing until opened while holding shift key.
      => Session is basically the same in both cases but in second case, restoration crashes.
      Crash log info:
      Assertion failed: (CurrentBufferConst()->pFileWorker == NULL), function Open, file /Users/neil/merc/scite/src/SciTEIO.cxx, line 561.
      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
      0 libsystemkernel.dylib pthreadkill + 10
      1 libsystempthread.dylib pthreadkill + 90
      2 libsystemc.dylib abort + 129
      3 libsystemc.dylib assertrtn + 321
      4 org.scintilla.SciTE SciTEBase::Open(FilePath const&, SciTEBase::OpenFlags) + 1873
      5 org.scintilla.SciTE SciTEBase::AddFileToBuffer(BufferState const&) + 49
      6 org.scintilla.SciTE SciTEBase::RestoreFromSession(Session const&) + 41
      7 org.scintilla.SciTE SciTECocoa::DecodeState(NSCoder) + 2211
      8 org.scintilla.SciTE -[scitexAppDelegate application:didDecodeRestorableState:] + 23
      9 com.apple.AppKit -[NSApplication restoreStateWithCoder:] + 121
      ...
      25 com.apple.AppKit NSApplicationMain + 1176
      26 org.scintilla.SciTE SciTECocoa::Run(int, char) + 369
      27 org.scintilla.SciTE main + 135
      28 org.scintilla.SciTE start + 52*
      Warm Regards
      Sent from sourceforge.net (http://sourceforge.net) because you indicated interest in https://sourceforge.net/p/scintilla/bugs/1960/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Neil Hodgson

    Neil Hodgson - 2017-07-19

    Change set [1f7478] changes behaviour to not try to load a file during session restoration that is already loading or saving.

     

    Related

    Commit: [1f7478]

  • Neil Hodgson

    Neil Hodgson - 2017-07-19
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2017-08-16
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.