GramEditor/gram
37
981
Fork
You've already forked gram
88

Gram 3.0.0 crashing on startup (macOS Monterey Intel) #360

Closed
opened 2026年06月30日 16:51:48 +02:00 by wakeofwind · 14 comments

I upgraded Gram to latest 3.0.0 and found that it no longer starts on macOS Monterey Intel.

macOS version is 12.7.6, here is the crash log:

2026年06月30日T22:25:15+08:00 INFO [gram] ========== starting gram 3.0.0 sha=03b0f47 ==========
2026年06月30日T22:25:15+08:00 INFO [gpui::platform::wgpu::wgpu_context] Selected GPU adapter: "Intel Iris Pro Graphics" (Metal)
2026年06月30日T22:25:15+08:00 ERROR [wgpu_core::indirect_validation] indirect-draw-validation error: ComputePipeline(Internal("new_compute_pipeline_state: NSError { code: 2, localizedDescription: \"Compiler encountered an internal error\", domain: \"CompilerError\", userInfo: {\"NSLocalizedDescription\": <__NSCFString: 0x600002cf6700>}, .. }"))

I have tried to set environment variable WGPU_VALIDATION_INDIRECT_CALL to 0. Unfortunately it didn't work too.

I guess the issue may be related to wgpu #8655 which I reported last year but closed by the maintainer without actually resolution.

I upgraded Gram to latest 3.0.0 and found that it no longer starts on macOS Monterey Intel. macOS version is 12.7.6, here is the crash log: ```text 2026年06月30日T22:25:15+08:00 INFO [gram] ========== starting gram 3.0.0 sha=03b0f47 ========== 2026年06月30日T22:25:15+08:00 INFO [gpui::platform::wgpu::wgpu_context] Selected GPU adapter: "Intel Iris Pro Graphics" (Metal) 2026年06月30日T22:25:15+08:00 ERROR [wgpu_core::indirect_validation] indirect-draw-validation error: ComputePipeline(Internal("new_compute_pipeline_state: NSError { code: 2, localizedDescription: \"Compiler encountered an internal error\", domain: \"CompilerError\", userInfo: {\"NSLocalizedDescription\": <__NSCFString: 0x600002cf6700>}, .. }")) ``` I have tried to set environment variable `WGPU_VALIDATION_INDIRECT_CALL` to `0`. Unfortunately it didn't work too. I guess the issue may be related to [wgpu #8655](https://github.com/gfx-rs/wgpu/issues/8655) which I reported last year but closed by the maintainer without actually resolution.
Owner
Copy link

Hi! It looks like the solution others have found is to fall back to gles rendering instead of Metal. Unfortunately that’s quite a big feature to add, and I don’t have hardware to test this on.. There might be something else I could do here but without being able to reproduce it myself it’d be a challenge :/

Hi! It looks like the solution others have found is to fall back to gles rendering instead of Metal. Unfortunately that’s quite a big feature to add, and I don’t have hardware to test this on.. There might be something else I could do here but without being able to reproduce it myself it’d be a challenge :/

Hi @krig ! Thanks for your quick reply! I know macOS Monterey is outdated, and more and more software drop support for it. I understand the difficulty. If there is not enough value, I will close this issue.

Hi @krig ! Thanks for your quick reply! I know macOS Monterey is outdated, and more and more software drop support for it. I understand the difficulty. If there is not enough value, I will close this issue.
Owner
Copy link

@wakeofwind wrote in #360 (comment):

Hi @krig ! Thanks for your quick reply! I know macOS Monterey is outdated, and more and more software drop support for it. I understand the difficulty. If there is not enough value, I will close this issue.

I would love to get it working! Since it apparently ddid work with the old renderer it should be possible.

@wakeofwind wrote in https://codeberg.org/GramEditor/gram/issues/360#issuecomment-18345245: > Hi @krig ! Thanks for your quick reply! I know macOS Monterey is outdated, and more and more software drop support for it. I understand the difficulty. If there is not enough value, I will close this issue. I would love to get it working! Since it apparently ddid work with the old renderer it should be possible.
Owner
Copy link

