-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown preview: "not enough space in Arena" #10824
Comments
Hey, |
Hi Bennet, the content is unfortunately private. I’ll try to bisect it. For the time being: it’s basically a long nested list with checkboxes. |
Thanks for the information, I managed to reproduce the panic when a markdown file contains a LOT of checkboxes that are in a single block/list (for me it starts to panic when it has to render ~1100 checkboxes) |
Hey, just put up #10852 (still WIP, but should already fix your issue). Would be great if you could build from source and try to open your document, so that you can verify that it is actually fixed. |
Thank you. Yes, that indeed prevents the problem. If you wonder: I have a GTD style tickler file with generated tasks for each year. So that's about 365 * 5 checkboxes. |
Great to hear and thanks for testing 👍 |
Thank you for analysing and fixing this ... especially that quickly, didn't expect that. |
Fixes a panic related to rendering checkboxes, see #10824. Currently we are rendering a list into a single block, meaning the whole block has to be rendered when it is visible on screen. This would lead to performance problems when a single list block contained a lot of items (especially if it contained checkboxes). This PR splits up list items into separate blocks, meaning only the actual visible list items on screen get rendered, instead of the whole list. A nice side effect of the refactoring is, that you can actually click on individual list items now: https://github.com/zed-industries/zed/assets/53836821/5ef4200c-bd85-4e96-a8bf-e0c8b452f762 Release Notes: - Improved rendering performance of list elements inside the markdown preview --------- Co-authored-by: Remco <djsmits12@gmail.com>
A fix for this should be availabe in 0.134.0-pre. |
Thank you all. |
Check for existing issues
Describe the bug / provide steps to reproduce it
When i try to open the preview on a Markdown file (2600 lines, 99 kB) it "crashes".
Environment
Zed: v0.131.6 (Zed)
OS: macOS 14.4.1
Memory: 32 GiB
Architecture: aarch64
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.2024-04-21T18:00:49+02:00 [INFO] ========== starting zed ==========
2024-04-21T18:00:49+02:00 [INFO] Opening main db
2024-04-21T18:00:49+02:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-04-21T18:00:49+02:00 [INFO] set environment variables from shell:/bin/zsh, [...]
2024-04-21T18:00:49+02:00 [ERROR] crates/zed/src/zed.rs:628: EOF while parsing a value at line 1 column 0
2024-04-21T18:00:49+02:00 [INFO] Opening main db
2024-04-21T18:00:49+02:00 [INFO] building git repository,
.git
path in the worktree: ".git"2024-04-21T18:00:49+02:00 [INFO] Opening main db
2024-04-21T18:00:49+02:00 [INFO] Opening main db
2024-04-21T18:00:49+02:00 [INFO] Initializing default prettier with plugins {}
2024-04-21T18:00:49+02:00 [INFO] Initializing default prettier with plugins {}
2024-04-21T18:00:49+02:00 [INFO] starting language server "rust-analyzer", path: "[...]", id: 1
2024-04-21T18:00:49+02:00 [INFO] Initializing default prettier with plugins {}
2024-04-21T18:00:49+02:00 [INFO] fetching latest version of language server "rust-analyzer"
2024-04-21T18:00:50+02:00 [INFO] downloading language server "rust-analyzer"
2024-04-21T18:00:50+02:00 [INFO] starting language server. binary path: "[...]", args: []
2024-04-21T18:01:02+02:00 [ERROR] {
"thread": "main",
"payload": "not enough space in Arena",
"location_data": {
"file": "/Users/administrator/actions-runner-2/_work/zed/zed/crates/gpui/src/arena.rs",
"line": 80
},
"backtrace": [
"backtrace::capture::Backtrace::create",
"backtrace::capture::Backtrace::new",
"Zed::init_panic_hook::{closure#0}",
"std::panicking::rust_panic_with_hook",
"std::panicking::begin_panic_handler::{{closure}}",
"std::sys_common::backtrace::__rust_end_short_backtrace",
"_rust_begin_unwind",
"core::panicking::panic_fmt",
"gpui::element::AnyElement::new::gpui::elements::div::Div",
"<gpui::elements::div::Div as gpui::element::ParentElement>::children::<gpui::elements::div::Div, alloc::vec::Vecgpui::elements::div::Div>",
"markdown_preview::markdown_renderer::render_markdown_block",
"markdown_preview::markdown_renderer::render_markdown_block",
"markdown_preview::markdown_renderer::render_markdown_block",
"<markdown_preview::markdown_preview_view::MarkdownPreviewView>::new::{closure#0}::{closure#0}",
"gpui::elements::list::StateInner::layout_items",
"<gpui::elements::list::List as gpui::element::Element>::after_layout",
"<gpui::element::Drawablegpui::elements::list::List as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"<gpui::view::AnyView as gpui::element::Element>::after_layout",
"<gpui::element::Drawablegpui::view::AnyView as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::element::AnyElement::layout",
"<gpui::view::AnyView as gpui::element::Element>::after_layout::{closure#0}",
"<gpui::view::AnyView as gpui::element::Element>::after_layout",
"<gpui::element::Drawablegpui::view::AnyView as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"<gpui::element::Drawablegpui::element::AnyElement as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}::{closure#0}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}::{closure#1}",
"gpui::elements::div::Interactivity::after_layout::<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}",
"gpui::window::element_cx::ElementContext::with_element_state::<gpui::elements::div::InteractiveElementState, core::option::Optiongpui::window::element_cx::Hitbox, gpui::elements::div::Interactivity::after_layout<core::option::Optiongpui::window::element_cx::Hitbox, <gpui::elements::div::Div as gpui::element::Element>::after_layout::{closure#0}>::{closure#0}>::{closure#0}",
"<gpui::elements::div::Div as gpui::element::Element>::after_layout",
"<gpui::element::Drawable<gpui::elements::div::Statefulgpui::elements::div::Div> as gpui::element::ElementObject>::after_layout",
"<gpui::view::AnyView as gpui::element::Element>::after_layout",
"<gpui::element::Drawablegpui::view::AnyView as gpui::element::ElementObject>::after_layout",
"gpui::element::AnyElement::layout",
"gpui::window::WindowContext::draw",
"gpui::window::Window::new::{closure#2}::{closure#1}",
"gpui::window::Window::new::{closure#2}",
"gpui::platform::mac::window::step",
"<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run",
"gpui::app::App::run::Zed::main::{closure#3}",
"Zed::main",
"std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>",
"std::rt::lang_start::<()>::{closure#0}",
"std::rt::lang_start_internal",
"_main"
],
"app_version": "0.131.6",
"release_channel": "Zed",
"os_name": "macOS",
"os_version": "14.4.1",
"architecture": "aarch64",
"panicked_on": 1713715262955,
"installation_id": "3327696a-d413-48cd-bda3-89ea824f123c",
"session_id": "d88aae04-421d-4132-8932-70ff4f4f1eb1"
}
The text was updated successfully, but these errors were encountered: