zed
zed copied to clipboard
UI breaks on large text display (here particular case reported upon git blame call)
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
Large text display causes UI interface breakage.
In this particular example this was invocation of git blame
within ZED that causes interface to break. I usually work in three panes, this is what happens when I turn git blame.
This issue is not new, it has been here for quite some time. Recently, it just got more annoying, meaning occurring more frequently, hence I am guessing this could be related to some recursion(?). Usually, the only thing that helps is ZED restart. In some case (like below log display breakage) closing the tab results in ZED to return to its "normal" state.
The issue is also not only inherent to git blame
, but rather to the large amount of text that shows up within a single document. I have seen similar behavior with larger Markdown/Txt/Code
documents, when one is opened, the interface breaks causing similar glitches or wrong rendering of the text/code within the document. In attached example, you can actually see blame feedback displayed correctly, but the panes display is broken.
I just reopen the ZED and after viewing the log I tried to select the relevant bits of the log to copy and this has happened (this means even log
file display at this point causes this):
(*the log for the second event is shown below as well)
Environment
Zed: v0.135.1 (Zed Preview)
OS: macOS 14.4.1
Memory: 32 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
See above description for details of resulted BUG.
If applicable, attach your ~/Library/Logs/Zed/Zed.log
file to this issue.
After restart ZED log seems to show somewhat a buffer overflow such as:
[... lots of line looking identical ...]
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:52-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:24:53-05:00 [ERROR] scene too large: 0 paths, 3 shadows, 158 quads, 0 underlines, 19113 mono, 1 poly, 0 surfaces
2024-05-09T09:25:05-05:00 [INFO] ========== starting zed ==========
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] Using git binary path: Some("/Applications/Zed Preview.app/Contents/MacOS/git")
2024-05-09T09:25:05-05:00 [ERROR] crates/theme/src/settings.rs:439: theme not found: Krstp Theme
2024-05-09T09:25:05-05:00 [INFO] extensions updated. loading 18, reloading 0, unloading 0
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] set status on client 0: Authenticating
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] set status on client 73716: Connecting
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:06-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:06-05:00 [INFO] Node runtime install_if_needed
2024-05-09T09:25:06-05:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-05-09T09:25:06-05:00 [INFO] set environment variables from shell:/bin/zsh, path:/Users/krstp/bin/google-cloud-sdk/bin:/Users/krstp/.pyenv/shims:~/.pyenv/bin:~/bin/:/opt/homebrew/Cellar/pyenv-virtualenv/1.2.3/shims:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/go/bin:/Users/krstp/.cargo/bin:/Users/krstp/bin/docker
2024-05-09T09:25:06-05:00 [INFO] starting language server. binary path: "/Users/krstp/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/", args: ["/Users/krstp/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-05-09T09:25:06-05:00 [INFO] reload git repository ".git"
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-05-09T14:25:06.676Z] Agent service starting",
"metadataStr": "[DEBUG] [agent] [2024-05-09T14:25:06.676Z]",
"extra": [
"Agent service starting"
]
}
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
"registrations": [
{
"id": "9696b5d6-1aca-4b67-bd34-ecbec9db54ea",
"method": "workspace/didChangeWorkspaceFolders",
"registerOptions": {}
}
]
}
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-05-09T14:25:06.686Z] Telemetry initialized",
"metadataStr": "[DEBUG] [agent] [2024-05-09T14:25:06.686Z]",
"extra": [
"Telemetry initialized"
]
}
2024-05-09T09:25:06-05:00 [INFO] add connection to peer
2024-05-09T09:25:06-05:00 [INFO] add_connection;
2024-05-09T09:25:06-05:00 [INFO] waiting for server hello
2024-05-09T09:25:06-05:00 [INFO] got server hello
2024-05-09T09:25:06-05:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 402, id: 2809343 })
2024-05-09T09:25:06-05:00 [INFO] set status on client 73716: Connected { peer_id: PeerId { owner_id: 402, id: 2809343 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-05-09T09:25:07-05:00 [INFO] reload git repository ".git"
Second UI flake-out seems the result in similar log:
2024-05-09T09:25:05-05:00 [INFO] ========== starting zed ==========
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] Using git binary path: Some("/Applications/Zed Preview.app/Contents/MacOS/git")
2024-05-09T09:25:05-05:00 [ERROR] crates/theme/src/settings.rs:439: theme not found: Krstp Theme
2024-05-09T09:25:05-05:00 [INFO] extensions updated. loading 18, reloading 0, unloading 0
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] set status on client 0: Authenticating
2024-05-09T09:25:05-05:00 [INFO] Opening main db
2024-05-09T09:25:05-05:00 [INFO] set status on client 73716: Connecting
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:05-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:06-05:00 [INFO] Initializing default prettier with plugins {}
2024-05-09T09:25:06-05:00 [INFO] Node runtime install_if_needed
2024-05-09T09:25:06-05:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-05-09T09:25:06-05:00 [INFO] set environment variables from shell:/bin/zsh, path:/Users/krstp/bin/google-cloud-sdk/bin:/Users/krstp/.pyenv/shims:~/.pyenv/bin:~/bin/:/opt/homebrew/Cellar/pyenv-virtualenv/1.2.3/shims:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/go/bin:/Users/krstp/.cargo/bin:/Users/krstp/bin/docker
2024-05-09T09:25:06-05:00 [INFO] starting language server. binary path: "/Users/krstp/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/", args: ["/Users/krstp/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-05-09T09:25:06-05:00 [INFO] reload git repository ".git"
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-05-09T14:25:06.676Z] Agent service starting",
"metadataStr": "[DEBUG] [agent] [2024-05-09T14:25:06.676Z]",
"extra": [
"Agent service starting"
]
}
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
"registrations": [
{
"id": "9696b5d6-1aca-4b67-bd34-ecbec9db54ea",
"method": "workspace/didChangeWorkspaceFolders",
"registerOptions": {}
}
]
}
2024-05-09T09:25:06-05:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
"level": 0,
"message": "[DEBUG] [agent] [2024-05-09T14:25:06.686Z] Telemetry initialized",
"metadataStr": "[DEBUG] [agent] [2024-05-09T14:25:06.686Z]",
"extra": [
"Telemetry initialized"
]
}
2024-05-09T09:25:06-05:00 [INFO] add connection to peer
2024-05-09T09:25:06-05:00 [INFO] add_connection;
2024-05-09T09:25:06-05:00 [INFO] waiting for server hello
2024-05-09T09:25:06-05:00 [INFO] got server hello
2024-05-09T09:25:06-05:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 402, id: 2809343 })
2024-05-09T09:25:06-05:00 [INFO] set status on client 73716: Connected { peer_id: PeerId { owner_id: 402, id: 2809343 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-05-09T09:25:07-05:00 [INFO] reload git repository ".git"
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 159 quads, 0 underlines, 18653 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 159 quads, 0 underlines, 18664 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 159 quads, 0 underlines, 18767 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18775 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18776 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18770 mono, 1 poly, 0 surfaces
2024-05-09T09:29:05-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18749 mono, 1 poly, 0 surfaces
2024-05-09T09:29:06-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18709 mono, 1 poly, 0 surfaces
2024-05-09T09:29:06-05:00 [ERROR] scene too large: 0 paths, 0 shadows, 158 quads, 0 underlines, 18732 mono, 1 poly, 0 surfaces
2024-05-09T09:29:06-05:00 [ERROR] scene too large: 0 paths, 0 sh
FYI: I have been just working on some other large files, drag'n'dropping etc., and this issue is now worse that it used to be.
Hey! Yeah, I don't think the problem is directly related to git blame
, more to rendering too much text. I've had many panes open myself and never ran into this.
Can you reliably reproduce this? If so, what are the steps to reproduce?
This is what I tried to convey... it is not directly related to git blame
. Initially, I reported it this way, thinking it might help to pin point the problem.
On the second note, indeed it refers to rendering of "too much text".
It is hard to reproduce it 1-to-1, but there are the steps:
- have the editor with a project tree view opened on the left side; it might help actually to have two projects opened in separate windows, but even one should suffice.
- in addition to the side tree, have at least three panes open side by side
- in each pane have multiple tabs open
- makes sure each pane has at least three tabs
- to escalate issue have mutliple tabs opened with large (long) files (
+1500
lines) - to add to the melting pot, in each pane try to select (don't deselect) the text independently...
At the moment I have +9 files opened across panes and tabs... and briefly the issue showed up, but now it is back to normal 🤔 so I cannot provide exact example... maybe it relates to packed memory and now as I am after hours the memory is flushed ¯_(ツ)_/¯
... allow me a day or two as the issue occurs daily, whenever it happens I will try to make the video. Thanks.
PS. Also hard to make a good example as I do not want (and cannot) be showing production files I am working on, so whenever the issue shows up I do work on production grate development, so I will need to overlay with dummy samples. I will try to rescale, but not sure if it will fully show what I want. I will do my best.
Thanks for the follow up.
BTW: The above screenshot though, shows it the best, one of the panes whenever the text is selected.
The other issue that might be causing it: I work on two 5120x2880 screens (full resolution setup). ZED usually covers at least 2/3 of a single screen, but it keep changing as I shuffle the windows at time or have multiple projects opened at once.
On the other note, I just changes the font I was using, I thought maybe it was related to the font rendering I was using, but seems to persist, but I will keep track of it.
Now, what and oddity, the top project
or branch
selection in title bar stopped working after my test 🙄 :)
and on top of broken title bar, now I see the tab bar got broken as well... see attached (so at the end tab/pane opening and selection did cause some errors).
OK, relaunching ZED and retrying, here it is:
The whole window, you can see what is happening, the complete behavior:
https://github.com/zed-industries/zed/assets/4711498/d8db5ff5-4759-4a6b-8cb2-ab1248b532e6
And here is the same a small focused section and exactly what is happening.
https://github.com/zed-industries/zed/assets/4711498/e29bae1d-b884-4187-b175-8a57a3dd804c
Definitely something off with rendering.
Thanks! Yeah, I see. The problem is that we're trying to render too many things and some get dropped. If you reduce the window size or font size, for example, it should get back to a working state.
Will need to dig in to see how we can optimize this.
Fixed it in #11849. Should go out in Preview release later today. :)
Thank you for quick a fix
Looks like a potential duplicate of
- https://github.com/zed-industries/zed/issues/7813
I at least can't reproduce this anymore with the newest version. Thanks for the fix!
thanks @nathanael-ruf!