Skip to content

Zed crashes when rendering markdown preview with many gifs #53426

@ralexmatthews

Description

@ralexmatthews

Reproduction steps

  1. Open Zed
  2. Open either a large markdown file or a markdown file with invalid image (not sure which is the issue)
  3. Press the "preview" button in the top right corner
  4. Zed crashes

I encountered it trying to render the index.md file in the all-the-bufo repo.

Zed version and system specs

Zed: v0.230.2+stable.212.53a3365bcf6b1aa17389b21456b6010f294f788f (Zed)
OS: macOS 26.3.1 (a) (Build 25D771280a)
Memory: 36 GiB
Architecture: aarch64

Attach Zed log file

Zed.log
2026-04-08T11:32:39-05:00 INFO  [git::repository] opening git repository at "/Users/me/projects/all-the-bufo/.git" using git binary "/usr/bin/git"
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[lsp] GitHub Copilot Language Server 1.465.0 initialized"
}
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "995f7f10-f272-461c-bf10-1a648fce7302",
      "method": "workspace/didChangeConfiguration",
      "registerOptions": {
        "section": [
          "github.copilot",
          "github-enterprise",
          "http",
          "telemetry"
        ]
      }
    }
  ]
}
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Registering request handler for workspace/didChangeConfiguration failed."
}
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[certificates] Removed 1 expired certificates"
}
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification statusNotification:
{
  "busy": false,
  "kind": "Error",
  "status": "Error",
  "message": "You are not signed into GitHub."
}
2026-04-08T11:32:39-05:00 INFO  [lsp] Language server with id 3 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "[GithubAvailableEmbeddingTypes] Could not find any available embedding types. Error: noSession"
}
2026-04-08T11:34:31-05:00 ERROR [gpui_macos::metal_renderer] failed to render: scene too large: 0 paths, 1 shadows, 96 quads, 0 underlines, 32373 mono, 8 poly, 0 surfaces. retrying with larger instance buffer size
2026-04-08T11:34:31-05:00 INFO  [gpui_macos::metal_renderer] increased instance buffer size to 4194304
2026-04-08T11:34:32-05:00 INFO  [lsp] starting language server process. binary path: "/Users/me/Library/Application Support/Zed/extensions/work/codebook/codebook-lsp-v0.3.36/codebook-lsp", working directory: "/Users/me/projects/all-the-bufo", args: ["--root=/Users/me/projects/all-the-bufo", "serve"]
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: unexpected end of file
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:34:33-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:34:33-05:00 ERROR [crashes] thread 'main' panicked at crates/gpui/src/assets.rs:80:40:
index out of bounds: the len is 0 but the index is 0...
2026-04-08T11:34:33-05:00 ERROR [crashes] triggering a crash to generate a minidump...
2026-04-08T11:35:55-05:00 INFO  [zed] ========== starting zed version 0.230.2+stable.212.53a3365bcf6b1aa17389b21456b6010f294f788f, sha 53a3365 ==========
2026-04-08T11:35:55-05:00 INFO  [crashes] crash signal handlers installed
2026-04-08T11:35:55-05:00 INFO  [crashes] spawning crash handler process
2026-04-08T11:35:55-05:00 INFO  [zed] Using git binary path: "/Applications/Zed.app/Contents/MacOS/git"
2026-04-08T11:35:55-05:00 INFO  [crashes] connected to crash handler process after 100ms
2026-04-08T11:35:55-05:00 INFO  [crashes] crash handler registered
2026-04-08T11:35:55-05:00 INFO  [extension_host] extensions updated. loading 20, reloading 0, unloading 0
2026-04-08T11:35:55-05:00 INFO  [auto_update] Auto Update: checking for updates
2026-04-08T11:35:55-05:00 INFO  [workspace] Rendered first frame
2026-04-08T11:35:55-05:00 INFO  [client] set status on client 0: Authenticating
2026-04-08T11:35:55-05:00 ERROR [crates/agent_ui/src/agent_panel.rs:129] Error("unknown variant `ClaudeCode`, expected one of `NativeAgent`, `TextThread`, `Custom`", line: 1, column: 44)
2026-04-08T11:35:55-05:00 ERROR [gpui_macos::metal_renderer] failed to render: scene too large: 0 paths, 1 shadows, 104 quads, 0 underlines, 32390 mono, 7 poly, 0 surfaces. retrying with larger instance buffer size
2026-04-08T11:35:55-05:00 INFO  [gpui_macos::metal_renderer] increased instance buffer size to 4194304
2026-04-08T11:35:55-05:00 INFO  [client] set status on client 247634: Authenticated
2026-04-08T11:35:56-05:00 INFO  [node_runtime] Node runtime install_if_needed
2026-04-08T11:35:56-05:00 INFO  [git::repository] opening git repository at "/Users/me/projects/all-the-bufo/.git" using git binary "/usr/bin/git"
2026-04-08T11:35:56-05:00 WARN  [node_runtime] using Zed managed Node.js at /Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64 since checking system Node.js failed with error: node at /Users/me/.nvm/versions/node/v20.10.0/bin/node is too old. want: 22.0.0, got: 20.10.0
2026-04-08T11:35:57-05:00 INFO  [copilot] Checking Node.js version for Copilot at: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node"
2026-04-08T11:35:57-05:00 INFO  [copilot] Node.js version 24.11.0 meets Copilot requirements (>= 20.8.0)
2026-04-08T11:35:57-05:00 INFO  [lsp] starting language server process. binary path: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node", working directory: "/", args: ["--experimental-sqlite", "/Users/me/Library/Application Support/Zed/copilot/node_modules/@github/copilot-language-server/dist/language-server.js", "--stdio"]
2026-04-08T11:35:57-05:00 INFO  [copilot] Checking Node.js version for Copilot at: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node"
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: unexpected end of file
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:35:57-05:00 ERROR [gpui::asset_cache] Failed to load asset: image error: Format error decoding Gif: unknown block type encountered
2026-04-08T11:35:57-05:00 ERROR [crashes] thread 'main' panicked at crates/gpui/src/assets.rs:80:40:
index out of bounds: the len is 0 but the index is 0...
2026-04-08T11:35:57-05:00 ERROR [crashes] triggering a crash to generate a minidump...
2026-04-08T11:36:32-05:00 INFO  [zed] ========== starting zed version 0.230.2+stable.212.53a3365bcf6b1aa17389b21456b6010f294f788f, sha 53a3365 ==========
2026-04-08T11:36:32-05:00 INFO  [crashes] crash signal handlers installed
2026-04-08T11:36:32-05:00 INFO  [crashes] spawning crash handler process
2026-04-08T11:36:32-05:00 INFO  [zed] Using git binary path: "/Applications/Zed.app/Contents/MacOS/git"
2026-04-08T11:36:32-05:00 INFO  [crashes] connected to crash handler process after 100ms
2026-04-08T11:36:32-05:00 INFO  [crashes] crash handler registered
2026-04-08T11:36:36-05:00 INFO  [extension_host] extensions updated. loading 20, reloading 0, unloading 0
2026-04-08T11:36:36-05:00 INFO  [auto_update] Auto Update: checking for updates
2026-04-08T11:36:36-05:00 INFO  [workspace] Rendered first frame
2026-04-08T11:36:36-05:00 INFO  [client] set status on client 0: Authenticating
2026-04-08T11:36:36-05:00 INFO  [node_runtime] Node runtime install_if_needed
2026-04-08T11:36:36-05:00 ERROR [crates/agent_ui/src/agent_panel.rs:129] Error("unknown variant `ClaudeCode`, expected one of `NativeAgent`, `TextThread`, `Custom`", line: 1, column: 44)
2026-04-08T11:36:36-05:00 ERROR [gpui_macos::metal_renderer] failed to render: scene too large: 0 paths, 1 shadows, 104 quads, 0 underlines, 32390 mono, 7 poly, 0 surfaces. retrying with larger instance buffer size
2026-04-08T11:36:36-05:00 INFO  [gpui_macos::metal_renderer] increased instance buffer size to 4194304
2026-04-08T11:36:36-05:00 INFO  [client] set status on client 247634: Authenticated
2026-04-08T11:36:37-05:00 WARN  [node_runtime] using Zed managed Node.js at /Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64 since checking system Node.js failed with error: node at /Users/me/.nvm/versions/node/v20.10.0/bin/node is too old. want: 22.0.0, got: 20.10.0
2026-04-08T11:36:37-05:00 INFO  [git::repository] opening git repository at "/Users/me/projects/all-the-bufo/.git" using git binary "/usr/bin/git"
2026-04-08T11:36:38-05:00 INFO  [copilot] Checking Node.js version for Copilot at: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node"
2026-04-08T11:36:38-05:00 INFO  [copilot] Checking Node.js version for Copilot at: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node"
2026-04-08T11:36:38-05:00 INFO  [copilot] Node.js version 24.11.0 meets Copilot requirements (>= 20.8.0)
2026-04-08T11:36:38-05:00 INFO  [lsp] starting language server process. binary path: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node", working directory: "/", args: ["--experimental-sqlite", "/Users/me/Library/Application Support/Zed/copilot/node_modules/@github/copilot-language-server/dist/language-server.js", "--stdio"]
2026-04-08T11:36:38-05:00 INFO  [copilot] Node.js version 24.11.0 meets Copilot requirements (>= 20.8.0)
2026-04-08T11:36:38-05:00 INFO  [lsp] starting language server process. binary path: "/Users/me/Library/Application Support/Zed/node/node-v24.11.0-darwin-arm64/bin/node", working directory: "/", args: ["--experimental-sqlite", "/Users/me/Library/Application Support/Zed/copilot/node_modules/@github/copilot-language-server/dist/language-server.js", "--stdio"]
2026-04-08T11:36:38-05:00 INFO  [lsp] starting language server process. binary path: "/Users/me/Library/Application Support/Zed/extensions/work/codebook/codebook-lsp-v0.3.36/codebook-lsp", working directory: "/Users/me/projects/all-the-bufo", args: ["--root=/Users/me/projects/all-the-bufo", "serve"]

Metadata

Metadata

Assignees

Labels

area:preview/markdownFeedback for Zed's Markdown previewfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcmeta:awesomeexemplary issue/PR from the communitypriority:P2Average run-of-the-mill bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

Type

No fields configured for Crash.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions