Closed Last8Exile closed 1 week ago
1 and 2. I will try different graphics and media APIs on 2024 May 02.
Are you making sure that you change before calling OpenMedia?
I never call OpenMedia in this case. Crash happens without opening any video. Just changing settings of MediaPlayer instance. Please, wait to 2024 May 02. I will test everything again and triple confirm exact place where and why crash happens. I can send reproduction project if needed. There is a small chance that crash related to Java code stripping.
It will be same perproduction project as in https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1836
but with one additional button which calls _player.PlatfrormOptionsAndroid.audioMode = MediaPlayer.PlatformOptions.AudioMode.Unity;
- Does this occur in both Vulkan and OpenGLES?
- Does this occur in both Exoplayer and Android Mediaplayer?
Yes to all. I tested 4 combinations of graphics and mediap APIs. Settings that lead to crash is tied to OptionsAndroid._changed field. I tested with audioMode and preferredMaximumResolution. And i tested both Mono and IL2CPP scripting backends.
And sligly different crashlog:
Hi @Chris-RH . I have same problem, and same steps to reproduce. Do you have any updates?
This might have been fixed in v3.0.2. I cannot reproduce it here with the latest version.
Would it be possible for you to update, re-test, and report back @Last8Exile ?
@Ste-RH I don't have spare time this week. I will try to check issues opened by me at 2024.06.17
@Ste-RH It is also reproduced in v3.0.2, and the error below occurs.
java_vm_ext.cc:579] JNI DETECTED ERROR IN APPLICATION: the return type of CallStaticIntMethodV does not match void
com.renderheads.AVPro.Video.Manager.Player_SetPlayerSettings(int, boolean, int, int, int, int, boolean, boolean)
java_vm_ext.cc:579] in call to CallStaticIntMethodV
java_vm_ext.cc:579] from boolean com.unity3d.player.UnityPlayer.nativeRender()
Hopefully this will be fixed in v3.0.3
AVPro Video version 3.0.3 has been released. Please let us know if the issue has been fixed :)
In my case, still crashed on v3.0.3.
20:06:06.786 8091-8368 AVProVideo com...al.jumpvrm D 🐞 (com_renderheads_AVProVideo.cpp:902) AVPPluginMakePlayer - settings: {
.api = 2,
.pixelFormat = 1,
.videoFlags = 0x00000000,
.preferredMaximumResolution_width = 0.000000,
.preferredMaximumResolution_height = 0.000000,
.maximumPlaybackRate = 0.000000,
.audioOutputMode = 1,
.sampleRate = 48000,
.bufferLength = 1024,
.audioFlags = 0x00000000,
.audio360Channels = 0,
.audio360LatencyMS = 0,
.preferredPeakBitRate = 0.000000,
.preferredForwardBufferDuration = 0.000000,
.networkFlags = 0x00000000,
.minBufferMs = 50000,
.maxBufferMs = 50000,
.bufferForPlaybackMs = 2500,
.bufferForPlaybackAfterRebufferMs = 5000
}
20:06:06.859 8091-8368 Conn...ger com...al.jumpvrm D StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:3925)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4489)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4456)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4430)] [androidx.media3.exoplayer.scheduler.RequirementsWatcher.registerNetworkCallbackV24(RequirementsWatcher.java:137)] [androidx.media3.exoplayer.scheduler.RequirementsWatcher.start(RequirementsWatcher.java:92)] [androidx.media3.exoplayer.offline.DownloadManager.<init>(DownloadManager.java:264)] [androidx.media3.exoplayer.offline.DownloadManager.<init>(DownloadManager.java:216)] [com.renderheads.AVPro.Video.Player_ExoPlayer.InitialisePlayer(Unknown
Source:156)] [com.renderheads.AVPro.Video.Player_Base.Initialise(Unknown Source:92)] [com.renderheads.AVPro.Video.Manager.MakePlayer(Unknown
Source:127)] [com.unity3d.player.UnityPlayer.nativeRender(Native Method)] [com.unity3d.player.UnityPlayer.access$300(Unknown
Source:0)] [com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)]
20:06:06.908 8091-8368 Unity com...al.jumpvrm I playerID: 00007857
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:CreateCommandBuffers()
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:.ctor(PlatformOptions)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer(OptionsAndroid)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer()
RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()
ifland.UCF.Media.Module.VideoPlayer:CreatePlayer(Transform)
ifland.UCF.Media.Module.VideoPlayer:.ctor(Transform, IVideoEventHandler)
ifland.UCF.Media.Service.VideoProvider:Initialize(IMediaModuleEventHandler, Material)
ifland.UCF.Media.Service.MediaProvider:EnsureMediaProvider(MediaUser, LandMediaData, Action`1)
ifland.UCF.Media.Service.MediaService:SyncMediaData(iflandUser, LandMediaData, Boolean, Action`1)
ifland.UCF.App.ServiceController.<PresentationSetup>d__2:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
20:06:06.909 8091-8368 Unity com...al.jumpvrm I flags: 00000000
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:CreateCommandBuffers()
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:.ctor(PlatformOptions)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer(OptionsAndroid)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer()
RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()
ifland.UCF.Media.Module.VideoPlayer:CreatePlayer(Transform)
ifland.UCF.Media.Module.VideoPlayer:.ctor(Transform, IVideoEventHandler)
ifland.UCF.Media.Service.VideoProvider:Initialize(IMediaModuleEventHandler, Material)
ifland.UCF.Media.Service.MediaProvider:EnsureMediaProvider(MediaUser, LandMediaData, Action`1)
ifland.UCF.Media.Service.MediaService:SyncMediaData(iflandUser, LandMediaData, Boolean, Action`1)
ifland.UCF.App.ServiceController.<PresentationSetup>d__2:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
20:06:06.910 8091-8368 Unity com...al.jumpvrm I flags: 00007857
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:CreateCommandBuffers()
RenderHeads.Media.AVProVideo.PlatformMediaPlayer:.ctor(PlatformOptions)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer(OptionsAndroid)
RenderHeads.Media.AVProVideo.MediaPlayer:CreateMediaPlayer()
RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()
ifland.UCF.Media.Module.VideoPlayer:CreatePlayer(Transform)
ifland.UCF.Media.Module.VideoPlayer:.ctor(Transform, IVideoEventHandler)
ifland.UCF.Media.Service.VideoProvider:Initialize(IMediaModuleEventHandler, Material)
ifland.UCF.Media.Service.MediaProvider:EnsureMediaProvider(MediaUser, LandMediaData, Action`1)
ifland.UCF.Media.Service.MediaService:SyncMediaData(iflandUser, LandMediaData, Boolean, Action`1)
ifland.UCF.App.ServiceController.<PresentationSetup>d__2:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
20:06:06.918 8091-8368 t.tr...pvr com...al.jumpvrm A java_vm_ext.cc:579] JNI DETECTED ERROR IN APPLICATION: the return type of CallStaticIntMethodV does not match void
com.renderheads.AVPro.Video.Manager.Player_SetPlayerSettings(int, boolean, int, int, int, boolean, boolean)
java_vm_ext.cc:579] in call to CallStaticIntMethodV
java_vm_ext.cc:579] from boolean com.unity3d.player.UnityPlayer.nativeRender()
hmmm, that's a shame. Could you attach a full, unedited logcat as a txt file please
Here is log. logcat.txt
Thanks for the log @dw8869. It has showed exactly where the issue is and we have now put a fix in for it. This will be available in the next build (v3.0.4) which we hope to have out by the end of the week.
@Ste-RH Can I get the version before it was released? There are many things that I couldn't check due to this error.
Still same for me. I'm waiting 3.0.4
AVPro Video version 3.0.4 has been released. Please let us know if it has not fixed your issue.
The issue seems to have been fixed. It cannot be reproduced.
Describe the issue Application crashes when changing any setting in
MediaPlayer.PlatfrormOptionsAndroid
. Crash happens whenlibAVProVideo2Native.so
tries to call Java methodcom.renderheads.AVPro.Video.Manager.Player_SetPlayerSettings
with invalid signature. Check crash log for details.Your Setup (please complete the following information):
To Reproduce
MediaPlayer.PlatfrormOptionsAndroid
3.1. for example set different audio mode:_player.PlatfrormOptionsAndroid.audioMode = MediaPlayer.PlatformOptions.AudioMode.Unity;
Logs
logcat
``` Aborting thread: "UnityMain" prio=5 tid=18 Native | group="" sCount=0 ucsCount=0 flags=0 obj=0x12cc1568 self=0xdc34e010 | sysTid=8668 nice=0 cgrp=default sched=0/0 handle=0xdee9be80 | state=R schedstat=( 3195901855 47372849 888 ) utm=298 stm=20 core=6 HZ=100 | stack=0xded99000-0xded9b000 stackSize=1035KB | held mutexes= "abort lock" "mutator lock"(shared held) native: #00 pc 00497913 /apex/com.android.art/lib/libart.so (art::DumpNativeStack+134) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #01 pc 0051113b /apex/com.android.art/lib/libart.so (art::Thread::DumpStack const+126) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #02 pc 0021c5a9 /apex/com.android.art/lib/libart.so (art::Thread::DumpStack const+112) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #03 pc 004f766b /apex/com.android.art/lib/libart.so (art::AbortState::DumpThread const+26) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #04 pc 004f2437 /apex/com.android.art/lib/libart.so (art::Runtime::Abort+2314) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #05 pc 00023837 /apex/com.android.art/lib/libbase.so (android::base::SetAborter::$_0::__invoke+46) (BuildId: 19bd36443b2e34de37977aa8e0ff152d) native: #06 pc 000230d7 /apex/com.android.art/lib/libbase.so (android::base::LogMessage::~LogMessage+226) (BuildId: 19bd36443b2e34de37977aa8e0ff152d) native: #07 pc 00254939 /apex/com.android.art/lib/libart.so (art::JavaVMExt::JniAbort+1972) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #08 pc 00254153 /apex/com.android.art/lib/libart.so (art::JavaVMExt::JniAbortV+54) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #09 pc 003fd229 /apex/com.android.art/lib/libart.so (art::::ScopedCheck::AbortF +40) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #10 pc 001eb447 /apex/com.android.art/lib/libart.so (art::::ScopedCheck::CheckMethodAndSig +314) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #11 pc 001ea3b9 /apex/com.android.art/lib/libart.so (art::::CheckJNI::CallMethodV +224) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #12 pc 003f1e27 /apex/com.android.art/lib/libart.so (art::::CheckJNI::CallStaticIntMethodV +42) (BuildId: 9d2fb319cd1279742bba25d07f1d77c2) native: #13 pc 0001a26d /data/app/~~MADFFSF08P4eqxEJtK1vLg==/com.ITS.Test-0tFx2ZfE05B-37r7XcGlWw==/lib/arm/libAVProVideo2Native.so (???) (BuildId: 2cec052d80dd1993f5b131faad50cd30e7ad23bb) native: #14 pc 0001ba85 /data/app/~~MADFFSF08P4eqxEJtK1vLg==/com.ITS.Test-0tFx2ZfE05B-37r7XcGlWw==/lib/arm/libAVProVideo2Native.so (AVPPlayerSetPlayerSettings+148) (BuildId: 2cec052d80dd1993f5b131faad50cd30e7ad23bb) native: #15 pc 00003dde