RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
235 stars 28 forks source link

Application Crashing When Playing Video on HTC Vive Focus Plus #644

Closed SiddarthaG closed 3 years ago

SiddarthaG commented 3 years ago

Describe the bug Application crashes on start of playing a video with AVPro Media Player on the HTC Vive Focus Plus. Strangely, the crash SEEMS to only occur when you are in a scene with a lot of empty space(skybox) in view.

**Additional Information App does NOT crash on the Vive when playing a video where the display screen is placed in the middle of a 3d environment that blocks out majority of the skybox/background (For example, placing the display screen and camera in the middle of a coliseum -like 3d environment). A crash occurs as soon as you hide the 3d environment. From the log the first noticeable issue seems to be- Warn Adreno-GSL failed: errno 71 Protocol error

Your Setup (please complete the following information):

To Reproduce *!(EDITED 2021-02-27)

  1. Install Avpro Trial version 2.0.5, 2.0.9

  2. Load Demo_Mediaplayer scene that comes with AVPro

  3. Set MediaPlayerUI canvas render mode to screen space camera

  4. Add Vive Wave XR package to Unity

  5. Build and play on the HTC Vive Focus Plus

Logs AvproTest-logcat.txt

Ste-RH commented 3 years ago

There is nothing of very much to on in the log you have posted. We could expect to see a number of 'AVPro' log lines. Can you send over a complete logcat dump?

Ste-RH commented 3 years ago

Another thing to try @shazamk. Have you applied the >= 2020.1.x fix outlined here?

Symptom of this is usually an outright crash of the app instantly, but worth applying if you have not already.

SiddarthaG commented 3 years ago

Thank you I'll take a look. I will provide an updated log as soon as I get a chance.

SiddarthaG commented 3 years ago

I tried the 2020.1.x fix and it didn't work. I updated the logfile I originally posted with the entire log for the process. Thanks.

Ste-RH commented 3 years ago

There is still no reference to AVPro in your log @shazamk. Are you filtering it? We need it to be set to 'Verbose' so we have all the information.

Ste-RH commented 3 years ago

Have you, or can you, test the same project in Unity 2018 LTS and Unity 2019?

See here

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SiddarthaG commented 3 years ago

Sorry for the lack of response, I got tied up with other stuff. In the Additional Information of my post, I mentioned the app would close when I hide the environment. Clearing the GI cache as mentioned by the user in issue #499 SEEMS to have fixed this issue as I haven't gotten it again since doing so. I haven't yet tested to see if this resolved the crashing issue I witnessed with the mediaplayer demo. I will get back to you by the weekend. Thanks for the help.

Ste-RH commented 3 years ago

Awesome, thanks @shazamk. Looking forward to getting an update from you.

SiddarthaG commented 3 years ago

I'm still experiencing the app crashing when building the Demo_Mediaplayer scene for the Vive Focus. I've also tested it with Unity versions 2019.4.12, 2019.3.5 and with Avpro 2.0.9. In all cases I experienced the same issue. Something I didn't mention before which is important is that we're using Vive Wave XR 1.0.1 package for Unity. I've updated the logs and made sure there were no filters on (they are some RenderHeads logs present now). Thanks!

**Edit: In the Vive forum link you posted they mention a memory leak issue that happens with the Vive Legacy plugin. We're using Vive Wave XR plugin and from my understanding that issue should be fixed in that.

Ste-RH commented 3 years ago

Still crashing when applying the fix from #499 ?

Ste-RH commented 3 years ago

Looking at your log now.

This is a bit odd...?

Error Unity Unable to find OculusXRPlugin Error Unity DllNotFoundException: Unable to load DLL 'OculusXRPlugin': The specified module could not be found. Error Unity at Unity.XR.Oculus.OculusLoader.LoadOVRPlugin (System.String ovrpPath) [0x00000] in <00000000000000000000000000000000>:0 Error Unity at Unity.XR.Oculus.OculusLoader.RuntimeLoadOVRPlugin () [0x00000] in <00000000000000000000000000000000>:0

Ste-RH commented 3 years ago

...and a ton of:

Error libEGL eglMakeCurrent:818 error 3002 (EGL_BAD_ACCESS) Error Unity [EGL] Unable to acquire context: EGL_BAD_ACCESS: EGL cannot access a requested resource (for example a context is bound in another thread). Error Unity (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 274)

SiddarthaG commented 3 years ago

Yeah. Clearing the GI cache doesn't stop crashing. I'll look more into those errors and try my best to get back to you tomorrow. Thanks

SiddarthaG commented 3 years ago

Sorry again for the delay. We are using a Unity package for green screen keying and we noticed that when we get the texture directly from AVPro MediaPlayer and pass it to the keying component (from green screen package) to key and display, the crash is avoided. One notable thing that is happening in that keying component is that the texture we get from AVPro is then being copied using RenderTexture.DiscardContents() and Graphics.Blit(). I didn't get a chance to look further into it yet.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.