Closed mitchgrout closed 4 months ago
Thanks a lot for the bug report. It would be nice to have a reproducible example to be able to investigate the issue further.
So the problem is not exactly with the LSP per se, but the fact that this code is considered legal by the compiler:
component Test {
callback unused;
callback x <=> unused;
}
i.e. a redefinition of an existing property as a callback.
Invoking slint-compiler
on this will emit C++ code, although I'm yet to check if it actually compiles.
Running slint-viewer
on this code will cause a panic, and attempting to use the Show Preview
feature in VSCode (which I assume uses slint-viewer
under the hood) will also panic and restart. If you run this code on Slintpad, you will kill the session and will have to reload the page to get live view working again.
This issue only appears to be a problem if you define the callback as being bound to another valid callback, so the following is still a diagnostic:
component Test {
callback x;
}
Thanks a lot for providing a testcase. Fix in https://github.com/slint-ui/slint/pull/5216
VSCode extension for slint crashed while editing a
.slint
file. Extension version was v1.5.1, and the error output:For ease of access, the referenced function was
extern "C" fn item_geometry
Crash occurred while renaming a callback of this form:
I'll try to find a concise way to trigger it if possible.