Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
piotrek's avatar
piotrek
Explorer
10 years ago

EasyMovieTexture crashes with assertion fail in CompositorVR

I am using Unity 5.3.1p2 on OSX 10.10.5 and Oculus Runtime V0.5.0.1-beta together with EasyMovieTexture plugin 3.11.
I set sample scene with MediaPlayerCtrl (see attachment)

As soon as app starts on Gear VR app crashes. I see in logs that there's some error in CompositorVRAPI:
I/DEBUG   ( 2965): Abort message: 'E:\tw\33a21edae6c0e9ad\Software\OculusSDK\Integrations\Unity\Releases\0.1.4.0\OVRPlugin\Src\Util\CompositorVRAPI.cpp:732: virtual bool OVR::Util::CompositorVRAPI::EndFrame(int): assertion "frameIndex >= m_states[Front].m_frameIndex" failed'
I/DEBUG ( 2965): r0 00000000 r1 0000432b r2 00000006 r3 00000000
I/DEBUG ( 2965): r4 dddecdb8 r5 00000006 r6 00000058 r7 0000010c
I/DEBUG ( 2965): r8 ee874510 r9 000027a8 sl dd000040 fp dddec8a4
I/DEBUG ( 2965): ip 0000432b sp dddec810 lr f7135cf9 pc f7159d24 cpsr 60010010
I/DEBUG ( 2965):
I/DEBUG ( 2965): backtrace:
I/DEBUG ( 2965): #00 pc 0003bd24 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 2965): #01 pc 00017cf5 /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 2965): #02 pc 00018907 /system/lib/libc.so (raise+10)
I/DEBUG ( 2965): #03 pc 000151a5 /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG ( 2965): #04 pc 00012fec /system/lib/libc.so (abort+4)
I/DEBUG ( 2965): #05 pc 000163e9 /system/lib/libc.so (__libc_fatal+16)
I/DEBUG ( 2965): #06 pc 00015229 /system/lib/libc.so (__assert2+20)
I/DEBUG ( 2965): #07 pc 000326ec /data/app/com.oculussdk.sdkexamples-1/lib/arm/libOVRPlugin.so (OVR::Util::CompositorVRAPI::EndFrame(int)+216)
I/DEBUG ( 2965): #08 pc 0002eee0 /data/app/com.oculussdk.sdkexamples-1/lib/arm/libOVRPlugin.so (ovrp_EndFrame+44)
I/DEBUG ( 2965): #09 pc 00798308 /data/app/com.oculussdk.sdkexamples-1/lib/arm/libunity.so
I/DEBUG ( 2965): #10 pc 00492ae4 /data/app/com.oculussdk.sdkexamples-1/lib/arm/libunity.so
I/DEBUG ( 2965): #11 pc 00493830 /data/app/com.oculussdk.sdkexamples-1/lib/arm/libunity.so
I/DEBUG ( 2965): #12 pc 0048e478 /data/app/com.oculussdk.sdkexamples-1/lib/arm/libunity.so
I/DEBUG ( 2965): #13 pc 00433d9c /data/app/com.oculussdk.sdkexamples-1/lib/arm/libunity.so
I/DEBUG ( 2965): #14 pc 000174e7 /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG ( 2965): #15 pc 00015503 /system/lib/libc.so (__start_thread+6)


Any idea how to fix that? Is it something OSX-related and I should switch to Windows env as soon as possible?

9 Replies

