# Fix crash when dumping debug buffers in a collab session \(\#61616\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e191dd00c7e36cfcbbdccad2babca096067777c0

Requested commit: e191dd00c7e36cfcbbdccad2babca096067777c0

Commit: e191dd00c7e36cfcbbdccad2babca096067777c0

Tree: c9b57005726bb59f8c01ac243cf040c19179109b

Author: Eric Holk

Committer: GitHub

## Message

```
Fix crash when dumping debug buffers in a collab session (#61616)

The `dev: dump input latency histogram` and `dev: dump accessibility
tree` actions called `Project::create_local_buffer`, which panics on
remote projects — so running either one as a guest in a collab session
aborted the whole app. Both now use the async `Project::create_buffer` +
`set_text` instead (the same pattern `open_log_file` uses), which routes
through the collab protocol on remote projects.

Since the collab-created buffer is visible to other participants, the
latency report now includes a "Reported from <username>'s machine" line
when the project is shared, using the collab username so we don't expose
anything that isn't already shared with the session.

While restructuring the handler I also split snapshotting from
formatting: the histogram snapshot (and the delta baseline) is captured
synchronously when the action fires, and the report string is built on a
background task. The accessibility tree dump stays synchronous because
gpui doesn't currently expose the captured tree data outside the window
borrow, and adding public API for a debug action's JSON pretty-print
didn't seem worth it.

Release Notes:

- Fixed a crash when running the `dev: dump input latency histogram` or
`dev: dump accessibility tree` actions in a shared project.
```

## Parents

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

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