Closed CelDaemon closed 1 month ago
Hi @CelDaemon . I'd like to repro the crash you're seeing. However, my own attempt to set up an emscripten project seems to be working without issue.
Would you be able to provide your project (enscriptem-gl?) as a repro or zip file, and any additional necessary steps to repro, so we might easily replicate the scenario?
I see from your logs that one of your include paths was not present on disk:
Unable to resolve include path: D:/CODE/emsdk/upstream/emscripten/cache/sysroot/include/wasm32-emscripten/c++/v1
However, I wouldn't expect that to result in an IntelliSense process crash.
I would expect the cause of an IntelliSense crash to be somewhat related to the contents of the file being parsed (or headers it includes). Reproducing the issue may require D:\CODE\emscripten-gl\src\util.cpp
or something with similar contents.
Thank you for taking a look at my issue!
I'm most likely unable to share the actual project code due to company policy. However, the following zip is enough to reproduce the issue on my end:
As visible in the properties file, the emscripten sdk is located at D:\CODE\emsdk
.
I hope this helps to diagnose the issue, I've been affected by it in almost every single cpp file in the project.
Is this enough information, or is there more I need to provide?
Hi @CelDaemon . Thanks for reporting this to us. I can repro the issue with your example and have tracked the issue down to within a shared component (in the IntelliSense engine) and opened a bug internally. (ID 2267751).
@Colengms Thank you, is there possibly some workaround I could use in the meantime, or should I just wait for a fix to land?
Hi @CelDaemon . While the IntelliSense process definitely shouldn't crash, the issue you're seeing here seems to also have something to do with your include paths, and the wrong versions of headers being picked up.
In your repro.zip example, if I rearrange the include paths like so, I don't get the error:
"Z:\\repos\\emsdk\\upstream\\emscripten\\cache\\sysroot\\include\\c++\\v1",
"Z:\\repos\\emsdk\\upstream\\emscripten\\cache\\sysroot\\include\\**",
"Z:\\repos\\emsdk\\upstream\\lib\\clang\\20\\include",
Given that you're specifying recursive include paths (with \**
), you're not configuring IntelliSense in the same way the code would be built. I'd highly recommend configuring IntelliSense exactly as the code is built, to ensure correct IntelliSense.
Thank you!
That did indeed resolve my issue (except the crashing of course), I wasn't aware of the ordering making this much of a difference.
I've now changed my config to use the --sysroot
argument the same way emcc
works under the hood, and it works flawlessly.
Can this issue now be closed, or should it stay open to track the crash?
Environment
Bug Summary and Steps to Reproduce
Bug Summary: While in an emscripten project, including certain headers ( and being a common cases), the intellisense completely stops working.
This seems to be because of the intellisense server continuously crashing, but have been unable to debug the reason why.
Steps to reproduce:
wasm32-unknown-emscripten
, and defineEMSCRIPTEN
.Expected behavior: The intellisense server correctly shows the available types, and doesn't crash
Configuration and Logs
Other Extensions
The Issue persists regardless of these extensions.
Additional context
No response