standardnotes / forum

Support from other community members. For 1-on-1 help, please contact help@standardnotes.com.
https://forum.standardnotes.org
196 stars 9 forks source link

App segfaults on startup on macOS 10.12.6 #552

Closed mjlassila closed 1 year ago

mjlassila commented 5 years ago

After updating Standard Notes to most recent version, my work laptop (which has an older version of OSX installed for IT policy reasons) doesn't open SN anymore. The program crashes instantly at startup. The following is a snippet from raport generated by OSX reporting tools.

Process: Standard Notes [4245] Path: /Applications/Standard Notes.app/Contents/MacOS/Standard Notes Identifier: org.standardnotes.standardnotes Version: 3.0.8 (3.0.8) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Standard Notes [4245] User ID: 808367419

Date/Time: 2019-05-17 11:15:56.046 +0300 OS Version: Mac OS X 10.12.6 (16G2016) Report Version: 12

Time Awake Since Boot: 840 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0]

VM Regions Near 0: --> __TEXT 000000010fc23000-000000010fc24000 [ 4K] r-x/rwx SM=COW /Applications/Standard Notes.app/Contents/MacOS/Standard Notes

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libnode.dylib 0x0000000114499b25 node::Init(int*, char const, int, char const) + 437 1 com.github.electron.framework 0x000000010fd4ba69 atom::NodeBindings::Initialize() + 41 2 com.github.electron.framework 0x000000010fccac89 atom::AtomBrowserMainParts::PostEarlyInitialization() + 153 3 com.github.electron.framework 0x00000001100ffca9 0x10fc2d000 + 5057705 4 com.github.electron.framework 0x0000000110105b62 0x10fc2d000 + 5081954 5 com.github.electron.framework 0x00000001100ff3c4 0x10fc2d000 + 5055428 6 com.github.electron.framework 0x000000011005655b 0x10fc2d000 + 4363611 7 com.github.electron.framework 0x0000000111aef3fc 0x10fc2d000 + 32252924 8 com.github.electron.framework 0x0000000110055834 0x10fc2d000 + 4360244 9 com.github.electron.framework 0x000000010fc2f90a AtomMain + 74 10 org.standardnotes.standardnotes 0x000000010fc23f26 main + 38 11 libdyld.dylib 0x00007fff95d8a235 start + 1

Thread 1: 0 libsystem_kernel.dylib 0x00007fff95eb944e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff95fa3621 _pthread_wqthread + 1426 2 libsystem_pthread.dylib 0x00007fff95fa307d start_wqthread + 13

Thread 2: 0 libsystem_kernel.dylib 0x00007fff95eb944e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff95fa3621 _pthread_wqthread + 1426 2 libsystem_pthread.dylib 0x00007fff95fa307d start_wqthread + 13

Thread 3: 0 libsystem_pthread.dylib 0x00007fff95fa3070 start_wqthread + 0 1 ??? 0x000060000003eca0 0 + 105553116523680

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00006080000ef380 rbx: 0x00006080000ef380 rcx: 0x0000000000000380 rdx: 0x0000000000000000 rdi: 0x0000000115ab1000 rsi: 0x0000000000000008 rbp: 0x00007fff4ffdc470 rsp: 0x00007fff4ffdc400 r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x000000011b044110 r11: 0xffffe080b007a036 r12: 0x00007fff4ffdc6d0 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 rip: 0x0000000114499b25 rfl: 0x0000000000010206 cr2: 0x0000000000000000

Logical CPU: 3 Error Code: 0x00000004 Trap Number: 14

moughxyz commented 5 years ago

Hmm..there haven't been any updates made to the dependencies in that release, or any recent release really. So it should work all the same. Can you delete this installation, and reinstall from the home page? It could be that the auto-update failed to download the file properly.

mjlassila commented 5 years ago

I wiped application data from ~/Library/Application Support/ and reinstalled from standard-notes-3.0.8-mac.zip . SN keeps crashing :/ Is there some other files I should delete to get a fresh start?

The app also segfaults when I try to start it from the command line inside the application package (eg. /Applications/Standard Notes.app/Contents/MacOS/Standard Notes)

moughxyz commented 5 years ago

Can you try previous releases from here and see if they work? https://github.com/standardnotes/desktop/releases

mjlassila commented 5 years ago

It seems that this is somehow related to my computer, as version 2.3.0 crashes too and I have definitely used this particular version before.

I managed to get Standard Notes starting from CLI from /Applications/Standard Notes.app/Contents/MacOS after unloading NVM from the CLI (eg. node version manager). Standard Notes still crashes when starting from it the GUI. Could it be that nodejs somehow messes up Electron? (although other Electron apps run fine, such as MS Teams).

mjlassila commented 5 years ago

It seems that this is related to the NodeJS, as I removed node completely from the system (aside NVM installed version, I had global NodeJS version installed using Homebrew) and made reboot, SN starts from the GUI too.

moughxyz commented 5 years ago

Hmm strange. It's hard to say what it could be. It is possible that a web of dependencies are involved and getting in the way.

mjlassila commented 5 years ago

It seems that the global Node installation made via Homebrew is the culprit. When Node (v10.15.3) is installed via NVM, it doesn't seem to interfere with Standard Notes, unless one tries to start SN from CLI using /Applications/Standard Notes.app/Contents/MacOS/Standard Notes

Strangely, MS Teams (which is the other Elektron app I'm using) starts also from the CLI when NVM installed Node is active.

mjlassila commented 5 years ago

From version 3.0.12 Standard Notes crashes on OSX 10.12.6 even without interfering global NodeJS installation.

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0]

VM Regions Near 0: --> __TEXT 0000000100cd2000-0000000100cd3000 [ 4K] r-x/rwx SM=COW /Applications/Standard Notes.app/Contents/MacOS/Standard Notes

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libnode.dylib 0x000000010554bb25 node::Init(int*, char const, int, char const) + 437 1 com.github.electron.framework 0x0000000100df7a99 atom::NodeBindings::Initialize() + 41 2 com.github.electron.framework 0x0000000100d76d99 atom::AtomBrowserMainParts::PostEarlyInitialization() + 153 3 com.github.electron.framework 0x00000001011abcd9 0x100cd9000 + 5057753 4 com.github.electron.framework 0x00000001011b1b92 0x100cd9000 + 5082002 5 com.github.electron.framework 0x00000001011ab3f4 0x100cd9000 + 5055476 6 com.github.electron.framework 0x000000010110258b 0x100cd9000 + 4363659 7 com.github.electron.framework 0x0000000102b9b5fc 0x100cd9000 + 32253436 8 com.github.electron.framework 0x0000000101101864 0x100cd9000 + 4360292 9 com.github.electron.framework 0x0000000100cdba0a AtomMain + 74 10 org.standardnotes.standardnotes 0x0000000100cd2f26 main + 38 11 libdyld.dylib 0x00007fff8e1cc235 start + 1