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

Some font configurations make zed completely unresponsive. #5554

Closed
shot-codes opened this issue Jul 7, 2022 · 11 comments
Closed

Some font configurations make zed completely unresponsive. #5554

shot-codes opened this issue Jul 7, 2022 · 11 comments
Labels
defect [core label]

Comments

@shot-codes
Copy link

shot-codes commented Jul 7, 2022

Describe the bug
I set the buffer_font_family to "Iosevka" and Zed becomes completely unresponsive. I get a Mac spinning beach ball cursor, and when I force quit the app I am not able to open it again. I am only able to make it responsive again by changing the font configuration in the settings files from elsewhere, after which it works fine.

To reproduce
Set buffer_font_family to "Iosevka".

Expected behavior
Either the font changes or nothing happens if it is misconfigured, but it shouldn't become unresponsive.\

Environment:

Zed 0.45.0 – /Applications/Zed.app 
macOS 12.4 
architecture x86_64

Zed.log

@shot-codes shot-codes added defect [core label] triage Maintainer needs to classify the issue labels Jul 7, 2022
@shot-codes
Copy link
Author

shot-codes commented Jul 7, 2022

Hmm, I left the machine for about 30 minutes and it appears to have stabalized. Was unresponsive for at least 10 minutes though. Now I can freely change between Iosevka and and Zed Mono and Zed is perfectly happy.

@iamnbutler
Copy link
Member

I can't seem to reproduce this one, curious what happened here.

@JosephTLyons JosephTLyons removed the triage Maintainer needs to classify the issue label Jul 9, 2022
@shot-codes
Copy link
Author

shot-codes commented Jul 14, 2022

I actually still see this. It occurs when I launch Zed, the application is unresponsive for about 10 minutes before finally opening. Then It is happy to change between fonts until I quit it again.

I should note, I am using Yabai (https://github.com/koekeishiya/yabai) as my window manager and its possible that the combo is somehow causing the issue. Just a thought.

@l0go
Copy link

l0go commented Jul 14, 2022

While I have not changed my font, I am using Yabai myself and it works fine for me.

@shot-codes
Copy link
Author

The issue is most definitely related to the font change, as when I just use the default Zed Mono I see no issues either, but thought I would provide the additional context. If you could try to change the font to Iosevka it would be interesting to see if you were able to reproduce the issue? I've downloaded it from here and set it in .zed/settings.json with "buffer_font_family": "Iosevka". For me Zed becomes unresponsive the moment I save the settings, and you can easy revery by changing the settings file back from somewhere else.

@iamnbutler
Copy link
Member

The issue is most definitely related to the font change, as when I just use the default Zed Mono I see no issues either, but thought I would provide the additional context. If you could try to change the font to Iosevka it would be interesting to see if you were able to reproduce the issue? I've downloaded it from here and set it in .zed/settings.json with "buffer_font_family": "Iosevka". For me Zed becomes unresponsive the moment I save the settings, and you can easy revery by changing the settings file back from somewhere else.

Hmm, this is the second time Iosevka has come up. Can you see if this happens with any other font family?

@shot-codes
Copy link
Author

@iamnbutler I think the other issue you are referring to was also from me. I will try to see if I can replicate it with another font.

@mikayla-maki
Copy link
Contributor

mikayla-maki commented Jul 20, 2022

Note: was pairing with @iamnbutler and attempted to set the terminal font to Iosevka Term. Nate's Zed crashed and would not open until we removed it from the ~/.zed/setting.json file. In attempting to reproduce this, I downloaded the 15.6.0 release from their github and attempted to install it. It ate all of my computer's application memory and then quit with an error warning that installing it might crash my system. We believe this is because the Iosevka font is some 150mb large when uncompressed. I did not investigate further as I don't know enough about fonts to troubleshoot the issue. It seems like Zed cannot handle certain kinds of errors caused by the kernel struggling with a font.

I am on a 2020 MacBook Air with 8gb of memory.
Zed 0.48.1 – /Applications/Zed.app
macOS 12.3.1
architecture arm64

@as-cii as-cii mentioned this issue Aug 1, 2022
46 tasks
@jansol
Copy link
Contributor

jansol commented Feb 27, 2023

I ran into what I suspect is the same issue, while editing the buffer font I wasn't sure of the exact font name for "VictorMono Nerd Font" so went through a couple of variations, and occasionally the buffer would become seemingly read-only? Moving the cursor worked fine, as did (sometimes) backspacing, but writing did not seem to do anything.

After closing and reopening the file everything was working again.

@winniequinn
Copy link

I can confirm that this still seems to be an issue in Zed 0.77.3 with Iosevka 21.1.1 installed via the super-ttc-iosevka-21.1.1.zip release on an Intel machine running macOS 13.1 (22C65). I believe this may be due to the fact that the "iosevka.ttc" file is 259.6 MB.

If, however, I install the same font as several smaller files via the ttc-iosevka-21.1.1.zip release, things mostly work okay. The editor locks up for 3–5 seconds upon changing the font family setting and upon every launch thereafter—possibly because each of the smaller files is still approximately 40 MB—but it's better than the seemingly permanent hang I run into with the single, massive font file.

For whatever it's worth, I have no issue with either release of Iosevka in Visual Studio Code, IntelliJ, Fleet, Xcode, Terminal, TextEdit, et cetera. I'm not sure what Zed is doing differently here.

(No "zed.log" included because nothing gets logged at all beyond "starting zed" and the setting of environment variables.)

osiewicz referenced this issue Jan 15, 2024
Details are in zed-industries/font-kit#1; We're
not doing anything too fancy, really. Still, you should mostly see font
loading times drop significantly for font collections
Release Notes:
- Improved loading performance of large font collections (e.g. Iosevka).
Fixes https://github.com/zed-industries/community/issues/1745,
https://github.com/zed-industries/community/issues/246


https://github.com/zed-industries/zed/assets/24362066/f70edbad-ded6-4c12-9c6d-7a487f330a1b
@JosephTLyons
Copy link
Contributor

This should be fixed in v0.119.9-pre - please reopen if the issue persists.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label]
Projects
None yet
Development

No branches or pull requests

7 participants