Showing results for 
Search instead for 
Did you mean: 

Cannot compile/run VRCinema sample code

Level 2
Hi All,
I just installed Android Studio 3.6.1 / gradle 5.6.4, and the Oculus GO 1.3 SDK.  I can compile and run the VRcubeworld demo, but when I try to compile the VRCinema demo, I get a compilation error in OVR_MappedFile.cpp:
File = open(path, O_RDONLY, (mode_t)0440);
error: 'open' has superfluous mode bits; missing O_CREAT? [-Werror,-Wuser-defined-warnings]
if I change the code to:
File = open(path, O_RDONLY | O_CREAT, (mode_t)0440);
I can compile and deploy, but crashes on app startup on the Go:
2020-03-01 16:52:49.318 11882-11899/com.oculus.sdk.vrcinema V/Appl: GetIntentStrings - intent_cmd_ch = ``
2020-03-01 16:52:49.318 11882-11899/com.oculus.sdk.vrcinema V/Appl: GetIntentStrings - intent_pkg_ch = `com.oculus.vrshell`
2020-03-01 16:52:49.318 11882-11899/com.oculus.sdk.vrcinema W/OVR: ASSERT@ R:/new/ovr_sdk_mobile_1.30.0/VrSamples/VrCinema/Projects/Android/jni/../../../../../1stParty/OVR/Include\JniUtils.h(147): Jni != NULL && Object != NULL

--------- beginning of crash
2020-03-01 16:52:49.318 11882-11899/com.oculus.sdk.vrcinema A/libc: Fatal signal 5 (SIGTRAP), code 1 in tid 11899 (main)
2020-03-01 16:52:49.321 11882-11899/com.oculus.sdk.vrcinema E/crash-reporter-support: read() failed, reason: Connection reset by peer
2020-03-01 16:52:49.321 11882-11899/com.oculus.sdk.vrcinema E/crash-reporter-support: native-crash64 client could not receive the status of the request from the crash server
2020-03-01 16:52:49.321 11882-11899/com.oculus.sdk.vrcinema I/crash-reporter: failed to capture minidump crash
any ideas?


Level 2
Hello, I'd just like to note that I'm also experiencing this issue, I have not found a solution yet.

Level 2
Hi there! I ran into something similar in my travels and it appears to be due to stricter warnings in ndk r21 for fopen. You have a couple of options, downgrade the NDK your app targets or disable the warnings (which could hide other issues) by settng the following in your .mk file that builds the OVRSDK:

LOCAL_CFLAGS += -Wno-error=user-defined-warnings

Level 2
I had this same issue resolved it by indirectly entering the permission mode through a local variable like this.

int per = 0440;
File = open(path, O_RDONLY | O_CREAT, (mode_t)per);

another way to fix would be to set the mode to 0 but that would not be recommended.