ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.77k stars 198 forks source link

Intermittent crashes on Mac #558

Open johnnypoll opened 5 years ago

johnnypoll commented 5 years ago

macOS HighSierra, MacBook Pro 15" 2017 with ribbon bar

Storage as Plain Text Files Shared via SimpleNote

This has been happening for at least a year I would say, though nvAlt is so good I still use it even with regular crashes. It seems very random as to when it crashes; I might be typing something, or it may just be hanging around in the background when it bombs. My edits have been saved fortunately, but it has forgotten which file I was editing when it opens again.

Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData _fastCStringContents:]: unrecognized selector sent to instance 0x608000442b20' terminating with uncaught exception of type NSException abort() called

Thread 6 Crashed:: Dispatch queue: com.apple.NSURLSession-work 0 libsystem_kernel.dylib 0x00007fff6a96fb66 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff6ab3a080 pthread_kill + 333 2 libsystem_c.dylib 0x00007fff6a8cb1ae abort + 127 3 libc++abi.dylib 0x00007fff687c5f8f abort_message + 245 4 libc++abi.dylib 0x00007fff687c612b default_terminate_handler() + 265 5 libobjc.A.dylib 0x00007fff69c07ea3 _objc_terminate() + 97 6 libc++abi.dylib 0x00007fff687e17c9 std::__terminate(void (*)()) + 8 7 libc++abi.dylib 0x00007fff687e1843 std::terminate() + 51 8 libdispatch.dylib 0x00007fff6a7e5dcc _dispatch_client_callout + 28 9 libdispatch.dylib 0x00007fff6a7fa217 _dispatch_queue_serial_drain + 635 10 libdispatch.dylib 0x00007fff6a7ed166 _dispatch_queue_invoke + 373 11 libdispatch.dylib 0x00007fff6a7faf0d _dispatch_root_queue_drain_deferred_wlh + 332 12 libdispatch.dylib 0x00007fff6a7fed21 _dispatch_workloop_worker_thread + 880 13 libsystem_pthread.dylib 0x00007fff6ab36fd2 _pthread_wqthread + 980 14 libsystem_pthread.dylib 0x00007fff6ab36be9 start_wqthread + 13

Thread 6 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000700002ef4000 rcx: 0x0000700002ef31d8 rdx: 0x0000000000000000 rdi: 0x000000000000501f rsi: 0x0000000000000006 rbp: 0x0000700002ef3210 rsp: 0x0000700002ef31d8 r8: 0x0000700002ef30a0 r9: 0x0000700002ef3270 r10: 0x0000000000000000 r11: 0x0000000000000206 r12: 0x000000000000501f r13: 0x0000000000000030 r14: 0x0000000000000006 r15: 0x000000000000002d rip: 0x00007fff6a96fb66 rfl: 0x0000000000000206 cr2: 0x00007fffa3243168

Logical CPU: 0 Error Code: 0x02000148 Trap Number: 133

wkrantz commented 5 years ago

I have identical symptoms and the same NValt settings. Had it on High Sierra and now on Mojave also.

Application Specific Information: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableData _fastCStringContents:]: unrecognized selector sent to instance 0x6000015f9620' terminating with uncaught exception of type NSException abort() called

As per https://github.com/ttscoff/nv/issues/278 it's probably related to simplenote sync, but that's an important feature for me to sync with my phone. Are there any other workarounds other than just turning off simplenote syncing?

johnnypoll commented 5 years ago

My solution was to move to The Archive, which isn't free but is very similar to (and inspired by) nvAlt and is being actively developed: https://zettelkasten.de/ It is also a breeze to switch to from nvAlt; just point it to the folder of notes.

johnnypoll commented 5 years ago

I also used simplenote but gave that up in order to switch to The Archive. I instead now use DropBox for sync to iA Writer on Android, which works very well.

janson commented 5 years ago

For what it's worth, I see the same behavior when trying to run nValt on two MacBooks:

Symptoms:

  1. I'll be working, and leave nValt & Dropbox running on 1st computer.
  2. Switch to second computer (at home, on a different network.)
  3. On second mac, I'll see a "quit unexpectedly" similar to this issue and #554
  4. Re-open nValt on second mac and it will lose the latest info from the open note(s) on the first computer. Similar to #547, and maybe #321. Dropbox will often not record the lost info as a deleted note or part of the file version history.

Unfortunately, this has led to lost work. (Saving files saves to DropBox... so when second computer crashes and trashes file on DropBox.... no recourse unfortunately.)

sh00tthec0re commented 4 years ago

NValt is crashing frequently on me as well

nValt 2.2.8 (128) MacOS Mojave 10.14.6 Sync via DropBox Plain text notes

Crash log is attached. Crashlog.rtf.zip

roman-dzieciol commented 4 years ago

@sh00tthec0re @johnnypoll @wkrantz How frequently does it crash?

One thing to try is disabling the autoupdater from terminal: defaults write net.elasticthreads.nv SULastCheckTime -date "2100-01-01 00:00:00 +0000" Restart nvALT after this.

This setting will be reset if you check for updates manually through menu. Can be checked with defaults read net.elasticthreads.nv

Let me know if it helps, if not we can debug further.

baybatu commented 4 years ago

@sh00tthec0re @johnnypoll @wkrantz How frequently does it crash?

One thing to try is disabling the autoupdater from terminal: defaults write net.elasticthreads.nv SULastCheckTime -date "2100-01-01 00:00:00 +0000" Restart nvALT after this.

This setting will be reset if you check for updates manually through menu. Can be checked with defaults read net.elasticthreads.nv

Let me know if it helps, if not we can debug further.

I tried this solution but it did not work and crashed again.

Edit: I am using Catalina (10.15.3)