zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed Windowed MacOS Mode not working since upgrade 135.2

Open chriskuchin opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Since upgrading zed 135.2 zed will not open an editor window. Some further experimentation if I use window move to right/left menu option the editor shows up. But expose and other settings don't show it. I also can't move the window once it gets there. It seems that windows mode is broken. If i can get the editor into full screen mode i see it but once it leaves full screen it disappears

Environment

Zed: v0.135.2 (Zed) OS: macOS 14.5.0 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log

chriskuchin avatar May 16 '24 15:05 chriskuchin

Downgrading to 134.4 Gets my windowed mode back

chriskuchin avatar May 16 '24 15:05 chriskuchin

Could you give more details as to how you're trying to trigger this new window? We all use Zed extensively and haven't seen this issue...

Also, would you happen to have Zed open for another user on your machine?

mikayla-maki avatar May 16 '24 22:05 mikayla-maki

So when i open zed fresh from being completely off I don't have a zed window. Nothing. If i use the window menu it will drag something in and full screen it but as soon as I exit full screen it's gone.

Normally this would feel like somehow my window ended up off the screen but downgrading fixed it and in expose when mac shows all open windows zed isn't there.

This is my work laptop and as such it's single user

chriskuchin avatar May 16 '24 22:05 chriskuchin

Same here, if I use the Window->Zoom I get Zed fullscreen, then I can drag it out. After that, it launches normally into windowed mode

nikiiv avatar May 17 '24 08:05 nikiiv

I'm also experiencing this issue. Thanks @nikiiv for the fix. Here's some output from the binary.

2024-05-17 10:12:26.965 Zed[14931:55112967] CAMetalLayer ignoring invalid setDrawableSize width=0.000000 height=0.000000
2024-05-17 10:12:26.975 Zed[14931:55112967] [CAMetalLayer nextDrawable] returning nil because allocation failed.
[2024-05-17T10:12:26-07:00 ERROR gpui::platform::mac::metal_renderer] failed to retrieve next drawable, drawable size: Size { 0 px (device) × 0 px (device) }

jeremyjacob avatar May 17 '24 17:05 jeremyjacob

I am also running into this and I have done a screen recording (below, with audio). Zed team, I will leave my editor in a broken state for the next days, in case you want me to try something

https://github.com/zed-industries/zed/assets/9582/927e0d1f-52c9-4083-949c-b9d73f2975c0

When I run zed --foreground, sometimes it works, sometimes it fails with the same the same reason as @jeremyjacob.

josevalim avatar Jun 07 '24 07:06 josevalim

I'm also seeing this behavior. When I clicked "Window → Zoom" in the menu bar, it resolved the problem, but I noticed an animation that looked like the window originally had a width and height of zero.

It looked very similar to what I show in the screen recording below, except there was no window at all. (In the screen recording there's a very small window that shows the red, yellow, and green macOS window buttons.)

If the windows were present, but with a width and height of zero, that might explain what @josevalim was reporting above.

Here's my Zed.log in case it's helpful (uploaded after I resolved the issue): Zed.log

https://github.com/zed-industries/zed/assets/5033974/4c50d4e6-aafc-4933-80eb-6bff5428f3d7

luca-aurelia avatar Jun 08 '24 16:06 luca-aurelia

I'm wondering if this is related to these other two issues we had with workspace data:

  • https://github.com/zed-industries/zed/issues/12709
  • https://github.com/zed-industries/zed/issues/12549

JosephTLyons avatar Jun 09 '24 03:06 JosephTLyons

Based on the logs, they seem to be unrelated to me. My logs were about "no windows" or about the window having zero width and zero height. Selecting "Zoom" also fixed it for me.

josevalim avatar Jun 09 '24 08:06 josevalim

I have used Zoom to fix it and it happened again after a restart. Here is a video showing the Zoom fixing it once more:

https://github.com/zed-industries/zed/assets/9582/6a2b7d44-8b54-4893-bd8e-d25665fcf286

EDIT: here is the log I got when zooming it again:

[2024-06-09T22:32:10+02:00 ERROR util] crates/gpui/src/window.rs:755: window not found

josevalim avatar Jun 09 '24 08:06 josevalim

Interesting, might be related to

  • #12930

mijailr avatar Jun 15 '24 22:06 mijailr

I believe this has been solved. If you are still experiencing this issue, you should be able to blow away your workspace database with:

cd ~/Library/Application\ Support/Zed/db
ls
rm -rf 0-stable 0-preview

Thanks for reporting!

notpeter avatar Nov 26 '24 20:11 notpeter