Skip to content
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

Avoid unwrap in file finder #18374

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Avoid unwrap in file finder #18374

merged 2 commits into from
Sep 26, 2024

Conversation

ConradIrwin
Copy link
Member

Release Notes:

  • Fixed a (rare) panic in file finder

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 26, 2024
@SomeoneToIgnore SomeoneToIgnore merged commit b701eab into main Sep 26, 2024
9 checks passed
@SomeoneToIgnore SomeoneToIgnore deleted the avoid-unwrap branch September 26, 2024 07:31
@mattrobenolt
Copy link

I just came across this tracking down this crash. I get this extremely consistently in 0.154.2 and it's extremely simply in one of my projects to reproduce.

I'm not sure the release process, but it'd be great to get this into 0.154.3 since this has basically completely broken Cmd+P for me. :)

I doubt this isn't something you're unaware of, but here's the full stacktrace for posterity and to help others potentially find this:

{
  "thread": "main",
  "payload": "candidate info not found",
  "location_data": {
    "file": "crates/file_finder/src/file_finder.rs",
    "line": 417
  },
  "backtrace": [
    "<backtrace::capture::Backtrace>::create",
    "<backtrace::capture::Backtrace>::new",
    "zed::reliability::init_panic_hook::{closure#0}",
    "std::panicking::rust_panic_with_hook",
    "std::panicking::begin_panic_handler::{{closure}}",
    "std::sys::backtrace::__rust_end_short_backtrace",
    "_rust_begin_unwind",
    "core::panicking::panic_fmt",
    "core::option::expect_failed",
    "file_finder::matching_history_items::<&alloc::vec::Vec<file_finder::FoundPath>>",
    "<file_finder::FileFinderDelegate>::spawn_search::{closure#2}::{closure#0}",
    "<async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pi
n::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = ()>>>>, (), <gpui::executor::
ForegroundExecutor>::spawn::inner<()>::{closure#0}, ()>>::run",
    "gpui::platform::mac::dispatcher::trampoline",
    "<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run",
    "<gpui::app::App>::run::<zed::main::{closure#5}>",
    "zed::main",
    "std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>",
    "std::rt::lang_start::<()>::{closure#0}",
    "std::rt::lang_start_internal",
    "_main"
  ],
  "app_version": "0.154.2",
  "release_channel": "Zed",
  "os_name": "macOS",
  "os_version": "15.0.0",
  "architecture": "aarch64",
  "panicked_on": 1727410960186,
  "system_id": "620baf89-3bab-43d0-a0bd-b6dcd0cc722b",
  "installation_id": "d4c39ede-73ae-4dcc-8137-2caa5abee571",
  "session_id": "2dd3cc92-cdba-401f-a790-e67d018159e5"
}

@SomeoneToIgnore
Copy link
Contributor

Sounds very sad, sorry for spoiling this.

Will pick the code for the new release, but no promises when that gets released — I'll wait for more fixes just in case something appears by the end of the day.

SomeoneToIgnore added a commit that referenced this pull request Sep 27, 2024
Release Notes:

- Fixed a (rare) panic in file finder

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
SomeoneToIgnore added a commit that referenced this pull request Sep 27, 2024
Release Notes:

- Fixed a (rare) panic in file finder

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
schpet added a commit to schpet/zed that referenced this pull request Sep 27, 2024
…reee

* origin/main:
  git blame gutter: Use smallest possible space (zed-industries#18145)
  Fix minimum gutter line number spacing (zed-industries#18021)
  terraform: Bump to v0.1.1 (zed-industries#18382)
  lsp: Do not notify all language servers on file save (zed-industries#17756)
  Remove leftover println statements (zed-industries#18389)
  Fix `use_on_type_format` setting being unused per language (zed-industries#18387)
  Avoid panic by only restoring workspace if UI has launched (zed-industries#18386)
  Fix Typo in rust language guide (zed-industries#18383)
  editor: Fix cursor shape not restoring when setting removed (zed-industries#18379)
  Avoid unwrap in file finder (zed-industries#18374)
@mattrobenolt
Copy link

0.154.3 has been stable so far! Thank you. <3

noaccOS pushed a commit to noaccOS/zed that referenced this pull request Oct 19, 2024
Release Notes:

- Fixed a (rare) panic in file finder

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants