zed
zed copied to clipboard
Markdown parser issue in agent panel leading to Zed crash
Summary
Panic in markdown handling in agent panel
Description
Opening a particular thread which likely generated some malformed markdown immediately crashes zed. If running with --foreground this is displayed:
2025-05-11T19:32:27+12:00 ERROR [zed::reliability] {
"thread": "<unnamed>",
"payload": "begin <= end (3 <= 2) when slicing ```````",
"location_data": {
"file": "crates/markdown/src/parser.rs",
"line": 82
},
"backtrace": [
"zed::reliability::init_panic_hook::{{closure}}::h82b7729399e473b8+148938214",
"std::panicking::rust_panic_with_hook::h541791bcc774ef34+121402131",
"std::panicking::begin_panic_handler::{{closure}}::h6479a2f0137c7d19+121401354",
"std::sys::backtrace::__rust_end_short_backtrace::ha04e7c0fc61ded91+121394873",
"rust_begin_unwind+121400493",
"core::panicking::panic_fmt::h5764ee7030b7a73d+8887824",
"core::str::slice_error_fail_rt::h95fb5a3efddd85ad+41095820",
"core::str::slice_error_fail::hbde71130ea7318aa+8889194",
"markdown::parser::parse_markdown::h66530394140693c0+86860182",
"markdown::Markdown::parse::{{closure}}::haf7a8805c18ee68d+86874933",
"async_task::raw::RawTask<F,T,S,M>::run::h9c4a30249e869636+86675397",
"std::sys::backtrace::__rust_begin_short_backtrace::hff786c63414b7612+67650579",
"core::ops::function::FnOnce::call_once{{vtable.shim}}::hbd45c2658ca1da60+67769220",
"std::sys::pal::unix::thread::Thread::new::thread_start::hcc5ed016d554f327+121432219",
"start_thread+45007578503844",
"clone3+45007579081788"
],
"app_version": "0.186.6",
"app_commit_sha": "c2d436d65576850a14acc68d9c919df6fe04058d",
"release_channel": "preview",
"target": "x86_64-unknown-linux-gnu",
"os_name": "Linux X11",
"os_version": "ubuntu 24.04",
"architecture": "x86_64",
"panicked_on": 1746948747321,
"system_id": "9cc5507d-f770-4ead-9bdc-0a01b77a7a8b",
"installation_id": "956ef9fc-3498-4034-ad31-5089bb84675f",
"session_id": "2323e08b-6df6-43ed-a41f-4d0a5b62ace6"
}
Actual Behavior: Expected Behavior:
Zed Version and System Specs
Zed: v0.186.6 (Zed Preview) OS: Linux X11 ubuntu 24.04 Memory: 62.7 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 3080 Ti || NVIDIA || 535.230.02
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
No response
@hardbyte https://github.com/galoisgroupcn/zed/pull/4. Try this, and give us feedback if it works or not. If not, give us the output so that we can reiterate our code till it works. Thanks!
Wow, you all work quick! Thanks!