zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed crash while doing search

Open flavienbonvin opened this issue 7 months ago • 10 comments

Summary

Zed crashed when performing some search on a large monorepo

Description

I'm working at Proton on this monorepo: https://github.com/ProtonMail/WebClients

When doing some search, the application will instantly crash and close. This has happened on multiple Zed versions (both preview and regular). The report concerns Zed 0.186.11.

Steps to trigger the problem:

  1. Clone the Proton repo
  2. Search for "Mail Subscriptions" in the repo
  3. Check "Match whole words"
  4. The application crash

Actual Behavior: The application crashes Expected Behavior: the application should not crash

IPS crash file: https://gist.github.com/flavienbonvin/0c77d8a719e9d6436e80890b09183494

Zed Version and System Specs

Zed: v0.186.11 (Zed) OS: macOS 15.4.1 Memory: 36 GiB Architecture: aarch64

Zed.log
2025-05-20T09:37:16+02:00 INFO  [zed] ========== starting zed ==========
2025-05-20T09:37:16+02:00 INFO  [db] Opening main db
2025-05-20T09:37:16+02:00 INFO  [db] Opening main db
2025-05-20T09:37:16+02:00 INFO  [zed] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2025-05-20T09:37:16+02:00 INFO  [util] set environment variables from shell:/opt/homebrew/bin/fish, path:/Users/fbonvin/.bun/bin:/Users/fbonvin/.local/bin:/Users/fbonvin/.local/share/nvm/v22.12.0/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
2025-05-20T09:37:16+02:00 INFO  [prompt_store::prompts] No prompt template overrides directory found at /Users/fbonvin/.config/zed/prompt_overrides. Using built-in prompts.
2025-05-20T09:37:16+02:00 INFO  [assistant_tools::terminal_tool] agent selected bash for terminal tool
2025-05-20T09:37:16+02:00 INFO  [extension_host] extensions updated. loading 10, reloading 0, unloading 0
2025-05-20T09:37:16+02:00 INFO  [db] Opening main db
2025-05-20T09:37:16+02:00 WARN  [theme] Theme "Aura Dark" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:37:17+02:00 WARN  [theme] Theme "Aura Soft Dark (Soft Text)" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:37:17+02:00 WARN  [theme] Theme "Aura Soft Dark" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:37:17+02:00 WARN  [theme] Theme "Aura Dark (Soft Text)" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:37:17+02:00 INFO  [client] set status on client 0: Authenticating
2025-05-20T09:37:17+02:00 INFO  [client] set status on client 127723: Connecting
2025-05-20T09:37:17+02:00 INFO  [db] Opening main db
2025-05-20T09:37:17+02:00 INFO  [project::debugger::breakpoint_store] Finish deserializing breakpoints & initializing breakpoint store
2025-05-20T09:37:17+02:00 INFO  [db] Opening main db
2025-05-20T09:37:17+02:00 INFO  [client] connected to rpc endpoint https://collab.zed.dev/rpc
2025-05-20T09:37:17+02:00 INFO  [project::environment] using project environment variables shell launched in "/Users/fbonvin/Developer/proton/clients". PATH="/Users/fbonvin/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/fbonvin/.bun/bin:/Users/fbonvin/.local/bin:/Users/fbonvin/.local/share/nvm/v22.12.0/bin"
2025-05-20T09:37:17+02:00 INFO  [rpc::peer] add_connection;
2025-05-20T09:37:17+02:00 INFO  [client] set status on client 127723: Connected { peer_id: PeerId { owner_id: 774, id: 201923 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2025-05-20T09:38:32+02:00 INFO  [workspace] open paths ["/Users/fbonvin/Library/Logs/Zed/Zed.log"]
2025-05-20T09:38:32+02:00 INFO  [db] Opening main db
2025-05-20T09:38:49+02:00 ERROR [zeta] edit prediction failed

Caused by:
    error predicting edits.
    Status: 500
    Body: INTERNAL SERVER ERROR
2025-05-20T09:39:00+02:00 INFO  [project::prettier_store] Initializing default prettier with plugins {}
2025-05-20T09:39:05+02:00 INFO  [zed] ========== starting zed ==========
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 INFO  [zed] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2025-05-20T09:39:05+02:00 INFO  [util] set environment variables from shell:/opt/homebrew/bin/fish, path:/Users/fbonvin/.bun/bin:/Users/fbonvin/.local/bin:/Users/fbonvin/.local/share/nvm/v22.12.0/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
2025-05-20T09:39:05+02:00 INFO  [prompt_store::prompts] No prompt template overrides directory found at /Users/fbonvin/.config/zed/prompt_overrides. Using built-in prompts.
2025-05-20T09:39:05+02:00 INFO  [assistant_tools::terminal_tool] agent selected bash for terminal tool
2025-05-20T09:39:05+02:00 INFO  [extension_host] extensions updated. loading 10, reloading 0, unloading 0
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 WARN  [theme] Theme "Aura Dark" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:39:05+02:00 WARN  [theme] Theme "Aura Soft Dark (Soft Text)" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:39:05+02:00 WARN  [theme] Theme "Aura Soft Dark" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:39:05+02:00 WARN  [theme] Theme "Aura Dark (Soft Text)" is using a deprecated style property: scrollbar_thumb.background. Use `scrollbar.thumb.background` instead.
2025-05-20T09:39:05+02:00 INFO  [client] set status on client 0: Authenticating
2025-05-20T09:39:05+02:00 INFO  [client] set status on client 127723: Connecting
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 INFO  [workspace] open paths ["/Users/fbonvin/Library/Logs/Zed/Zed.log"]
2025-05-20T09:39:05+02:00 INFO  [db] Opening main db
2025-05-20T09:39:05+02:00 INFO  [project::debugger::breakpoint_store] Finish deserializing breakpoints & initializing breakpoint store
2025-05-20T09:39:05+02:00 INFO  [client] connected to rpc endpoint https://collab.zed.dev/rpc
2025-05-20T09:39:05+02:00 INFO  [project::environment] using project environment variables shell launched in "/Users/fbonvin/Developer/proton/clients". PATH="/Users/fbonvin/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/fbonvin/.bun/bin:/Users/fbonvin/.local/bin:/Users/fbonvin/.local/share/nvm/v22.12.0/bin"
2025-05-20T09:39:06+02:00 INFO  [rpc::peer] add_connection;
2025-05-20T09:39:06+02:00 INFO  [client] set status on client 127723: Connected { peer_id: PeerId { owner_id: 774, id: 202863 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2025-05-20T09:39:55+02:00 INFO  [worktree] root renamed from /Users/fbonvin/Library/Logs/Zed/Zed.log to /Users/fbonvin/Library/Logs/Zed/search_crash.log
2025-05-20T09:42:41+02:00 INFO  [db] Opening main db

flavienbonvin avatar May 20 '25 07:05 flavienbonvin

Hello! I'm new here, but I'm interested in contributing. I don't know how hard it is, but I'm willing to give it a try. It seems the problem is somewhere near here. Let me know if there's anything I should know before I start!

sami-daniel avatar May 21 '25 00:05 sami-daniel

I'm not sure about that, but on my Zed Ide (also the same version, but on Linux) the error doesn't occur when doing the same query, under the same project. Maybe something in the settings or something else could have caused this. Is there anything else you can share about your IDE specifically?

sami-daniel avatar May 22 '25 00:05 sami-daniel

The repo on GitHub is a mirror of the private repo we have at work. Parts of the code are not open-sourced and could cause the issue. That being said, I think that logs could be more helpful than reproducing the issue. I can share logs of crashes as they happen.

For example, I just had a crash when pulling data from the main branch from the integrated terminal.

Here is the log: Zed.log And the IPS log: https://gist.github.com/flavienbonvin/1c9481b99a7af1d1173b05f842f5b657

flavienbonvin avatar May 22 '25 09:05 flavienbonvin

I too was unable to reproduce with your steps on a clean repo checkout. I'm assuming there might be some files in the non-public checkout which is triggering the issue.

Would it be possible for you to repeat the search a few times, but only including a single directory so you can bisect to which folders/files might be triggering the issue, ideally isolating to a single file?

notpeter avatar May 22 '25 18:05 notpeter

@flavienbonvin, could you please provide the .ips file instead? Open the Console app, navigate to the Crash Reports tab, and locate the same crash report you sent as a .txt file above. Right-click on the report to reveal it in the Finder.

smitbarmase avatar May 30 '25 00:05 smitbarmase

Sorry for not responding sooner. Without a clear understanding of the circumstances and occasions, it is difficult to correct the error. As other colleagues have said, it would be clearer if you reproduced the error in other ways.

sami-daniel avatar May 30 '25 23:05 sami-daniel

@smitbarmase I cannot upload .ips files. This is why I put the content of two crashes in two different gists:

  • https://gist.github.com/flavienbonvin/1c9481b99a7af1d1173b05f842f5b657
  • https://gist.github.com/flavienbonvin/0c77d8a719e9d6436e80890b09183494

I am not sure how I can share .ips files.

flavienbonvin avatar Jun 02 '25 13:06 flavienbonvin

You can follow these steps:

https://github.com/user-attachments/assets/b8fc9ac8-5086-4487-a310-fb51784c4235

smitbarmase avatar Jun 02 '25 13:06 smitbarmase

The problem is that the file cannot be uploaded on GitHub.

Image

The two gists contain the whole content of two IPS files.

I uploaded tow of the IPS file here: https://drive.proton.me/urls/FN7Y4F492W#JSubg1ogvsao

flavienbonvin avatar Jun 02 '25 14:06 flavienbonvin

We have a script that takes .ips files and shows cleaner and readable crash logs and where they actually occurred. Turning those .txt files to .ips files wasn't working; there might be something more to the .ips format. The drive link you sent will help a lot in debugging this. Thank you!

smitbarmase avatar Jun 02 '25 15:06 smitbarmase

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 11:11 github-actions[bot]