Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Joseph Lyons
f6784e16e4 v0.81.x stable 2023-04-12 13:31:19 -04:00
Julia
32b6c2e66b Hesitant possible fix for lock screen crash
This may cause issues in this situations but as I cannot repro this I'm
making the call to try something and see how it plays out
2023-04-10 12:27:59 -04:00
Antonio Scandurra
d74233162c zed 0.81.1 2023-04-10 08:52:35 +02:00
Antonio Scandurra
ca82dfa9d2 Merge pull request #2366 from zed-industries/avoid-unwrapping-on-try-send
Don't panic if worktree was dropped before sending path changes
2023-04-10 08:52:11 +02:00
Joseph Lyons
eb8166fb16 Put file location details of panic on separate line 2023-04-07 14:32:20 -04:00
Joseph T. Lyons
a3e46e030b Merge pull request #2364 from zed-industries/put-backtrace-on-a-newline-when-reporting-panics
Put backtrace on a new line when reporting panics
2023-04-07 12:49:44 -04:00
Joseph Lyons
53b4823afa v0.81.x preview 2023-04-05 13:00:39 -04:00
6 changed files with 14 additions and 8 deletions

2
Cargo.lock generated
View file

@ -8515,7 +8515,7 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zed"
version = "0.81.0"
version = "0.81.1"
dependencies = [
"activity_indicator",
"anyhow",

View file

@ -65,8 +65,15 @@ impl platform::Screen for Screen {
// This approach is similar to that which winit takes
// https://github.com/rust-windowing/winit/blob/402cbd55f932e95dbfb4e8b5e8551c49e56ff9ac/src/platform_impl/macos/monitor.rs#L99
let device_description = self.native_screen.deviceDescription();
let key = ns_string("NSScreenNumber");
let device_id_obj = device_description.objectForKey_(key);
if device_id_obj.is_null() {
// Under some circumstances, especially display re-arrangements or display locking, we seem to get a null pointer
// to the device id. See: https://linear.app/zed-industries/issue/Z-257/lock-screen-crash-with-multiple-monitors
return None;
}
let mut device_id: u32 = 0;
CFNumberGetValue(
device_id_obj as CFNumberRef,

View file

@ -841,8 +841,7 @@ impl LocalWorktree {
.unwrap()
.path_changes_tx
.try_send((vec![abs_path], tx))
.unwrap();
});
})?;
rx.recv().await;
Ok(())
}))
@ -933,7 +932,7 @@ impl LocalWorktree {
}
let (tx, mut rx) = barrier::channel();
path_changes_tx.try_send((paths, tx)).unwrap();
path_changes_tx.try_send((paths, tx))?;
rx.recv().await;
this.upgrade(&cx)
.ok_or_else(|| anyhow!("worktree was dropped"))?

View file

@ -3,7 +3,7 @@ authors = ["Nathan Sobo <nathansobo@gmail.com>"]
description = "The fast, collaborative code editor."
edition = "2021"
name = "zed"
version = "0.81.0"
version = "0.81.1"
publish = false
[lib]

View file

@ -1 +1 @@
dev
stable

View file

@ -336,7 +336,7 @@ fn init_panic_hook(app_version: String) {
let message = match info.location() {
Some(location) => {
format!(
"thread '{}' panicked at '{}': {}:{}{:?}",
"thread '{}' panicked at '{}'\n{}:{}\n{:?}",
thread,
payload,
location.file(),
@ -345,7 +345,7 @@ fn init_panic_hook(app_version: String) {
)
}
None => format!(
"thread '{}' panicked at '{}'{:?}",
"thread '{}' panicked at '{}'\n{:?}",
thread, payload, backtrace
),
};