Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTD on startup #3579

Closed
ghost opened this issue May 20, 2021 · 6 comments
Closed

CTD on startup #3579

ghost opened this issue May 20, 2021 · 6 comments
Labels
I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor platform-windows Platform: Windows

Comments

@ghost
Copy link

ghost commented May 20, 2021

Oni2 version: d5cd502
Windows 10 build: 18363
Extensions: none (I think, see below for more details)

I don't know what the previous version I was running is, but if I am correct in assuming the CHANGES_CURRENT.md diffs your previous version and the new one downloaded, this should help I hope!
CHANGES_CURRENT.md

The issue is as it sounds, when I run the executable it hangs for a variable amount of time (between 0.5 and 6 seconds) and then crashes. It seems that my inputs do not affect this period, and no particular file is in view when the crash occurs.

What I've tried:

  1. Reinstalled from executable
  2. Removed %LOCALAPPDATA%\Oni2 (I think this cleared out my loaded extensions, but it is possible I missed something)

It also seems that the stable build does still work as expected, so I'll use that version in the meantime. Thank you for you hard work! I'll be looking forward to a solution for this issues, and if you have any questions let me know!

@bryphe bryphe added I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor platform-windows Platform: Windows labels May 20, 2021
@bryphe
Copy link
Member

bryphe commented May 20, 2021

Thanks for logging the issue and all the details @sandersac - much appreciated! Sorry you hit this!

I can reproduce as well - looking into this. I suspect it's a regression from one of the OCaml upgrades:

Working on bisecting so I can pull out the offending commit -

@ghost
Copy link
Author

ghost commented May 20, 2021

No problem, things like this happen! I'm honestly just thrilled you were able to reproduce it so quickly - I was a bit concerned that it was an oddity with my PC instead of a problem with Oni2. Thanks again for your hard work, best of luck!

@bryphe
Copy link
Member

bryphe commented May 21, 2021

Looks like it is related to the OCaml 4.12 upgrade (or at least, after reverting, I know longer reproduced...). Needs more investigation to understand the root cause, but in the meantime I'll revert that commit and kick off a new nightly - 🤞 no more crashes!

@bryphe
Copy link
Member

bryphe commented May 21, 2021

The nightly is out w/ OCaml 4.12 reverted - but looking into the crash some more with WinDbg:

(5590.49b4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
Oni2_editor!tree_sitter_c+0x2e2ac4:
00000000`00d84b74 8b10            mov     edx,dword ptr [rax] ds:00000000`00000000=????????
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************
... 

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 0000000000d84b74 (Oni2_editor!tree_sitter_c+0x00000000002e2ac4)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000

FAULTING_THREAD:  000049b4

PROCESS_NAME:  Oni2_editor.exe

READ_ADDRESS:  0000000000000000 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000000000000

STACK_TEXT:  
00000000`05ece8f0 00000000`00d65615 : 00000000`00000001 00000000`00000000 00000000`00000000 00000000`1526f928 : Oni2_editor!tree_sitter_c+0x2e2ac4
00000000`05ece940 00000000`00d6a867 : 00000000`00000000 00000000`05ecea39 00000000`00000000 00000000`00152100 : Oni2_editor!tree_sitter_c+0x2c3565
00000000`05ece970 00000000`00d86541 : 00000000`00000000 ffffffff`fffffffe 00000000`1b4d7eb0 00000000`05ecea01 : Oni2_editor!tree_sitter_c+0x2c87b7
00000000`05ece9e0 00000000`00000000 : ffffffff`fffffffe 00000000`1b4d7eb0 00000000`05ecea01 4073d000`00000000 : Oni2_editor!tree_sitter_c+0x2e4491


STACK_COMMAND:  ~0s ; .cxr ; kb

SYMBOL_NAME:  Oni2_editor!tree_sitter_c+2e2ac4

MODULE_NAME: Oni2_editor

IMAGE_NAME:  Oni2_editor.exe

FAILURE_BUCKET_ID:  NULL_POINTER_READ_c0000005_Oni2_editor.exe!tree_sitter_c

...
---------

It seems the crash is originating in our tree-sitter code... which is surprising for a few reasons:

  1. It hasn't been touched a while
  2. It shouldn't be running by default

@bryphe
Copy link
Member

bryphe commented May 21, 2021

Looks like the tree-sitter aspect was a red-herring, but some more details here: ocaml/ocaml#10422

@bryphe
Copy link
Member

bryphe commented May 29, 2021

Should be fixed now with #3594 ! Thanks again for reporting, let me know if you see any other issues in the latest builds

@bryphe bryphe closed this as completed May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash It crashes. Is very bad! I-daily-editor-blocker An issue blocking use of the editor as a day-to-day editor platform-windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

1 participant