zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
42.33k stars 2.23k forks source link

project diagnostic scroll not working when warning are excluded/not re-rendering on diagnostic update #12281

Open JustFrederik opened 1 month ago

JustFrederik commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When switching between show warnings and not to show the warnings the scroll stops working. Some of the area is still scrollable, but at random point it still allows me scroll, but resets the scroll progress instantly. When switching back to show warning zed freezes. The failed scroll does not cause any log messages. Below is the log of the task kill. I don't know if this error was caused by the freeze or the force quit.

I had this issue before. It disappeared and reappeared. I restarted zed 3-4 times and it isn't happening anymore

Environment

Zed: v0.137.2 (Zed Preview) OS: macOS 14.0.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed[908bfce40e71668d]::reliability::monitor_main_thread_hangs::handle_backtrace_signal::handle_sigusr2 platform_memmove <project[820c6ddaa5d4229d]::Project>::get_open_buffer <diagnostics[85d7d1f924d7dcea]::ProjectDiagnosticsEditor>::new_with_context::{closure#6}::{closure#0} <async_task[225c3c098774b7a]::raw::RawTask<<asynctask[225c3c098774b7a]::runnable::Builder<>>::spawn_local::Checked<core[f61c09f58d048be3]::pin::Pin<alloc[ccf9bc335c0c6a37]::boxed::Box<dyn core[f61c09f58d048be3]::future::future::Future<Output = core[f61c09f58d048be3]::result::Result<(), anyhow[779edc5d6962ac8a]::Error>>>>>, core[f61c09f58d048be3]::result::Result<(), anyhow[779edc5d6962ac8a]::Error>, <gpui[e035c6c3f023eea6]::executor::ForegroundExecutor>::spawn::inner<core[f61c09f58d048be3]::result::Result<(), anyhow[779edc5d6962ac8a]::Error>>::{closure#0}, ()>>::run <gpui[e035c6c3f023eea6]::platform::mac::platform::MacPlatform as gpui[e035c6c3f023eea6]::platform::Platform>::run <gpui[e035c6c3f023eea6]::app::App>::run::<Zed[908bfce40e71668d]::main::{closure#3}> Zed[908bfce40e71668d]::main std[73ec08d302f978e7]::sys_common::backtrace::rust_begin_short_backtrace::<fn(), ()> std[73ec08d302f978e7]::rt::lang_start::<()>::{closure#0} std::rt::lang_start_internal::h39923ab4c3913741 _main

JustFrederik commented 1 month ago

it seems like this issue appears when the diagnostics is updating. Cargo check is updating(external change/not in diagnostic window), but the page isn't re-rendered. Issues that were fixed still appear & the scroll issue. Closing the window helps until the next change