slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.93k stars 567 forks source link

VSC LSP crashed #2709

Closed Adancurusul closed 1 year ago

Adancurusul commented 1 year ago

LSP crashes in multiple ways in VSC Partial error reporting:

thread '' panicked at 'already borrowed: BorrowMutError', tools\lsp\server_loop.rs:379:54 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace [Info - 8:14:28 AM] Connection to server got closed. Server will restart. The Slint Language Server crashed. This is a bug. Please open an issue on https://github.com/slint-ui/slint/issues [Error - 8:14:28 AM] Request textDocument/colorPresentation failed. Error: Connection got disposed. T8YS $Y$4IS)OK7JTZ$VFXR

DD6ACF7CDACDC3120860159D2D397318

There are many more crashes that I forgot to record。 Almost every time a .slint file is opened, an error is reported Sometimes it crashes suddenly while using

ogoffart commented 1 year ago

I actually have been seeing this panic before. It usually happen when editing the import. I suspect this happens when the client is fetching the property while the server is awaiting to open files. We should keep a lock on the cache just like in the wasm version also for the non-wasm

ogoffart commented 1 year ago

This should now be fixed by #2733 Could you try with the nightly extension tomorrow and report a problem if this is still not fixed? Thanks for reporting the bug.