Skip to content

wasm rust start panic error #32941

Open
Open
@tempcoderr

Description

@tempcoderr

Summary

The autocomplete is not working in my Java file, and when I check the Zed logs I am getting the following logs:

2025-06-18T16:33:47+05:30 INFO  [client] set status on client 245236: Connected { peer_id: PeerId { owner_id: 862, id: 1734764 }, connection_id: ConnectionId { owner_id: 0, id: 1 } }
2025-06-18T16:33:50+05:30 ERROR [project] error while executing at wasm backtrace:
    0: 0x2f1ec - java.wasm!__rustc[95feac21a9532783]::__rust_start_panic
    1: 0x2e386 - java.wasm!__rustc[95feac21a9532783]::rust_panic
    2: 0x2e359 - java.wasm!std::panicking::rust_panic_with_hook::hc20fbdbadfcc1625
    3: 0x2d1f7 - java.wasm!std::panicking::begin_panic_handler::{{closure}}::h1237330613601c3b
    4: 0x2d163 - java.wasm!std::sys::backtrace::__rust_end_short_backtrace::h207b568e8da931a1
    5: 0x2dcec - java.wasm!__rustc[95feac21a9532783]::rust_begin_unwind
    6: 0x395d1 - java.wasm!core::panicking::panic_fmt::he093f8ef6966d6c7
    7: 0x3eaf5 - java.wasm!core::str::slice_error_fail_rt::h3f929bc05cc00889
    8: 0x3d4ea - java.wasm!core::str::slice_error_fail::h491ea621a9efe9db
    9: 0x84fe - java.wasm!<java::Java as zed_extension_api::Extension>::label_for_completion::h699cabcf946214bb
   10: 0x20e4c - java.wasm!<zed_extension_api::Component as zed_extension_api::wit::Guest>::labels_for_completions::ha0eaaa6d4507185b
   11: 0x106fc - java.wasm!zed_extension_api::wit::_export_labels_for_completions_cabi::h3b0c04cc69aa162f
   12: 0x21437 - java.wasm!labels-for-completions
   13: 0x3f6c0 - java.wasm!labels-for-completions.command_export

Caused by:
    wasm trap: wasm `unreachable` instruction executed
2025-06-18T16:33:50+05:30 ERROR [project] wasm trap: cannot enter component instance

My Java file has the following code:

import java.util.*;

public class Solution {

    public static void main(String[] args) {
        Solution sol = new Solution();
        Input inp = new Input();

        Scanner scan = new Scanner(System.in);

        int[][] mat = inp.get2DIntArray(scan.nextLine());
        
        System.out.println(sol.solve(mat));

        scan.close();
    }

    public int solve(int[][] mat) {
        sout
        return 0;
    }
}

Image

I have tried reinstalling Zed and the Java plugin.

Expected Behavior:
The autocomplete should have worked without giving any issues.

Zed.log file:
Zed.log

Zed Version and System Specs

Zed: v0.190.6 (Zed)
OS: macOS 15.5.0
Memory: 8 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions