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
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?
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:
Change set [1f7478] changes behaviour to not try to load a file during session restoration that is already loading or saving.
Related
Commit: [1f7478]