Search Unity

Bug VideoPlayer.Prepare() is crashing Unity 2022.2 with 100% CPU usage? VideoPlayer completely broken!!

Discussion in 'Audio & Video' started by mikejm_, Aug 16, 2022.

  1. mikejm_

    mikejm_

    Joined:
    Oct 9, 2021
    Posts:
    346
    I just upgraded to Unity 2022.2 and my app became completely unusable. After narrowing it down, I commented out all instances of VideoPlayer.Prepare() and everything works fine again (except I now can't pre-prepare videos of course).

    This is highly consistent. If I comment out the line "videoPlayer.Prepare();" I can load my app. If I leave it in, my app does this instead with Editor going to 99.9% CPU usage and crashing my system:

    editor 99.png

    So it is clearly VideoPlayer.Prepare() that is crashing things. I can still run Play() commands but Prepare() does this to the CPU every time.

    As soon as I drop back down to 2021.1.0b14 the exact code works fine and I can Prepare() videos again. Obviously I would like and need Prepare() working in 2022.2 as well.

    Is this a known problem? Did something change in 2022.2.0b4 that needs special accounting for? Is there anything more you need to narrow down why this is happening?

    Thanks.
     
    Last edited: Aug 16, 2022
  2. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Yes, it is a known issue and we are working on a solution right now. Unfortunately, there is no workaround other than staying on an older version. You can see another thread about this here. https://forum.unity.com/threads/in-...tor-build-in-2022-2-0b2.1314180/#post-8351250
     
    mikejm_ likes this.