NixOS / NixOS/nixpkgs

Godot: crashes when opening a project on aarch64-darwin

Open
#485,083 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0.kind: bug 2.status: stale 6.topic: darwin
Dominant language
Nix
Stars
26.2k
Forks
20.1k
PR merge metrics
PR metrics pending

Description

Nixpkgs version
  • Stable (25.11)
Describe the bug

After building Godot from 46d3045 for aarch64-darwin, I can open the project selection screen but then the app crashes whenever I try to actually open a project.

Steps to reproduce
  • Install Godot on aarch64-darwin from 46d3045
  • Launch Godot (project selection screen)
  • Select an existing project OR create a new project
  • When Godot attempts to load the project, it crashes
Expected behaviour

expected the project to load in the editor

Screenshots

No response

Relevant log output
-> 11:12:36 AM speelbarrow ~ realpath `where godot`
/nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/libexec/godot.macos.editor.arm64
-> 11:12:41 AM speelbarrow ~ /nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/bin/godot ~/Documents/University/W26/CPS643/labs/1/roll-a-ball/project.godot
Initialize godot-rust (API v4.5.stable.official, runtime v4.6.stable.nixpkgs, safeguards strict)
Godot Engine v4.6.stable.nixpkgs.89cea1439 - https://godotengine.org
Metal 4.0 - Forward+ - Using Device #0: Apple - Apple M1 (Apple7)

ERROR: Condition "p_name.is_empty()" is true.
   at: set_name (scene/main/node.cpp:1432)
ERROR: Cannot get class 'GitPlugin'.
   at: _instantiate_internal (core/object/class_db.cpp:565)
ERROR: Received a nullptr VCS extension instance during construction.
   at: _load_plugin (editor/version_control/version_control_editor_plugin.cpp:166)
ERROR: /root: The caller thread can't call the function `propagate_notification()` on this node. Use `call_deferred()` or `call_deferred_thread_group()` instead.
   at: propagate_notification (scene/main/node.cpp:2597)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.6.stable.nixpkgs (89cea143987d564363e15d207438530651d943ac)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[1] 1   libsystem_platform.dylib            0x0000000197503744 _sigtramp + 56
[2] spirv_cross::Compiler::get_shader_resources(std::__1::unordered_set<spirv_cross::TypedID<(spirv_cross::Types)2>, std::__1::hash<spirv_cross::TypedID<(spirv_cross::Types)2>>, std::__1::equal_to<spirv_cross::TypedID<(spirv_cross::Types)2>>, std::__1::allocator<spirv_cross::TypedID<(spirv_cross::Types)2>>> const*) const
[3] RenderingShaderContainerMetal::_set_code_from_spirv(RenderingShaderContainer::ReflectShader const&) (in godot.macos.editor.arm64) + 2392
[4] RenderingShaderContainer::set_code_from_spirv(String const&, Span<RenderingDeviceCommons::ShaderStageSPIRVData>) (in godot.macos.editor.arm64) + 112
[5] RenderingDevice::shader_compile_binary_from_spirv(Vector<RenderingDeviceCommons::ShaderStageSPIRVData> const&, String const&) (in godot.macos.editor.arm64) + 116
[6] ShaderRD::_compile_variant(unsigned int, ShaderRD::CompileData) (in godot.macos.editor.arm64) + 248
[7] WorkerThreadPool::_process_task(WorkerThreadPool::Task*) (in godot.macos.editor.arm64) + 360
[8] WorkerThreadPool::_thread_function(void*) (in godot.macos.editor.arm64) + 352
[9] Thread::thread_callback(void*) (in godot.macos.editor.arm64) + 80
[10] 10  libsystem_pthread.dylib             0x00000001974f9c08 _pthread_start + 136
[11] 11  libsystem_pthread.dylib             0x00000001974f4ba8 thread_start + 8
-- END OF C++ BACKTRACE --
================================================================
zsh: abort      /nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/bin/godot
-> 11:13:40 AM speelbarrow ~ which godot
-> 11:14:14 AM speelbarrow ~ /nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/bin/godot
Godot Engine v4.6.stable.nixpkgs.89cea1439 - https://godotengine.org
OpenGL API 4.1 Metal - 90.5 - Compatibility - Using Device: Apple - Apple M1

Editing project: /Users/speelbarrow/Code/Godot/test
-> 11:14:30 AM speelbarrow ~ Godot Engine v4.6.stable.nixpkgs.89cea1439 - https://godotengine.org
Metal 4.0 - Forward+ - Using Device #0: Apple - Apple M1 (Apple7)
godot.macos.editor.arm64(2235,0x1703ab000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x17029f000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x1707db000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x1703ab000) malloc: *** set a breakpoint in malloc_error_break to debug
godot.macos.editor.arm64(2235,0x1704b7000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x17029f000) malloc: *** set a breakpoint in malloc_error_break to debug
godot.macos.editor.arm64(2235,0x1706cf000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x1707db000) malloc: *** set a breakpoint in malloc_error_break to debug
godot.macos.editor.arm64(2235,0x1705c3000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot.macos.editor.arm64(2235,0x1705c3000) malloc: *** set a breakpoint in malloc_error_break to debug
godot.macos.editor.arm64(2235,0x1704b7000) malloc: *** set a breakpoint in malloc_error_break to debug
godot.macos.editor.arm64(2235,0x1706cf000) malloc: *** set a breakpoint in malloc_error_break to debug

-> 11:14:41 AM speelbarrow ~ /nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/bin/godot ~/Code/Godot/test/project.godot
Godot Engine v4.6.stable.nixpkgs.89cea1439 - https://godotengine.org
Metal 4.0 - Forward+ - Using Device #0: Apple - Apple M1 (Apple7)
godot(2368,0x16d873000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot(2368,0x16d97f000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot(2368,0x16d873000) malloc: *** set a breakpoint in malloc_error_break to debug
godot(2368,0x16d97f000) malloc: *** set a breakpoint in malloc_error_break to debug
godot(2368,0x16d337000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot(2368,0x16d767000) malloc: *** error for object 0x15000044496e6f69: pointer being freed was not allocated
godot(2368,0x16d337000) malloc: *** set a breakpoint in malloc_error_break to debug
godot(2368,0x16d767000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      /nix/store/dph8f43jlbdfdh1wlmmw0xc6xagl1g0y-godot-4.6-stable/bin/godot
-> 11:14:50 AM speelbarrow ~
Additional context

This issue does not occur when using the .app bundle from Godot's downloads page. I have tested this for both Godot 4.5 and Godot 4.6.

In log output:

  • First attempt was to open an existing project
  • Second attempt was to create a new project from the project selection screen and then open it
  • Third attempt was to open the project created by the second attempt
System metadata
  • system: "aarch64-darwin"
  • host os: Darwin 25.2.0, macOS 26.2
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.31.2+1
  • channels(root): "darwin-25.11.tar.gz, home-manager-25.11.tar.gz, nixpkgs-25.11-darwin"
  • nixpkgs: /nix/store/ghvgyb0pimzbrz9c6xyf2v5v2g1gfq8d-nixpkgs-25.11-darwin/nixpkgs
Are you using nix-darwin?

Yes, I am using nix-darwin.

Notify maintainers

@shiryel @corngood


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs
Is this issue important to you?

Add a 👍 reaction to issues you find important.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Nixpkgs Godot build on aarch64-darwin and compare it with the working .app bundle. Start with the backtrace entry points RenderingShaderContainerMetal::_set_code_from_spirv and ShaderRD::_compile_variant, along with the malloc errors; done means opening existing and newly created projects no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot, macos
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.