Closed flukejones closed 7 months ago
Same problem here.
To disable the failing extension just remove the part bellow from the file ~/Library/Application\ Support/Zed/extensions/index.json
"dart": {
"manifest": {
"id": "dart",
"name": "Dart",
"version": "0.0.1",
"schema_version": 1,
"description": "Dart support.",
"repository": "https://github.com/zed-industries/zed",
"authors": [
"Abdullah Alsigar <abdullah.alsigar@gmail.com>",
"Flo <flo80@users.noreply.github.com>"
],
"lib": {
"kind": "Rust",
"version": "0.0.6"
},
"themes": [],
"languages": [
"languages/dart"
],
"grammars": {
"dart": {
"repository": "https://github.com/agent3bood/tree-sitter-dart",
"rev": "48934e3bf757a9b78f17bdfaa3e2b4284656fdc7"
}
},
"language_servers": {
"dart": {
"language": "Dart"
}
}
},
"dev": false
},
Zed: Zed 0.129.2 OS: Mac Os Sonoma 14.4 Memory: 32 GiB Architecture: x86_64
@flukejones Do you see the same crash if you install the Dart extension using "Install Dev Extension" and pointing to extensions/dart
in the Zed repo?
For anyone who is experiencing this crash (@flukejones, @pedrosoares) could you share the content of the following file?
~/Library/Application Support/Zed/extensions/installed/dart/extension.wasm
From the panic, it looks like the installed wasm file is somehow invalid. I'm curious if I can reproduce the problem if I have the same wasm file as you.
Ok, never mind, we have found a way of reproducing the bug, by truncating a WASM file at a certain position.
@maxbrunsfeld I did a build from master (26299fb8c997d78ee1fdd45a75347f2db2131bff) and error log was the fallowing:
[2024-04-10T12:16:07-03:00 ERROR util] crates/extension/src/extension_store.rs:1093: failed to load wasm extension dart
Caused by:
unexpected end-of-file (at offset 0x2c684)
I did head and tail this file ~/Library/Application Support/Zed/extensions/installed/dart/extension.wasm
:
qtextmethofunction
constructorfielvariableclass interfacemodulpropertyunitvalueenumkeywordsnippetcolorfile referencefolder
enum-membeconstantstructevenoperatortype-parameterotherzcompletion-kindq
plain-textsnippetotherzinsert-text-formatkskkrlabelsdetailkindinsert-text-format
completionqilemodule namespacepackageclassmethopropertyfield
constructorenum interfacfunctiovariablconstantstringnumberbooleanarrayobjectkeynull
enum-memberstructevenoperatortype-parameterotherz
symbol-kind rkind
namessymbol
zed:extension/lsp$Bossp@get-environment
wasi:cli/environment@0.2.0Bj@statusexit
Berrorli/exit@0.2.0
wasi:io/error@0.2.0
output-streamerroriqlast-operation-failedclosed
stream-error
input-streamhjw@sel![method]output-stream.check-write p}j@selcontents
ethod]output-stream.write
.[method]output-stream.blocking-write-and-flush
@self
$[method]output-stream.blocking-flush
get-stderr
get-stderr exit
exit get-stdin get-stdin!
get-stdou?
get-stdout"
__main_module__envwasi:filesystem/preopens@0.2.0asi:filesystem/types@0.2.0wasi:io/error@0.2.wasi:io/streams@0.2.0 wasi:cli/environment@0.2.0
wasi:cli/stderr@0.2.0
wasi:cli/exit@0.2.0
wasi:cli/stdout@0.2.0>cabi_export_realloccabi_import_reallo$imports
get-directories
$( #[method]descriptor.write-via-stream ) $[method]descriptor.append-via-stream
ethod]descriptor.get-type
[method]descriptor.stat
( #[method]descriptor.metadata-hash-at filesystem-error-cod&![method]output-stream.check-writ ethod]output-stream.writ3.[method]output-stream.blocking-write-and-flus)$[method]output-stream.blocking-flusget-environment
$fd_write
environ_getenviron_sizes_getfd_prestat_getfd_prestat_dir_namepath_filestat_get proc_exit$imports0%1&2'3(4)5*6+7,8-9.10/11012113214315416517618719820921:22;@init-extensio<9
init-extension(j"s@language-server-idworktree1:Clanguage-server-command!cabi_post_lan=uage-server-command
>;
? language-server-command(j$s@language-server-idworktree1<a&language-server-initialization-options0cabi_post_language-server-initialization-options
@=
A ,&language-server-initialization-optionsc'language-server-workspace-configuration1cabi_post_language-server-workspace-configuration
B=
-'language-server-workspace-configurationpk-p?j?s@language-server-ids
C completions>?Alabels-for-completions cabi_post_labels-for-completions
DB
E labels-for-completions&p@language-server-idssymbols??9labels-for-symbolscabi_post_labels-for-symbols
FD
labels-for-symbols/ producers
wit-component0.201.0%
My internet connection it is unstable currently, probably downloaded the file partialy?
We opened a Wasmtime issue for this bug, and have added a workaround for it in Zed. https://github.com/bytecodealliance/wasmtime/issues/8322
In the meantime, you should try reinstalling the Dart extension. It looks like your download was partially corrupted.
In the meantime, you should try reinstalling the Dart extension. It looks like your download was partially corrupted.
Can confirm, it works.
The fix for this just went out in v0.130.5.
Sorry about not following up sooner (I'm UTC+12). Excellent work y'all, thank you.
Check for existing issues
Describe the bug / provide steps to reproduce it
Install dart extension as suggested by Zed on opening a dart file.
Environment
Zed: v1.0.0 (Zed Dev 4151ba13a138cef88fabb053119a507c15d49271) OS: Linux 1.0.0 Memory: 31 GiB Architecture: x86_64
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.