Replies have been turned off for this discussion
  • Sorry, this looks like a bug in our OSX code path within Unity. The main and render threads' frame indices seem to be drifting due to a long stall on the main thread. Worst-case, it should be fixed in late March, but I'll see if we can get a workaround pushed this month. One thing you could try is temporarily disabling VR while initializing EasyMovieTexture. Set UnityEngine.VR.VRSettings.loadedDevice = UnityEngine.VR.VRDeviceType.None, load EasyMovieTexture, and then set it back to UnityEngine.VR.VRDeviceType.Oculus when finished.
  • @vrdaveb
    I'm getting the same error using that disable/load/enable solution:
    BUG   ( 2966): Abort message: 'E:\tw\33a21edae6c0e9ad\Software\OculusSDK\Integrations\Unity\Releases\0.1.4.0\OVRPlugin\Src\Util\CompositorVRAPI.cpp:732: virtual bool OVR::Util::CompositorVRAPI::EndFrame(int): assertion "frameIndex >= m_states[Front].m_frameIndex" failed'
    I/DEBUG ( 2966): r0 00000000 r1 00005ad8 r2 00000006 r3 00000000
    I/DEBUG ( 2966): r4 dddecdb8 r5 00000006 r6 00000058 r7 0000010c
    I/DEBUG ( 2966): r8 ef100890 r9 000027a8 sl dd000040 fp dddec8a4
    I/DEBUG ( 2966): ip 00005ad8 sp dddec810 lr f761dcf9 pc f7641d24 cpsr 60070010
    I/DEBUG ( 2966):
    I/DEBUG ( 2966): backtrace:
    I/DEBUG ( 2966): #00 pc 0003bd24 /system/lib/libc.so (tgkill+12)
    I/DEBUG ( 2966): #01 pc 00017cf5 /system/lib/libc.so (pthread_kill+52)
    I/DEBUG ( 2966): #02 pc 00018907 /system/lib/libc.so (raise+10)
    I/DEBUG ( 2966): #03 pc 000151a5 /system/lib/libc.so (__libc_android_abort+36)
    I/DEBUG ( 2966): #04 pc 00012fec /system/lib/libc.so (abort+4)
    I/DEBUG ( 2966): #05 pc 000163e9 /system/lib/libc.so (__libc_fatal+16)
    I/DEBUG ( 2966): #06 pc 00015229 /system/lib/libc.so (__assert2+20)
    I/DEBUG ( 2966): #07 pc 000326ec /data/app/com.oculus.UnitySample-1/lib/arm/libOVRPlugin.so (OVR::Util::CompositorVRAPI::EndFrame(int)+216)
    I/DEBUG ( 2966): #08 pc 0002eee0 /data/app/com.oculus.UnitySample-1/lib/arm/libOVRPlugin.so (ovrp_EndFrame+44)
    I/DEBUG ( 2966): #09 pc 00799c7c /data/app/com.oculus.UnitySample-1/lib/arm/libunity.so
    I/DEBUG ( 2966): #10 pc 00493cb4 /data/app/com.oculus.UnitySample-1/lib/arm/libunity.so
    I/DEBUG ( 2966): #11 pc 00494a00 /data/app/com.oculus.UnitySample-1/lib/arm/libunity.so
    I/DEBUG ( 2966): #12 pc 0048f648 /data/app/com.oculus.UnitySample-1/lib/arm/libunity.so
    I/DEBUG ( 2966): #13 pc 004354dc /data/app/com.oculus.UnitySample-1/lib/arm/libunity.so
    I/DEBUG ( 2966): #14 pc 000174e7 /system/lib/libc.so (__pthread_start(void*)+30)
    I/DEBUG ( 2966): #15 pc 00015503 /system/lib/libc.so (__start_thread+6)
    D/STATUSBAR-QSTileView( 3920): dynamicallyReduceTextSize: 0


    Does it mean it is OSX-only bug?
  • I've checked it by using Unity on Windows and I am getting the same crash.
    I've noticed that multithreaded rendering disabled makes thing better.
  • Thanks for following up. We are working on a solution here. In the meantime you may have to stick with single-threaded rendering if that works for you.
  • I got the same crash when building for Android. After updating to Unity 5.3.4 the bug seems to have disappeared.

    Can you confirm that the bug has been fixed in 5.3.4? I checked the release notes but found no entry related to this issue.
  • Anonymous's avatar
    Anonymous
    Hi - could we please get confirmation on what has happened to a solution? Thanks!
  • This should be fixed in Unity 5.3.4p5 and up. I don't have EasyMovieTexture handy to test, but the frame index hazard has been removed. Please let me know if you encounter this again.
  • Anonymous's avatar
    Anonymous
    I have been using the MPMP player (https://www.assetstore.unity3d.com/en/#!/content/53391) which like EasyMovieTexture exposes the android media player. This issues seems to still live in 5.3.5f1 - the single thread seems to work around this but it is not ideal. My adb.exe output looked very similar to the one posted above when running in debug mode:


    06-01 16:09:11.204  3055  3055 F DEBUG   : Abort message: 'E:\tw\43ffd860e3c1b6c5\Software\OculusSDK\Integrations\Unity\Releases\si-1.3.2\OVRPlugin\Src\Util\CompositorVRAPI.cpp:1176: virtual bool OVR::Util::CompositorVRAPI::EndFrame(int): assertion "frameIndex >= m_renderThreadState[renderThreadStateIndex].m_frameIndex" failed'
    06-01 16:09:11.204  3055  3055 F DEBUG   :     r0 00000000  r1 000041a8  r2 00000006  r3 db23f978
    06-01 16:09:11.204  3055  3055 F DEBUG   :     r4 db23f980  r5 db23f930  r6 00000000  r7 0000010c
    06-01 16:09:11.204  3055  3055 F DEBUG   :     r8 ee77ce10  r9 000027a8  sl db440040  fp db23f424
    06-01 16:09:11.204  3055  3055 F DEBUG   :     ip 00000006  sp db23dfa0  lr f712b355  pc f712d744  cpsr 40000010
    06-01 16:09:11.224  3055  3055 F DEBUG   :
    06-01 16:09:11.224  3055  3055 F DEBUG   : backtrace:
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #00 pc 00042744  /system/lib/libc.so (tgkill+12)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #01 pc 00040351  /system/lib/libc.so (pthread_kill+32)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #02 pc 0001ca8b  /system/lib/libc.so (raise+10)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #03 pc 00019d09  /system/lib/libc.so (__libc_android_abort+34)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #04 pc 0001754c  /system/lib/libc.so (abort+4)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #05 pc 0001b69f  /system/lib/libc.so (__libc_fatal+16)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #06 pc 00019d91  /system/lib/libc.so (__assert2+20)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #07 pc 000385d0  /data/app/com.bf.player-1/lib/arm/libOVRPlugin.so (OVR::Util::CompositorVRAPI::EndFrame(int)+312)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #08 pc 0002ef34  /data/app/com.bf.player-1/lib/arm/libOVRPlugin.so (ovrp_EndFrame+84)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #09 pc 0085c454  /data/app/com.bf.player-1/lib/arm/libunity.so (VRDeviceOculus::EndFrameGfxThread(unsigned int)+104)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #10 pc 004e29d8  /data/app/com.bf.player-1/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+19604)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #11 pc 004e3898  /data/app/com.bf.player-1/lib/arm/libunity.so (GfxDeviceWorker::Run()+20)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #12 pc 004ddd28  /data/app/com.bf.player-1/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+88)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #13 pc 0047d5b8  /data/app/com.bf.player-1/lib/arm/libunity.so (Thread::RunThreadWrapper(void*)+84)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #14 pc 0003fc53  /system/lib/libc.so (__pthread_start(void*)+30)
    06-01 16:09:11.224  3055  3055 F DEBUG   :     #15 pc 0001a38b  /system/lib/libc.so (__start_thread+6)