Regression: Godot 4.4 (C#/Mono) Android Game Exports Sometimes Crash During Startup On Meta Quest 2/3
Regression: Godot 4.4 (C#/Mono) Android game exports sometimes crash during startup on Meta Quest 2/3
Godot 4.4 is a popular open-source game engine that supports various platforms, including Android and Meta Quest 2/3. However, some users have reported that their Android game exports sometimes crash during startup on Meta Quest 2/3. This issue is particularly problematic for developers who rely on Godot for their game development needs.
To identify the root cause of this issue, we conducted a series of tests on various Godot versions. The results are summarized below:
Tested on Godot versions
We performed a "binary search" to determine the version that introduced the issue. Our tests revealed that the problem started with Godot version 4.4-dev3_mono
.
Here's an overview of the Godot versions we tested:
v4.4-stable_mono_win64
(with Godot XR Vendors v3.1.2): Badv4.4-stable_mono_win64
(with Godot XR Vendors v4.0.0-beta1): Badv4.4-rc3_mono_win64
: Not testedv4.4-rc2_mono_win64
: Not testedv4.4-rc1_mono_win64
(with Godot XR Vendors v4.0.0-beta1): Badv4.4-beta4_mono_win64
: Not testedv4.4-beta3_mono_win64
: Not testedv4.4-beta2_mono_win64
: Not testedv4.4-beta1_mono_win64
(with Godot XR Vendors v4.0.0-beta1): Badv4.4-dev7_mono_win64
: Not testedv4.4-dev6_mono_win64
: Not testedv4.4-dev5_mono_win64
: Not testedv4.4-dev4_mono_win64
(with Godot XR Vendors v3.1.2): Badv4.4-dev3_mono_win64
(with Godot XR Vendors v3.1.2): Bad (First bad version)v4.4-dev2_mono_win64
(with Godot XR Vendors v3.1.2): Goodv4.4-dev1_mono_win64
: Not testedv4.3-stable_mono_win64
(with Godot XR Vendors v3.1.2): Good
Our tests were conducted on a Windows 11 system, and we thoroughly tested the issue on both Quest 2 and 3 devices.
The issue is characterized by a crash during startup on Meta Quest 2/3 devices. This only occurs when the project uses C#.
To reproduce the issue, follow these steps:
Development environment
- OpenJDK 17 (as recommended in the Godot documentation)
- Android SDK setup (also from the Godot documentation):
sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;34.0.0" "platforms;android-34" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;23.2.8568313"
Project setup
- Create a new project in the Godot mono version
- Install the Godot XR Vendors plugin v3.1.2
- Add an export preset
- Set texture compression as suggested
- Use Gradle build
- Use Meta Quest plugin
- Use OpenXR
- Set package name
- Add an Android build template
- Project settings - enable OpenXR
- Project settings - enable shaders
- Add XR setup to the main scene
- Add meshes to hands
- Add environment and light
- Add XR init script
- Set the main scene
- Add a C# solution
- Add a C# script
- Make sure the C# solution builds
- Export, install to Quest 2 or 3, and run
The crash log example below is from the 4.4-dev3 build, but the logs were similar across all versions:
03-10 16:46:29.649 19945 20075 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe in tid 20075 (GLThread 30), pid 19945 (4dev3xrvendors3)
03-10 16:46:29.861 20171 20171 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-10 16:46:29.861 20171 20171 F DEBUG : Build fingerprint: 'oculus/hollywood/hollywood:12/SQ3A.220605.009.A1/51272100125100150:user/release-keys'
03-10 16:46:29.861 20171 20171 F DEBUG : Revision: '0'
03-10 16:46:29.861 20171 20171 F DEBUG : ABI: 'arm64'
03-10 16:46:29.861 20171 20171 F DEBUG : Timestamp: 2025-03-10 16:46:29.696200408+0100
03-10 16:46:29.861 20171 20171 F DEBUG : Process uptime: 1s
03-10 16:46:29.861 20171 20171 F DEBUG : Diagnostic-Collection-Type: Tombstone Proto
03-10 16:46:29.861 20171 20171 F DEBUG : Has-Diagnostic-Summary: Yes
03-10 16:46:29.861 20171 20171 F DEBUG : APK-Location: /data/app/~~YgIEf2D7bgwNxo8PHlryIg==/dk.madsbangh.openxrgodot44dev3xrvendors3-gcPC0D20JLREx-pKLKAYbw==/base.apk
03-10 16:46:29.861 20171 20171 F DEBUG : Debugging: No
03-10 16:46:29.861 20171 20171 F DEBUG : Has-Waited-For-Debugger: No
03-10 16:46:29.861 20171 20171 F DEBUG : Last-Activity-Time: 3705734
03-10 16:46:29.861 20171 20171 F DEBUG : Process-Runtime: 853
03-10 16:46:29.861 20171 20171 F DEBUG : Waiting-To-Kill:
03-10 16:46:29.861 20171 20171 F DEBUG : Killed-By-AM: No
03-10 16:46:29.861 20171 20171 F DEBUG : Removed: No
03-10 16:46:29.861 20171 20171 F DEBUG : Wanted-ANR-Ui: No
03-10 16:46:29.861 20171 20171 F DEBUG : Killed: No
03-10 16:46:29.861 20171 20171 F DEBUG : OOM-Score-Adj: 0
03-10 16:46:29.861 20171 20171 F DEBUG : Wanted-Error-Ui: No
03-10 16:46:29.861 20171 20171 F DEBUG : Kill-Time: 0
03-10 16:46:29.861 20171 20171 F DEBUG : State: TOP
03-10 16:46:29.861 20171 20171 F DEBUG : Foreground: Yes
03-10 16:46:29.861 20171 20171 F DEBUG : Executable: /system/bin/app_process64
03-10 16:46:29.861 20171 20171 F DEBUG : Cmdline: dk.madsbangh.openxrgodot44dev3xrvendors3
03-10 16:46:29.861 20171 20171 F DEBUG : pid: 19945, tid: 20075, name: GLThread 30 >>> dk.madsbangh.openxrgodot44dev3xrvendors3 <<<
03-10 16:46:29.861 20171 20171 F DEBUG : uid: 10102
03-10 16:46:29.861 20171 20171 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe
03-10 16:46:29.861 20171 20171 F DEBUG : Cause: null pointer dereference
03-10 16:46:29.861 20171 20171 F DEBUG : x0 000000000000<br/>
**Q&A: Regression: Godot 4.4 (C#/Mono) Android game exports sometimes crash during startup on Meta Quest 2/3**
**Q: What is the issue with Godot 4.4 (C#/Mono) Android game exports on Meta Quest 2/3?**
A: The issue is that some Android game exports built with Godot 4.4 (C#/Mono) sometimes crash during startup on Meta Quest 2/3 devices.
**Q: Which Godot versions are affected by this issue?**
A: Our tests revealed that the issue started with Godot version `4.4-dev3_mono`. We tested various Godot versions, including `v4.4-stable_mono_win64`, `v4.4-rc3_mono_win64`, `v4.4-rc2_mono_win64`, `v4.4-rc1_mono_win64`, `v4.4-beta4_mono_win64`, `v4.4-beta3_mono_win64`, `v4.4-beta2_mono_win64`, `v4.4-beta1_mono_win64`, `v4.4-dev7_mono_win64`, `v4.4-dev6_mono_win64`, `v4.4-dev5_mono_win64`, `v4.4-dev4_mono_win64`, and `v4.4-dev3_mono`. The issue was only present in the `v4.4-dev3_mono` and `v4.4-dev4_mono` versions.
**Q: What is the minimum setup required to reproduce the issue?**
A: To reproduce the issue, you need to:
1. Create a new project in the Godot mono version
2. Install the Godot XR Vendors plugin v3.1.2
3. Add an export preset
* Set texture compression as suggested
* Use Gradle build
* Use Meta Quest plugin
* Use OpenXR
* Set package name
4. Add an Android build template
5. Project settings - enable OpenXR
6. Project settings - enable shaders
7. Add XR setup to the main scene
8. Add meshes to hands
9. Add environment and light
10. Add XR init script
11. Set the main scene
12. Add a C# solution
13. Add a C# script
14. Make sure the C# solution builds
15. Export, install to Quest 2 or 3, and run
**Q: What is the crash log example?**
A: The crash log example below is from the 4.4-dev3 build, but the logs were similar across all versions:
03-10 16:46:29.649 19945 20075 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe in tid 20075 (GLThread 30), pid 19945 (4dev3xrvendors3) 03-10 16:46:29.861 20171 20171 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 03-10 16:46:29.861 20171 20171 F DEBUG : Build fingerprint: 'oculus/hollywood/hollywood:12/SQ3A.220605.009.A1/51272100125100150:user/release-keys' 03-10 16:46:29.861 20171 20171 F DEBUG : Revision: '0' 03-10 16:46:29.861 20171 20171 F DEBUG : ABI: 'arm64' 03-10 16:46:29.861 20171 20171 F DEBUG : Timestamp: 2025-03-10 16:46:29.696200408+0100 03-10 16:46:29.861 20171 20171 F DEBUG : Process uptime: 1s 03-10 16:46:29.861 20171 20171 F DEBUG : Diagnostic-Collection-Type: Tombstone Proto 03-10 16:46:29.861 20171 20171 F DEBUG : Has-Diagnostic-Summary: Yes 03-10 16:46:29.861 20171 20171 F DEBUG : APK-Location: /data/app/~~YgIEf2D7bgwNxo8PHlryIg==/dk.madsbangh.openxrgodot44dev3xrvendors3-gcPC0D20JLREx-pKLKAYbw==/base.apk 03-10 16:46:29.861 20171 20171 F DEBUG : Debugging: No 03-10 16:46:29.861 20171 20171 F DEBUG : Has-Waited-For-Debugger: No 03-10 16:46:29.861 20171 20171 F DEBUG : Last-Activity-Time: 3705734 03-10 16:46:29.861 20171 20171 F DEBUG : Process-Runtime: 853 03-10 16:46:29.861 20171 20171 F DEBUG : Waiting-To-Kill: 03-10 16:46:29.861 20171 20171 F DEBUG : Killed-By-AM: No 03-10 16:46:29.861 20171 20171 F DEBUG : Removed: No 03-10 16:46:29.861 20171 20171 F DEBUG : Wanted-ANR-Ui: No 03-10 16:46:29.861 20171 20171 F DEBUG : Killed: No 03-10 16:46:29.861 20171 20171 F DEBUG : OOM-Score-Adj: 0 03-10 16:46:29.861 20171 20171 F DEBUG : Wanted-Error-Ui: No 03-10 16:46:29.861 20171 20171 F DEBUG : Kill-Time: 0 03-10 16:46:29.861 20171 20171 F DEBUG : State: TOP 03-10 16:46:29.861 20171 20171 F DEBUG : Foreground: Yes 03-10 16:46:29.861 20171 20171 F DEBUG : Executable: /system/bin/app_process64 03-10 16:46:29.861 20171 20171 F DEBUG : Cmdline: dk.madsbangh.openxrgodot44dev3xrvendors3 03-10 16:46:29.861 20171 20171 F DEBUG : pid: 19945, tid: 20075, name: GLThread 30 >>> dk.madsbangh.openxrgodot44dev3xrvendors3 <<< 03-10 16:46:29.861 20171 20171 F DEBUG : uid: 10102 03-10 16:46:29.861 20171 20171 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe 03-10 16:46:29.861 20171 20171 F DEBUG : Cause: null pointer dereference 03-10 16:46:29.861 20171 20171 F DEBUG : x0 0000000000000000 x1 0000000000000000 x2 000000763ea69040 x3 0000007590d3c3b0
**Q: What is the minimal reproduction project (MRP) for this issue?**
A: I've attached the project made with Godot v4.4-stable (mono) to reproduce the issue.
**Q: How can I report this issue to the Godot team?**
A: You can report this issue to the Godot team by creating a new issue on the Godot GitHub repository. Please include the steps to reproduce the issue, the crash log, and any other relevant information.