Closed yuripourre closed 4 months ago
Ok, some updates:
If I remove this line on CMakeLists.txt:
#add_subdirectory(src/main/cpp/vrb/src)
The build goes a little further but it fails later with the following error:
CMake Error at CMakeLists.txt:17 (add_library):
Cannot find source file:
/home/yuri/git/wolvic/app/src/main/cpp/tinygltf/tiny_gltf.cc
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
CMake Warning:
Manually-specified variables were not used by the project:
CHROMIUM
I believe it's a Igalia closed-source repo but if you guys could give some advices on how to create their structure, it would be amazing.
For tinygltf I've found the Igalia's fork and adding those to the specific folder fixed the issue.
Now I am I still getting some errors related to vrb:
I am using Mozilla's vrb, I copied the folders src
and include
to cpp
folder but the build still fails:
/home/yuri/git/wolvic/app/src/main/cpp/OneEuroFilter.cpp:13:31: error: no member named 'Slerp' in 'vrb::Quaternion'
auto q = vrb::Quaternion::Slerp({mHatxprev[0], mHatxprev[1], mHatxprev[2], mHatxprev[3]}, {x[0], x[1], x[2], x[3]}, alpha).Normalize();
~~~~~~~~~~~~~~~~~^
Indeed, the method Slerp can't be found: https://github.com/MozillaReality/vrb/blob/main/src/Quaternion.cpp
I will try to find an older version.
The vrb folder is a must, it's the 3D library used to render the Wolvic contents. It isn't closed source, it's in a git submodule, have you initialized/updated your submodules?
The web engine used (gecko/chromium) has nothing to do with VRB, not sure why you say that you're almost sure is not needed. It is an integral part of Wolvic.
@svillar thanks for clarifying, I thought vrb was part of Gecko-dev, that's why I assumed that it wasn't needed to by the chromium build.
I also assumed that the submodules wouldonly be available to Igalia's members, I didn't even try to fetch the submodules.
I will try it later today, thank you so much!
The vrb folder is a must, it's the 3D library used to render the Wolvic contents. It isn't closed source, it's in a git submodule, have you initialized/updated your submodules?
You were right, I had to fetch the submodules. Now I can generate the APK or run into Oculus Quest 2 but it's not working as expected.
If I build the app as Debug, when the app opens in immersive mode and shows a black screen and nothing happens.
If I build it as Release the app opens as a window and I get the following messages on logcat:
--------- beginning of kernel
--------- beginning of tracking
--------- beginning of system
--------- beginning of main
2024-07-12 15:43:22.931 3865-14516 OVRLibrary pid-3865 W null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:27.634 3865-14516 OVRLibrary pid-3865 W null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:31.916 3865-14516 OVRLibrary com.oculus.systemux W null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:35.943 3235-3476 Interstiti...gerSession com.oculus.vrruntimeservice I ---------- InterstitialRenderer LoggerSession Begin ----------
ID: a34861162d29e3729bb3229cdba73d1a
Frame Type: Black[2]
Event Type: start
Status: Started [3]
[Start Time 9168630]
[event_type: start]
[last_top_activity_start: com.igalia.wolvic]
[top_activity_start: com.oculus.shellenv]
[description: Guardian black]
[client_package_name: com.oculus.shellenv]
[transition_type: 0]
[frame_type: 2]
---------- InterstitialRenderer LoggerSession End ----------
Did I forgot something? I am using OpenXR-SDK-release-1.0.34
and also added ovr_openxr_mobile_sdk_66.0
to the project.
Any ideas?
The logcat does not clarify much what's going on. Not sure how you build chromium but if you build release you have to disable minification in Wolvic, because with minification on many chromium code is removed/discarded and things just break randomly.
The logcat does not clarify much what's going on. Not sure how you build chromium but if you build release you have to disable minification in Wolvic, because with minification on many chromium code is removed/discarded and things just break randomly.
Thanks for the suggestion, now my build.gradle looks like this:
buildTypes {
release {
minifyEnabled false
shrinkResources false
}
}
The app has the same behavior as in debug mode, when it's installed on Oculus Quest 2 it sits in the lower bar and a window/panel opens.
I tried to grab the icon from the lower bar and drop in the front panel and then it crashes with some error messages, finally. It's a huge log so I will paste only the useful information:
...
2024-07-13 12:20:30.247 10415-10467 VRB com.igalia.wolvic I OpenXR: supported extension: XR_EXT_local_floor
2024-07-13 12:20:30.247 10415-10467 VRB com.igalia.wolvic I OpenXR: supported extension: XR_EXT_user_presence
2024-07-13 12:20:30.247 10415-10467 OpenXR-Loader com.igalia.wolvic V Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader com.igalia.wolvic V Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader com.igalia.wolvic V Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader com.igalia.wolvic E Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance called with invalid API version 1.1. Max supported version is 1.0
2024-07-13 12:20:30.248 10415-10467 libc++abi com.igalia.wolvic E terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_API_VERSION_UNSUPPORTED]
Origin: xrCreateInstance(&createInfo, &instance)
Source: /home/yuri/git/wolvic/app/src/openxr/cpp/DeviceDelegateOpenXR.cpp:227
2024-07-13 12:20:30.248 10415-10467 libc com.igalia.wolvic A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10467 (Thread-5), pid 10415 (m.igalia.wolvic)
2024-07-13 12:20:30.432 10415-10415 VRB[Session] com.igalia.wolvic D Loading URI: https://wolvic.com/start
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A APK-Location: /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/base.apk
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A Cmdline: com.igalia.wolvic
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A pid: 10415, tid: 10467, name: Thread-5 >>> com.igalia.wolvic <<<
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A Abort message: 'terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_API_VERSION_UNSUPPORTED]
Origin: xrCreateInstance(&createInfo, &instance)
Source: /home/yuri/git/wolvic/app/src/openxr/cpp/DeviceDelegateOpenXR.cpp:227'
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #01 pc 00000000000d1cc0 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #02 pc 00000000000d1e74 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #03 pc 00000000000e6b74 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #04 pc 00000000000e6208 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #05 pc 00000000000e6160 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (__cxa_throw+124) (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #06 pc 0000000000127e58 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::Throw(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, char const*, char const*)+152) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #07 pc 000000000012d1c8 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::ThrowXrResult(XrResult, char const*, char const*)+60) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #08 pc 0000000000125ecc /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::DeviceDelegateOpenXR::State::Initialize()+5188) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #09 pc 0000000000124a5c /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::DeviceDelegateOpenXR::Create(std::__ndk1::shared_ptr<vrb::RenderContext>&, crow::JavaContext*)+608) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #10 pc 0000000000123668 /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (android_main+424) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG pid-10511 A #11 pc 00000000001a568c /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.503 1067-10533 ActivityTaskManager system_server W Force finishing activity com.igalia.wolvic/.VRBrowserActivity
I believe this is the error:
E Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance called with invalid API version 1.1. Max supported version is 1.0
I am going to try other versions and see how it goes.
Edit: Using the OpenXR-SDK-release-1.0.33 gives me a different error (XR_ERROR_RUNTIME_UNAVAILABLE), the app still crashes:
024-07-13 12:39:06.362 13498-13545 OpenXR-Loader com.igalia.wolvic E Could access neither the installable nor system runtime broker.
2024-07-13 12:39:06.362 13498-13545 OpenXR-Loader com.igalia.wolvic I Info [GENERAL | | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - using global runtime file /system/etc/openxr/1/active_runtime.json
2024-07-13 12:39:06.362 13498-13545 OpenXR-Loader com.igalia.wolvic I Info [GENERAL | | OpenXR-Loader] : RuntimeManifestFile::CreateIfValid - attempting to load /system/etc/openxr/1/active_runtime.json
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader com.igalia.wolvic E Error [GENERAL | | OpenXR-Loader] : /system/etc/openxr/1/active_runtime.json library /system/priv-app/VrDriver/VrDriver.apk!/lib/arm64-v8a/libopenxr_forwardloader.so does not appear to exist
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader com.igalia.wolvic E Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader com.igalia.wolvic E Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader com.igalia.wolvic E Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
2024-07-13 12:39:06.364 13498-13547 MtpDeviceJNI com.igalia.wolvic D register_android_mtp_MtpDevice
2024-07-13 12:39:06.365 13498-13545 libc++abi com.igalia.wolvic E terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_RUNTIME_UNAVAILABLE]
Origin: xrEnumerateInstanceExtensionProperties(nullptr, 0, &extensionCount, nullptr)
Source: /home/yuri/git/wolvic/app/src/openxr/cpp/OpenXRExtensions.cpp:33
2024-07-13 12:39:06.365 13498-13545 libc com.igalia.wolvic A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 13545 (Thread-5), pid 13498 (m.igalia.wolvic)
Seems that the XR runtime cannot be found.
It works!!!!! Thank you so much @svillar for helping me out!
To fix this I had to use the latest ovr_openxr_mobile_sdk (66.0). Also, I had to use the matching OpenXR-SDK (1.0.34).
And also, the final step, I had to include the following line to the build.gradle file:
implementation 'org.khronos.openxr:openxr_loader_for_android:1.0.34'
Now the app doesn't crash.
I'm glad it worked, but you shouldn't actually need those. We have much older versions in third_party repo and works fine with that.
Regarding that extra line in gradle, we do already have a PR to allow wolvic to use the khronos loader from the runtime whenever supported.
But again, you must have skipped some step in the setup process (which I agree is not easy).
I'm glad it worked, but you shouldn't actually need those. We have much older versions in third_party repo and works fine with that.
Regarding that extra line in gradle, we do already have a PR to allow wolvic to use the khronos loader from the runtime whenever supported.
But again, you must have skipped some step in the setup process (which I agree is not easy).
Yes, I probably skipped something.
Also, there is a page from Oculus saying that any OpenXR-SDK older than 1.0.34 will crash, I can link here if I find it again. Maybe that's the issue with Oculus Quest 2.
https://developer.oculus.com/documentation/native/android/mobile-openxr/
Configuration
Wolvic version: latest Wolvic build ID: ?
Hardware: Dell Inspiron P70F, Fedora 40
Steps to Reproduce
Current Behavior
APK file cannot be generated because vrb files are missing (I am almost sure that those shouldn't be required for chromium builds)
Expected Behavior
APK file can be generated
Possible Solution
Remove the requirements for those files when build variant is chromium
Context
Error Logs and Stack Traces