@wakeofwind You could try running WGPU_VALIDATION_INDIRECT_CALL=0 gram --foreground from the terminal and see if it picks up the flag then. But, do you know if your macbook has an Nvidia GPU as well? If so, you might be able to convince it to pick that one instead. If you can figure out the device ID (something like 0x2484 but you'll need to find yours) you could do

GRAM_DEVICE_ID=0x2484 gram --foreground

It's documented for Linux here but should apply to MacOS as well now: https://gram-editor.com/docs/linux/

@wakeofwind You could try running `WGPU_VALIDATION_INDIRECT_CALL=0 gram --foreground` from the terminal and see if it picks up the flag then. But, do you know if your macbook has an Nvidia GPU as well? If so, you might be able to convince it to pick that one instead. If you can figure out the device ID (something like `0x2484` but you'll need to find yours) you could do `GRAM_DEVICE_ID=0x2484 gram --foreground` It's documented for Linux here but should apply to MacOS as well now: https://gram-editor.com/docs/linux/

Hi @krig ! Please look at my first comment as I already mentioned:

I have tried to set environment variable WGPU_VALIDATION_INDIRECT_CALL to 0. Unfortunately it didn't work too.

No. My macbook does not have an NVIDIA GPU. It only has the iGPU Intel Iris Pro 1536 MB.

In my another machine I have hybrid GPUs and I have to set Zed to use the iGPU instead of the default dGPU on Linux. :-)

Hi @krig ! Please look at my first comment as I already mentioned: > I have tried to set environment variable WGPU_VALIDATION_INDIRECT_CALL to 0. Unfortunately it didn't work too. No. My macbook does not have an NVIDIA GPU. It only has the iGPU Intel Iris Pro 1536 MB. In my another machine I have hybrid GPUs and I have to set Zed to use the iGPU instead of the default dGPU on Linux. :-)
Owner
Copy link

I see, yes, it's a bit of a pain. It would be really nice to have the fallback to GL working...

I see, yes, it's a bit of a pain. It would be really nice to have the fallback to GL working...
Owner
Copy link

Seems we can just turn indirect call validation off on Mac OS, so I pushed a commit that does that.

There's a sort of related upstream issue here that I don't quite understand the consequences of, so I'm only doing this on Mac OS, but it might be something to do for Linux as well.. https://github.com/gfx-rs/wgpu/issues/8255

Seems we can just turn indirect call validation off on Mac OS, so I pushed a commit that does that. There's a sort of related upstream issue here that I don't quite understand the consequences of, so I'm only doing this on Mac OS, but it might be something to do for Linux as well.. https://github.com/gfx-rs/wgpu/issues/8255

Oh! You are so serious! Then I tried to compile the latest version Gram 3.0.1 on my macbook because I thought if successful then I can try your new commit, but unfortunately got failed (met lots of issues and had some tries). I realize the difficulties to develope projects on/for outdated platforms now. Good luck!

Oh! You are so serious! Then I tried to compile the latest version Gram 3.0.1 on my macbook because I thought if successful then I can try your new commit, but unfortunately got failed (met lots of issues and had some tries). I realize the difficulties to develope projects on/for outdated platforms now. Good luck!
Owner
Copy link

I can do a test build for you later, would be great if you have the time to test :) Don’t have time right now but I’ll update here when I have it built.

I can do a test build for you later, would be great if you have the time to test :) Don’t have time right now but I’ll update here when I have it built.

Thank you! It is very kind of you. I will test it then.

Thank you! It is very kind of you. I will test it then.
Owner
Copy link

@wakeofwind Hi, please give this build a try and let me know how it goes: https://ziranpub.b-cdn.net/Gram-x86_64-test-pr360.dmg

@wakeofwind Hi, please give this build a try and let me know how it goes: https://ziranpub.b-cdn.net/Gram-x86_64-test-pr360.dmg

@krig Thanks! After running the Gram cli of the new test build on my macbook:

/Applications/Gram.app/Contents/MacOS/cli --foreground

I got this output:

2026年07月03日T16:20:40+08:00 INFO [gram] ========== starting gram 3.0.1-1-gc438165ff2 sha=c438165 ==========
2026年07月03日T16:20:40+08:00 INFO [gpui::platform::wgpu::wgpu_context] Selected GPU adapter: "Intel Iris Pro Graphics" (Metal)
2026年07月03日T16:20:40+08:00 INFO [gram] Using git binary path: "/Applications/Gram.app/Contents/MacOS/git"
2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Shader translation error for stage ShaderStages(VERTEX | FRAGMENT): new_render_pipeline_state: NSError { code: 2, localizedDescription: "Compiler encountered an internal error", domain: "CompilerError", userInfo: {"NSLocalizedDescription": <__NSCFString: 0x600003d42040>}, .. }
2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Please report it to https://github.com/gfx-rs/wgpu
2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default
thread 'main' (1691765) panicked at /Users/krig/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:1409:26:
wgpu error: Validation Error
Caused by:
 In Device::create_render_pipeline, label = 'quads'
 Internal error in ShaderStages(VERTEX | FRAGMENT) shader: new_render_pipeline_state: NSError { code: 2, localizedDescription: "Compiler encountered an internal error", domain: "CompilerError", userInfo: {"NSLocalizedDescription": <__NSCFString: 0x600003d42040>}, .. }
stack backtrace:
 0: __rustc::rust_begin_unwind
 1: core::panicking::panic_fmt
 2: wgpu::backend::wgpu_core::default_error_handler
 3: <wgpu::backend::wgpu_core::ContextWgpuCore>::handle_error_inner
 4: <wgpu::backend::wgpu_core::CoreDevice as wgpu::dispatch::DeviceInterface>::create_render_pipeline
 5: <gpui::platform::wgpu::wgpu_renderer::WgpuRenderer>::create_pipelines::{closure#0}
 6: <gpui::platform::wgpu::wgpu_renderer::WgpuRenderer>::create_pipelines
 7: <gpui::platform::mac::window::MacWindow>::open
 8: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::open_window
 9: <gpui::window::Window>::new
 10: <gpui::app::async_context::AsyncApp>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#10}>
 11: <workspace::Workspace>::new_local::{closure#0}::{closure#0}::<i32>
 12: <gpui::app::App>::spawn::<<workspace::Workspace>::new_local::{closure#0}, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}
 13: <async_task::raw::RawTask<gpui::executor::spawn_local_with_source_location::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, gpui::platform::RunnableMeta>>::run
 14: gpui::platform::mac::dispatcher::trampoline
 15: <unknown>
 16: <unknown>
 17: <unknown>
 18: <unknown>
 19: <unknown>
 20: <unknown>
 21: <unknown>
 22: <unknown>
 23: <unknown>
 24: <unknown>
 25: <unknown>
 26: <unknown>
 27: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
 28: <gpui::app::Application>::run::<gram::main::{closure#9}>
 29: gram::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

All in All, I think the last version of wgpu which supports macOS Monterey (12) is 24. After that version, no more support.

@krig Thanks! After running the Gram cli of the new test build on my macbook: ```shell /Applications/Gram.app/Contents/MacOS/cli --foreground ``` I got this output: ```shell 2026年07月03日T16:20:40+08:00 INFO [gram] ========== starting gram 3.0.1-1-gc438165ff2 sha=c438165 ========== 2026年07月03日T16:20:40+08:00 INFO [gpui::platform::wgpu::wgpu_context] Selected GPU adapter: "Intel Iris Pro Graphics" (Metal) 2026年07月03日T16:20:40+08:00 INFO [gram] Using git binary path: "/Applications/Gram.app/Contents/MacOS/git" 2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Shader translation error for stage ShaderStages(VERTEX | FRAGMENT): new_render_pipeline_state: NSError { code: 2, localizedDescription: "Compiler encountered an internal error", domain: "CompilerError", userInfo: {"NSLocalizedDescription": <__NSCFString: 0x600003d42040>}, .. } 2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Please report it to https://github.com/gfx-rs/wgpu 2026年07月03日T16:20:41+08:00 ERROR [wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default thread 'main' (1691765) panicked at /Users/krig/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-29.0.3/src/backend/wgpu_core.rs:1409:26: wgpu error: Validation Error Caused by: In Device::create_render_pipeline, label = 'quads' Internal error in ShaderStages(VERTEX | FRAGMENT) shader: new_render_pipeline_state: NSError { code: 2, localizedDescription: "Compiler encountered an internal error", domain: "CompilerError", userInfo: {"NSLocalizedDescription": <__NSCFString: 0x600003d42040>}, .. } stack backtrace: 0: __rustc::rust_begin_unwind 1: core::panicking::panic_fmt 2: wgpu::backend::wgpu_core::default_error_handler 3: <wgpu::backend::wgpu_core::ContextWgpuCore>::handle_error_inner 4: <wgpu::backend::wgpu_core::CoreDevice as wgpu::dispatch::DeviceInterface>::create_render_pipeline 5: <gpui::platform::wgpu::wgpu_renderer::WgpuRenderer>::create_pipelines::{closure#0} 6: <gpui::platform::wgpu::wgpu_renderer::WgpuRenderer>::create_pipelines 7: <gpui::platform::mac::window::MacWindow>::open 8: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::open_window 9: <gpui::window::Window>::new 10: <gpui::app::async_context::AsyncApp>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#10}> 11: <workspace::Workspace>::new_local::{closure#0}::{closure#0}::<i32> 12: <gpui::app::App>::spawn::<<workspace::Workspace>::new_local::{closure#0}, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0} 13: <async_task::raw::RawTask<gpui::executor::spawn_local_with_source_location::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, gpui::platform::RunnableMeta>>::run 14: gpui::platform::mac::dispatcher::trampoline 15: <unknown> 16: <unknown> 17: <unknown> 18: <unknown> 19: <unknown> 20: <unknown> 21: <unknown> 22: <unknown> 23: <unknown> 24: <unknown> 25: <unknown> 26: <unknown> 27: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run 28: <gpui::app::Application>::run::<gram::main::{closure#9}> 29: gram::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ``` All in All, I think the last version of wgpu which supports macOS Monterey (12) is 24. After that version, no more support.
Owner
Copy link

Ah, that’s too bad. Yeah unfortunately I think supporting this older version of Mac OS is going to be impossible with wgpu :(

Ah, that’s too bad. Yeah unfortunately I think supporting this older version of Mac OS is going to be impossible with wgpu :(

Yes. Too bad. Sorry to trouble you! I am closing this issue.

Yes. Too bad. Sorry to trouble you! I am closing this issue.
Sign in to join this conversation.
main
main
test/wgpu-on-mac
test-ci/failing-test-mac
test/failing-test-mac
test/build-on-22-04
test/wgpu-present-mode-mailbox
v2.1
test/altgr-fix-again
test/2.0.0-rc1
test/linux-build
test/objc2
v1.2.1
3.0.1
3.0.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0
1.2.1
1.2.0
1.1.0
1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GramEditor/gram#360
Reference in a new issue
GramEditor/gram
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?