Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash since using 2019.4.x running on Android 7 #428

Closed
jason-yak opened this issue Jul 29, 2020 · 10 comments
Closed

Crash since using 2019.4.x running on Android 7 #428

jason-yak opened this issue Jul 29, 2020 · 10 comments
Assignees
Labels
Android Android platform

Comments

@jason-yak
Copy link

We seem to have developed a crash issue with our app running on Android 7. The issue is not happening on Android 6, I'm not sure if this affects other OS versions or not. Some info to help narrow down the issue:

  • we were using AVPro 1.10.2 when we got the issue, have since updated to the latest 1.11.3 and the crash behaviour is exactly the same
  • the device is a Samsung S2 Tab running latest Android 7 update available for the device
  • we're using Unity 2019.4.2 on macOS Catalina, compiling for Android api range 21 to 28, have latest Android SDK updates for these api levels installed

So on the Android 6 device running the same build, we play a vid that's worked for years and it plays and logs this correctly:
[AVProVideo] Creating player 0
[AVProVideo] Initialising AVPro Video (script v1.11.3 plugin v1.11.3) on Adreno (TM) 330/OpenGL ES 3.0 V@140.0 AU@ (GIT@Ia10634f51b) (MT True) on Android Android OS 6.0.1 / API-23 (MMB29M/G900IDVU1CQD1)
[AVProVideo] Opening jar:file:///data/app/co.yakand.udp.agentaapuzzleindisguise-1/base.apk!/assets/EN/c1_Intro_ns@SD.mp4 (offset 0) with API MediaPlayer

But on our Android 7 device it crashes with this log:
AndroidJavaException: java.lang.VerifyError: Verifier rejected class com.RenderHeads.AVProVideo.AVProMobileVideo: com.RenderHeads.AVProVideo.AVProVideoPlayer com.RenderHeads.AVProVideo.AVProMobileVideo.CreatePlayer(int, boolean, boolean, int, boolean) failed to verify: com.RenderHeads.AVProVideo.AVProVideoPlayer com.RenderHeads.AVProVideo.AVProMobileVideo.CreatePlayer(int, boolean, boolean, int, boolean): [0x2F] cannot access instance field boolean com.RenderHeads.AVProVideo.AVProVideoPlayer.m_bShowPosterFrame from object of type Unresolved Reference: com.RenderHeads.AVProVideo.AVProVideoExoPlayer (declaration of 'com.RenderHeads.AVProVideo.AVProMobileVideo' appears in /data/app/co.yakand.udp.agentaapuzzleindisguise-2/base.apk)

I've done some snooping into what's happening and found some interesting results. So we have a version of our game live on Google Play, when I run this build on the Android 7 device this build runs totally fine. I checked and this build was using v1.10.2 of AVPro at the time it was compiled and it was using Unity 2019.3.9. So this still runs without issue. This morning I was also using v1.10.2 in Unity 2019.4.2 and it doesn't work. I don't think the Android SDK has changed on my machine (at least for Android 7) since the build was used to compile the working live version. So basically Unity is the only thing that's changed. I could roll back the project and use 2019.3.9 if we have to, it could help further narrow down where the issue has started. But let me know if this rings any bells with you on what could be happening? thanks!!

Any ideas what we should try? or let me know if there's anything we can do to help debug this issue.

@AndrewRH AndrewRH added the Android Android platform label Jul 29, 2020
@Ste-RH Ste-RH self-assigned this Jul 29, 2020
@Ste-RH
Copy link
Collaborator

Ste-RH commented Jul 29, 2020

Sorry you are seeing this. I hope we can get to the bottom of it asap.

I see you are using the MediaPlayer API for playback. Have you purposefully removed the ExoPlayer library files due to a clash with another library? (usually something like Oculus)

@Ste-RH
Copy link
Collaborator

Ste-RH commented Jul 29, 2020

I have tested the following setup here:

  • Unity 2019.4.2
  • Latest trial version of AVPro Video
  • Android NVidia Shield tablet running OS version 7.0
  • An APK made with API-24
  • Demo background demo scene and local video in StreamingAssets
  • Using the MediaPlayer API path

Everything plays back as it should.

@Ste-RH
Copy link
Collaborator

Ste-RH commented Jul 29, 2020

A bit more info. If I mark the ExoPlayer library files 'not for Android' then I can reproduce the error you are seeing.

@jason-yak
Copy link
Author

jason-yak commented Jul 29, 2020 via email

@jason-yak
Copy link
Author

jason-yak commented Jul 29, 2020 via email

@Ste-RH
Copy link
Collaborator

Ste-RH commented Jul 29, 2020

That is very strange...it is removing the ExoPlayeer library files that meant I could reproduce the error.

I have put a possible fix in (at least it fixes the reproduction of the issue here) and this will make it out into release 1.11.4 later today. I will post back when it has been released...if you could then test your side and report back, that would be great.

@AndrewRH
Copy link
Member

1.11.4 trial is available here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/1.11.4
The full version will be available on the store in a few hours

@jason-yak
Copy link
Author

It is strange, I've just compiled using the 'export project' so I could see exactly what jar files are being included in the build and it does appear the exoplayer is being excluded. I have no idea why though. This is the compiled libs folder:
https://www.dropbox.com/s/vf289ldtt9ppcm1/Screen%20Shot%202020-07-30%20at%2010.31.02%20am.png?dl=0

and here's some grabs of it in my project and import settings for sanity checking:
https://www.dropbox.com/s/qisygshswyoj03s/Screen%20Shot%202020-07-30%20at%2010.34.47%20am.png?dl=0
https://www.dropbox.com/s/lpqyqofrmtm7toh/Screen%20Shot%202020-07-30%20at%2010.34.57%20am.png?dl=0

I'll try this new update and see if this improves anything, but it does seem like something is preventing the exoplayer from being built in. I've searched my code base and nothing is touching it.

@jason-yak
Copy link
Author

So I've tried the new 1.11.4 update and yup this fixes my error on Android 7, thank you. To make sure I retested the build before this with the older plugin and it errors, using the new one it works fine.

But I'm still just a little worried about the exoplayer libs not being compiled into the apk though. To be honest I don't know what exoplayer is, are there any device types or Android versions that require this? We're wanting to support armv7 and armv64 architectures and api's 23 to 28 if that's at all relevant, and I only ever play videos in AVPro using the one MediaPlayer method. So I'm just wondering if there's any reason to be concerned that it's excluded? and I'm just a bit confused by the older plugin needing it to be there for vids to work properly on Android 7 but now doesn't need it in the new plugin update, thanks again.

@Ste-RH
Copy link
Collaborator

Ste-RH commented Aug 4, 2020

I am not hearing anything to be worried about 👍

@Ste-RH Ste-RH closed this as completed Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android platform
Projects
None yet
Development

No branches or pull requests

3 participants