ML Media Player error

Hi!

I was testing my .apk build in Magic Leap 2.
I have multiple prefabs that contain ML Media Player that all play a different video.
I have a forwards and backwards button to go through these prefabs. Let's say I press forwards button, that will destroy the prefab currently in the scene, and then spawn the next prefab with a different video.
All these prefabs have a ML Media Player Behavior script sitting on them, and a small script of mine that simply finds the ML Media Player Behavior components and tells it to play video (as I want the video to auto-play once the prefab is instantiated).
During testing, with a built .apk installed on the headset, I noticed in Android Logcat an error. It never appears for the first instantiated prefab, but it appears for the ones after.
E.g. video prefab - video prefab (error) - video prefab (error) - cube - video prefab - video prefab (error), etc.
I'm not sure what this is about, maybe any of the devs have an idea, and how impactful is it to the project? Because I've stress tested the app too, and if I spam the button to loop through video prefabs after a while the app crashes (after about 100 instantiations).
I've observed Heap Alloc and it stays throughout the entire run until crash at about 47MB.

Unity editor ver. 2022.2.6f1
ML2 OS ver. 1.2.0
ML SDK ver. 1.6.0
Windows 11

Hi @downsideupface,

Thanks for bringing this to our attention. I will go ahead and reach out to our devs and get back to you as soon as we find out what the issue is. Thank you.

1 Like

I am going to try to reproduce this issue. I will go ahead and make a scene and reproduce your steps unless you have one that you would like to share.

Thank you very much for looking into this.

I have switched to a newer Unity version since (2022.2.21), and the crashing has minimized, but the error I posted is still there.

Sorry, I won't be able to give you a working scene as it uses a lot of commands and data coming from a server, and it's a company software project.

So I was able to make a scene that deleted a prefab and instantiated a new one and played the video after it was instantiated. I was not able to reproduce this issue. Are you making sure that the player is prepared before attempting to play it?

You got me there, I did not run any checks to see if the player is prepared (although, I did not play it right away, there was a delay to allow such preparations).

However, now that it is checking that, I have a brand new error.
"No player" seems to pop up a lot.
I don't have a custom ML Player component, I'm using the one provided by your unity SDK, and all I'm telling it is to prepare it and play.

Hello there,

I was wondering if you were able to resolve this issue as I have gotten the same message saying that there is no active player :slight_smile:

Hi @ernestas.milinskas,

Would you mind sharing a few details, please.

  • Unity Editor version
  • ML2 OS Version
  • ML SDK Version
  • Development OS (e.g. Mac, Windows)

Best,

El