-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Debug build of Zed violates unsafe precondition #8658
Comments
Hey, thanks for the report!
Still, this looks like a valid issue for dev builds that are not bundled. |
If you're using nightly then I suppose this is a prime suspect as to why you're experiencing it: rust-lang/rust#120594
Thanks for catching that! |
The patch you've provided looks fine to me, feel free to submit it as a PR :) |
Ah, yep, that's the reason: I set it up last month (for |
Check for existing issues
Describe the bug / provide steps to reproduce it
When I try to run a debug build of Zed I get this error:
The issue's in this bit of code:
zed/crates/gpui/src/platform/mac/platform.rs
Lines 681 to 694 in aeed9d0
It's assumed that if the app's running inside a bundle, that bundle will have a version associated with it. But it doesn't, so
bytes
is null causing the failed unsafe precondition.len
is also 0, which is presumably why it works fine in release mode.Environment
Zed: v0.124.8 (Zed)
OS: macOS 14.3.1
Memory: 16 GiB
Architecture: aarch64
(zed version isn't really relevant because that's the version I have installed, not the version I'm building (eb1ab69))
If applicable, add mockups / screenshots to help explain present your vision of the feature
I already have a fix for the issue:
I'm just opening this issue first because it seems odd that I seem to be the only one having this issue. Surely I'm not the only one building debug versions of Zed during development?
The fact that Zed's running inside a bundle shouldn't be due to any kind of weird way I'm running it, it's just a plain
cargo run
.The docs for
NsBundle::mainBundle()
say that 'This method may return a valid bundle object even for unbundled apps', so it doesn't seem like it's out of the ordinary for Zed to be running inside a bundle even when it's not been manually packaged into one.If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response
The text was updated successfully, but these errors were encountered: