# Use proper buffer versions when \[de\]serializing hint proto requests \(\#8502\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e2bcb2828692ecfafd2891bf528bd799337e298c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e2bcb2828692ecfafd2891bf528bd799337e298c

Requested commit: e2bcb2828692ecfafd2891bf528bd799337e298c

Commit: e2bcb2828692ecfafd2891bf528bd799337e298c

Tree: 96c9cee2858eedcf15d0cf8e263db022d3e0a9ba

Author: Kirill Bulatov

Committer: GitHub

## Message

````
Use proper buffer versions when [de]serializing hint proto requests (#8502)

During inlay hint<->proto conversions, uses proper buffer versions and
never carries them across the .await points, to fix the
```
thread 'main' panicked at 'invalid anchor Anchor { timestamp: Lamport {0: 8558}, offset: 54, bias: Right, buffer_id: Some(BufferId(8)) }. buffer id: 8, version: Global {0: 8546, 1: 8378}'
/Users/administrator/actions-runner-2/_work/zed/zed/crates/text/src/text.rs:1919
<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
<text::BufferSnapshot>::summary_for_anchor::<usize>
<multi_buffer::anchor::Anchor as multi_buffer::ToOffset>::to_offset
<editor::display_map::DisplayMap>::splice_inlays
<editor::Editor>::splice_inlay_hints
editor::inlay_hint_cache::fetch_and_update_hints::{closure#0}::{closure#0}
<async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(), anyhow::Error>>>>>, core::result::Result<(), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(), anyhow::Error>>::{closure#0}, ()>>::run
<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
Zed::main
std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
std::rt::lang_start::<()>::{closure#0}
std::rt::lang_start_internal
_main
```
class of panics.


Release Notes:

- Fixed occasional panics during collaborative editing with inlay hints
on both sides

Co-authored-by: Conrad <conrad@zed.dev>
````

## Parents

- [89caf06dbef7261285d496316e63662b6a57fd86](https://git.cafe/gitcafe/zed/commit/89caf06dbef7261285d496316e63662b6a57fd86?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e2bcb2828692ecfafd2891bf528bd799337e298c?format=markdown)
