Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quest 2 export in 4.2.dev2 not working #80120

Closed
eelcor opened this issue Aug 1, 2023 · 8 comments · Fixed by #79681
Closed

Quest 2 export in 4.2.dev2 not working #80120

eelcor opened this issue Aug 1, 2023 · 8 comments · Fixed by #79681

Comments

@eelcor
Copy link

eelcor commented Aug 1, 2023

Godot version

4.2.dev2

System information

MacOS 13.5 - Godot 4.2.dev2 - Mobile

Issue description

UPDATE: It is a Quest2 specific issue. I tried it using a regular renderer on a Android Samsung phone and it works fine in 4.2.dev2

Dear developers,

I was happy to see the XR action map working in 4.2.dev2. Unfortunately when I try to export to the Quest 2, the executable crashes on the Quest 2. Enabling debugging on the Quest 2 yields more information in version 4.1.1 of Godot than in 4.2.dev2 (see enclosed screenshots).

Godot411 Debug messages from the quest 2 in 4.1.1 Godot42dev2 Debug messages from the quest 2 in 4.2.dev2

I tried several things to find more information:

  • Renamed the export templates from 4.1.1 to 4.2dev2. Prevents crashing, but shows a black windowed screen on the quest 2.
  • Used the changed files from 4.2dev2 (SCsub, config.py and OpenXR_api.cpp) to get the XR action map editor working in 4.1.1. This was stupid and did not work at all.
  • Recompiled 4.2dev2. Didn't do anything.
  • Tried different Android versions (30, 33, 34), which didn't work either.

I am not sure whether it is a MacOS specific issue. I haven't been able to test this on a Windows machine.

Steps to reproduce

Just make a simple XR project, using a tutorial:

  • A Node3D as root.
  • XR Origin
  • XRCamera3D pointing at the plane and capsule
  • MeshInstance3D - Plane (10x10)
  • MeshInstance3D - Capsule
  • A simple OmniLight3D to light the scene.

Use standard white materials for the plane and capsule.

Loaded: XRTools, XR Loaders, Android build templates (need to change the version in gradle-wrapper.properties to 7.6 in the URL to get a working compile)
Settings: OpenXR Enabled in project settings, ASTC texture compression enabled
Export Settings: Android Export - Gradle build - Android target platform 33 - Godot OpenXR for Meta - XR Mode: OpenXR

Connect Quest 2 headset via USB
Enable "deploy with remote debug" in the editor
Use the run remote to run the apk on the Oculus 2.

In 4.1.1 this yields a basic scene you can navigate. In 4.2.dev2 this crashes on the headset.

Minimal reproduction project

Just extract the following files in a OpenXR42 directory and follow the steps written earlier.

minimal project.zip

@eelcor eelcor changed the title Quest 2 export in 4.2 not working Quest 2 export in 4.2.dev2 not working Aug 1, 2023
@clayjohn clayjohn added this to the 4.x milestone Aug 1, 2023
@eelcor
Copy link
Author

eelcor commented Aug 1, 2023

Could it have some something to do with the following commit?

29bbc17 , which has the following description:

Godot Android re-architecture
Decouples the Godot java entry point from the Android Fragment component. This enables the Godot component to be more easily reused across different types of Android components including Activities and Services.

Regards,
Eelco

@clayjohn
Copy link
Member

clayjohn commented Aug 1, 2023

Cc @m4gr3d

@m4gr3d
Copy link
Contributor

m4gr3d commented Aug 2, 2023

@eelcor This was indeed a regression introduced by the Android refactor. The issue has been resolved in #79681 and will be available in Godot 4.2 dev3.

@eelcor
Copy link
Author

eelcor commented Aug 2, 2023

Thanks for the update!

I recompiled Godot and unfortunately I am still not able to run the application on the Quest2. It still crashes on startup. Any changes in the export templates as well?

Any ideas?
Kind regards,
Eelco

@akien-mga
Copy link
Member

You need to compile the export templates too.

@eelcor
Copy link
Author

eelcor commented Aug 2, 2023

Thank you!

@eelcor
Copy link
Author

eelcor commented Aug 2, 2023

I recompiled both the android_release.apk and android_debug.apk and still crashes on the quest. I also see an android.source in the export templates, where can I find or generate that file? I found the file and copied it to the export template folder. Unfortunately still no go on the Quest2, the app crashes in immersive mode and no debug information is available through the usb connection.

I compiled the android_release.apk and android_debug.apk for only the arm64v8.

@eelcor
Copy link
Author

eelcor commented Aug 4, 2023

Yes! Got it to work!

Needed to compile and install the 2.0.0dev version of the XR loaders and now I am able to start my VR app!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants