Hi There!
I’m working on a standalone app for Oculus Quest 2/3 that uses the OSC protocol. When the app receives an OSC message it crashes but I have some Internet permissions enabled in the Android Manifest. I think I’m obviously ignoring something.
Any advice is well accepted, thanks!
Try to share the errors you get.
My initial guess is that you haven’t initialized your input buffer correctly, so either the receive data process is trying to write outside of the buffer or you are trying to read the data outside of the buffer.
Remember that any OSC message includes:
“OSC Address Pattern” followed by an “OSC Type Tag String” followed by zero or more “OSC Arguments”
hey thanks for the reply, it actually gives me an error on a buffer…how I can fix it?
this is the log:
11-02 22:45:55.784 10509 10509 I DEBUG : Current uptime at crash: 8832 seconds
11-02 22:45:56.779 10509 10509 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-02 22:45:56.779 10509 10509 F DEBUG : Build fingerprint: ‘oculus/hollywood/hollywood:12/SQ3A.220605.009.A1/50623410078100150:user/release-keys’
11-02 22:45:56.779 10509 10509 F DEBUG : Revision: ‘0’
11-02 22:45:56.779 10509 10509 F DEBUG : ABI: ‘arm’
11-02 22:45:56.779 10509 10509 F DEBUG : Timestamp: 2023-11-02 22:45:55.783756219+0100
11-02 22:45:56.779 10509 10509 F DEBUG : Process uptime: 67s
11-02 22:45:56.779 10509 10509 F DEBUG : Cmdline: com.epicgames.VR_TEST_SKETCH
11-02 22:45:56.779 10509 10509 F DEBUG : pid: 8661, tid: 9413, name: OSCServ-istener >>> com.epicgames.VR_TEST_SKETCH <<<
11-02 22:45:56.779 10509 10509 F DEBUG : uid: 10371
11-02 22:45:56.779 10509 10509 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-02 22:45:56.780 10509 10509 F DEBUG : Abort message: ‘FORTIFY: strlen: detected read past end of buffer’
11-02 22:45:56.780 10509 10509 F DEBUG : r0 00000000 r1 000024c5 r2 00000006 r3 a56fba68
11-02 22:45:56.780 10509 10509 F DEBUG : r4 a56fba60 r5 000021d5 r6 000024c5 r7 0000016b
11-02 22:45:56.780 10509 10509 F DEBUG : r8 00000000 r9 ffffffff r10 00000000 r11 a56fbc60
11-02 22:45:56.780 10509 10509 F DEBUG : ip a56fba68 sp a56fba48 lr e83f0299 pc e83f02aa
11-02 22:45:56.780 10509 10509 F DEBUG : backtrace:
11-02 22:45:56.780 10509 10509 F DEBUG : #00 pc 000612aa /apex/com.android.runtime/lib/bionic/libc.so (abort+98) (BuildId: b80cd94ccb2036881e04eb8efe03faa9)
11-02 22:45:56.780 10509 10509 F DEBUG : #01 pc 00062417 /apex/com.android.runtime/lib/bionic/libc.so (__fortify_fatal(char const*, …)+26) (BuildId: b80cd94ccb2036881e04eb8efe03faa9)
11-02 22:45:56.780 10509 10509 F DEBUG : #02 pc 0007af8f /apex/com.android.runtime/lib/bionic/libc.so (__strlen_chk+18) (BuildId: b80cd94ccb2036881e04eb8efe03faa9)
11-02 22:45:56.780 10509 10509 F DEBUG : #03 pc 06155758 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FOSCStream::ReadString()+108) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #04 pc 0615fd94 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FOSCMessagePacket::ReadData(FOSCStream&)+52) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #05 pc 06164560 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FOSCServerProxy::OnPacketReceived(TSharedPtr<FArrayReader, (ESPMode)1> const&, FIPv4Endpoint const&)+412) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #06 pc 0616e0a4 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (TBaseRawMethodDelegateInstance<false, FOSCServerProxy, void (TSharedPtr<FArrayReader, (ESPMode)1> const&, FIPv4Endpoint const&), FDefaultDelegateUserPolicy>::ExecuteIfSafe(TSharedPtr<FArrayReader, (ESPMode)1> const&, FIPv4Endpoint const&) const+36) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #07 pc 0616aac4 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FUdpSocketReceiver::Update(FTimespan const&)+1096) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #08 pc 0616a4a0 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FUdpSocketReceiver::Run()+36) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #09 pc 07691268 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FRunnableThreadPThread::Run()+164) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #10 pc 0756a228 /data/app/~~tIKIdAve_11mrOPD8bjRxw==/com.epicgames.VR_TEST_SKETCH-vbHQP0BCF6GN8Bx27bH2nw==/lib/arm/libUE4.so (FRunnableThreadPThread::_ThreadProc(void*)+84) (BuildId: a2f8340ea5f835841c5476f467ffe14099ba4632)
11-02 22:45:56.780 10509 10509 F DEBUG : #11 pc 0009ed05 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: b80cd94ccb2036881e04eb8efe03faa9)
11-02 22:45:56.780 10509 10509 F DEBUG : #12 pc 000620a9 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: b80cd94ccb2036881e04eb8efe03faa9)
11-02 22:45:56.818 8661 8661 D UE4 : [GameActivity] onPause: stop memory reporter runnable
11-02 22:45:56.818 8661 8661 D UE4 : [GameActivity] Unregistering sensor listeners
11-02 22:45:56.821 8661 8770 D UE4 : Case APP_CMD_PAUSE
11-02 22:45:56.821 8661 8770 D UE4 : [2023.11.02-21.45.56:821][ 74]LogAndroid: Case APP_CMD_PAUSE
11-02 22:45:56.821 8661 8770 D UE4 : LogAndroidEvents::EnqueueAppEvent : 6, [width=-1, height=-1], tid = 8770, APP_EVENT_STATE_ON_PAUSE
11-02 22:45:56.821 8661 8770 D UE4 : [2023.11.02-21.45.56:821][ 74]LogAndroid: event thread, suspending app, acquiring HW window lock.
11-02 22:45:56.821 8661 8770 D UE4 : LogAndroidEvents::EnqueueAppEvent : 15, [width=-1, height=-1], tid = 8770, APP_EVENT_RUN_CALLBACK
11-02 22:45:56.821 8661 8770 D UE4 : [2023.11.02-21.45.56:821][ 74]LogAndroid: AndroidEGL:: SuspendApp_EventThread, waiting for event manager to process. tid: 8770
11-02 22:45:56.821 8661 8661 D UE4 : [GameActivity] ==============> GameActive.onPause complete!
11-02 22:45:56.823 8661 8769 D UE4 : [2023.11.02-21.45.56:823][ 75]LogAndroidEvents: Display: LogAndroidEvents::DequeueAppEvent : 6, [width=-1, height=-1], APP_EVENT_STATE_ON_PAUSE
11-02 22:45:56.823 8661 8769 D UE4 : FAppEventManager::Tick processing, 6
11-02 22:45:56.823 8661 8769 D UE4 : [2023.11.02-21.45.56:823][ 75]LogVulkanRHI: FVulkanPipelineStateCacheManager: skipped saving because we only save if the PSOFC based one failed to load.
11-02 22:45:56.823 8661 8769 D UE4 : [2023.11.02-21.45.56:823][ 75]LogAndroidEvents: Display: LogAndroidEvents::DequeueAppEvent : 15, [width=-1, height=-1], APP_EVENT_RUN_CALLBACK
11-02 22:45:56.823 8661 8769 D UE4 : FAppEventManager::Tick processing, 15
11-02 22:45:56.823 8661 8769 D UE4 : [2023.11.02-21.45.56:823][ 75]LogAndroidEvents: Display: Event thread callback running.
11-02 22:45:56.823 8661 8769 D UE4 : [2023.11.02-21.45.56:823][ 75]LogAndroid: performing app backgrounding callback. 0xb068abf0