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

Ols presumably crashes on large malformed files #578

Open
SaculRennorb opened this issue Jan 10, 2025 · 2 comments
Open

Ols presumably crashes on large malformed files #578

SaculRennorb opened this issue Jan 10, 2025 · 2 comments

Comments

@SaculRennorb
Copy link

SaculRennorb commented Jan 10, 2025

I'm porting a project from cpp to odin, which contains files that are several thousand lines long. My process for doing so is regex replacing parts of the cpp code into the odin semantics.

I was using ols (vscode) for the verry first (small) file, but after opening one of the larger ones it just silently crashes and subsequently fails to restart.

Ive tried the stable version, the nightly version and even built ols from master a9853fc, none of it changed anything. I also don't get any debug output (afaict), not even using the debug build of ols.

Here is the output from vscode:

[Info  - 5:42:34 AM] Connection to server got closed. Server will restart.
true
[Info  - 5:42:35 AM] Connection to server got closed. Server will restart.
true
[Info  - 5:42:35 AM] Connection to server got closed. Server will restart.
true
[Info  - 5:42:35 AM] Connection to server got closed. Server will restart.
true
[Info  - 5:42:35 AM] Connection to server got closed. Server will restart.
true
[Error - 5:42:35 AM] The Odin Language Server Client server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Its not reasonable to attach the source file (because of the length), but if you can tell me how to get more debug output / logs i can try to provide that.

Since it presumably immediately crashes i also failed to attach a debugger, and this is where i just submit this issue as is.

@DanielGavin
Copy link
Owner

DanielGavin commented Jan 10, 2025

You can open up an odin file that doesn't crash. Attach the debugger. Open the file that crashes. I doubt any log would be useful.

You might be able to upload the source code file without pasting it here.

@SaculRennorb
Copy link
Author

You can open up an odin file that doesn't crash. Attach the debugger. Open the file that crashes
good call, as you can tell form the timestamps it was quite early for me.

It appears to be a stack overflow in the odin tokenizer. I'm guessing that is outside your direct control, but maybe you can at least figure out some more details.

Here you also have the broken file, maybe it helps in some way:
imgui.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants