videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

VideoKit breaks Live Wallpaper on Android #94

Closed marvpaul closed 8 months ago

marvpaul commented 10 months ago

I'm using my Unity app as a live wallpaper on Android. Having VideoKit within the app makes the LWP service crash (see log below). I'm able to start the LWP as usual when excluding the pluginfile VideoKit.aar for an Android build. Do you see any chance to prevent this from happening (I want to include your VideoKit when starting the app normally but don't want to include it when running as a service [or prevent the crash])?

01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1126)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at void java.lang.Runtime.load0(java.lang.Class, java.lang.String) (Runtime.java:931)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at void java.lang.System.load(java.lang.String) (System.java:1625)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at boolean com.unity3d.player.UnityPlayer.access$300(com.unity3d.player.UnityPlayer) ((null):-1)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at boolean com.unity3d.player.UnityPlayer$e$1.handleMessage(android.os.Message) ((null):-1)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:226)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at void android.os.Looper.loop() (Looper.java:313)
01-22 21:58:29.664 18863 18880 I ounds.wallpaper:   at void com.unity3d.player.UnityPlayer$e.run() ((null):-1)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519] No pending exception expected: java.lang.ExceptionInInitializerError: 
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1126)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at void java.lang.Runtime.load0(java.lang.Class, java.lang.String) (Runtime.java:931)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at void java.lang.System.load(java.lang.String) (System.java:1625)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at boolean com.unity3d.player.UnityPlayer.access$300(com.unity3d.player.UnityPlayer) ((null):-1)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at boolean com.unity3d.player.UnityPlayer$e$1.handleMessage(android.os.Message) ((null):-1)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:226)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at void android.os.Looper.loop() (Looper.java:313)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519]   at void com.unity3d.player.UnityPlayer$e.run() ((null):-1)
01-22 21:58:29.664 18863 18880 F ounds.wallpaper: thread.cc:2519] 
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] Runtime aborting...
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] All threads:
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] DALVIK THREADS (22):
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] "main" prio=5 tid=1 TimedWaiting
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | group="" sCount=1 ucsCount=0 flags=1 obj=0x72d96058 self=0xb4000077b706f800
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | sysTid=18863 nice=0 cgrp=default sched=0/0 handle=0x786c545500
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | state=S schedstat=( 68802095 9674007 76 ) utm=1 stm=5 core=5 HZ=100
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | stack=0x7ffb2dc000-0x7ffb2de000 stackSize=8188KB
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | held mutexes=
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #00 pc 00089634  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+36) (BuildId: 1bcad8bca80d38bceb9089f70d394e33)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #01 pc 00537c40  /apex/com.android.art/lib64/libart.so (art::Thread::Park+504) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #02 pc 005375f8  /apex/com.android.art/lib64/libart.so (art::Unsafe_park +160) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at jdk.internal.misc.Unsafe.park(Native method)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   - waiting on an unknown object
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:717)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1074)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:415)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.unity3d.player.UnityPlayer.updateDisplayInternal(unavailable:52)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.unity3d.player.UnityPlayer.displayChanged(unavailable:17)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.bitglacier.lwm.LiveWallpaperService$LiveEngine.onVisibilityChanged(LiveWallpaperService.java:134)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:1697)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:1801)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:2805)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:44)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.os.Handler.dispatchMessage(Handler.java:106)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.os.Looper.loopOnce(Looper.java:226)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.os.Looper.loop(Looper.java:313)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at android.app.ActivityThread.main(ActivityThread.java:8757)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.reflect.Method.invoke(Native method)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] 
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] "FinalizerDaemon" prio=5 tid=9 Waiting
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | group="" sCount=1 ucsCount=0 flags=1 obj=0x12c1b330 self=0xb40000778e0d4400
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | sysTid=18873 nice=4 cgrp=default sched=0/0 handle=0x7792832cb0
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | state=S schedstat=( 248490 711875 2 ) utm=0 stm=0 core=0 HZ=100
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | stack=0x779272f000-0x7792731000 stackSize=1039KB
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | held mutexes=
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #00 pc 00089630  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32) (BuildId: 1bcad8bca80d38bceb9089f70d394e33)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #01 pc 00232cec  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks+140) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #02 pc 0028a88c  /apex/com.android.art/lib64/libart.so (art::Monitor::Wait+6120) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Object.wait(Native method)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   - waiting on <0x0243a54e> (a java.lang.Object)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Object.wait(Object.java:386)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:210)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   - locked <0x0243a54e> (a java.lang.Object)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:231)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:309)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$Daemon.run(Daemons.java:145)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Thread.run(Thread.java:1012)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] 
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691] "FinalizerWatchdogDaemon" prio=5 tid=11 Sleeping
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | group="" sCount=1 ucsCount=0 flags=1 obj=0x12c1b3c0 self=0xb40000778e0d6000
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | sysTid=18874 nice=4 cgrp=default sched=0/0 handle=0x7792728cb0
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | state=S schedstat=( 210313 175469 3 ) utm=0 stm=0 core=1 HZ=100
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | stack=0x7792625000-0x7792627000 stackSize=1039KB
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   | held mutexes=
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #00 pc 00089634  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+36) (BuildId: 1bcad8bca80d38bceb9089f70d394e33)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #01 pc 0028b0d0  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::TimedWait+252) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   native: #02 pc 002894a4  /apex/com.android.art/lib64/libart.so (art::Monitor::Wait+1024) (BuildId: 735f12f804f88d62a2cb437261076ff7)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Thread.sleep(Native method)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   - sleeping on <0x0b7f566f> (a java.lang.Object)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Thread.sleep(Thread.java:450)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   - locked <0x0b7f566f> (a java.lang.Object)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Thread.sleep(Thread.java:355)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForNanos(Daemons.java:481)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$FinalizerWatchdogDaemon.waitForProgress(Daemons.java:527)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:412)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Daemons$Daemon.run(Daemons.java:145)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]   at java.lang.Thread.run(Thread.java:1012)
01-22 21:58:29.711 18863 18880 F ounds.wallpaper: runtime.cc:691]
olokobayusuf commented 10 months ago

@marvpaul What version of VideoKit are you on? And do you have access to more logs? These logs don't contain the call stack of the thread that caused the crash.

marvpaul commented 10 months ago

It's 0.0.17 alpha. Here's a callstack:

01-24 00:45:36.264 26057 26094 F ounds.wallpaper: runtime.cc:699]     in call to GetStaticMethodID
01-24 00:45:36.264 26057 26094 F ounds.wallpaper: runtime.cc:699]     from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)
01-24 00:45:36.275 26057 26094 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-24 00:45:36.275 26057 26094 E CRASH   : Version '2022.3.10f1 (ff3792e53c62)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
01-24 00:45:36.275 26057 26094 E CRASH   : Build fingerprint: 'samsung/r8qeea/r8q:13/TP1A.220624.014/G780GXXS6EWF3:user/release-keys'
01-24 00:45:36.275 26057 26094 E CRASH   : Revision: '10'
01-24 00:45:36.275 26057 26094 E CRASH   : ABI: 'arm'
01-24 00:45:36.275 26057 26094 E CRASH   : Timestamp: 2024-01-24 00:45:36.275574092+0100
01-24 00:45:36.275 26057 26094 E CRASH   : pid: 26057, tid: 26094, name: UnityMain  >>> com.MKGames.FluidsSounds.wallpaper <<<
01-24 00:45:36.275 26057 26094 E CRASH   : uid: 10334
01-24 00:45:36.275 26057 26094 E CRASH   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
01-24 00:45:36.275 26057 26094 E CRASH   :     r0  00000000  r1  000065ee  r2  00000006  r3  e51f8048
01-24 00:45:36.275 26057 26094 E CRASH   :     r4  e51f8058  r5  e51f8040  r6  000065c9  r7  0000016b
01-24 00:45:36.275 26057 26094 E CRASH   :     r8  00000000  r9  ffffffff  r10 e51f8048  r11 00000058
01-24 00:45:36.275 26057 26094 E CRASH   :     ip  000065ee  sp  e51f8028  lr  f05067db  pc  f05067ee
01-24 00:45:36.275 26057 26094 E CRASH   : backtrace:
01-24 00:45:36.275 26057 26094 E CRASH   :       #00 pc 000637ee  /apex/com.android.runtime/lib/bionic/libc.so (abort+138) (BuildId: 5d48bc9cc6ae3c32f2caa2c9135cceb3)
01-24 00:45:36.275 26057 26094 E CRASH   :       #01 pc 004f258f  /apex/com.android.art/lib/libart.so (art::Runtime::Abort(char const*)+1346) (BuildId: 2c27deb1ebe8c2d821a954ea6ddd7c8b)
01-24 00:45:36.275 26057 26094 E CRASH   :       #02 pc 00023837  /apex/com.google.mainline.primary.libs@341177000/lib/libbase.so/2baee144307110a2b9a7fffc26bfdca189fe29b8266623afb93ed899028350f0708609923037edb06ca3f04aad0e2a06ef79abe9df8628423a3f13dfbde5f670/libbase.so (BuildId: 959b00e687b93fff2e345580c1584040)
01-24 00:45:36.275 26057 26094 E CRASH   :       #03 pc 00001ccc  [anon:libc_malloc]
01-24 00:45:36.275 26057 26094 E CRASH   : managed backtrace:
01-24 00:45:36.275 26057 26094 E CRASH   :       #00 VideoKit.Internal.VideoKitSettings/<CheckSession>d__12:MoveNext () </Users/marvinkruger/Fluids/Assets/videokit-0.0.17 2/Runtime/Internal/VideoKitSettings.cs:66>
01-24 00:45:36.275 26057 26094 E CRASH   :       #01 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<VideoKit.Internal.VideoKit/Status>:Start<VideoKit.Internal.VideoKitSettings/<CheckSession>d__12> (VideoKit.Internal.VideoKitSettings/<CheckSession>d__12&) <0xbb>
01-24 00:45:36.275 26057 26094 E CRASH   :       #02 VideoKit.Internal.VideoKitSettings:CheckSession () <0x8f>
01-24 00:45:36.276 26057 26094 E CRASH   :       #03 VideoKit.Internal.VideoKitSettings/<Awake>d__21:MoveNext () </Users/marvinkruger/Fluids/Assets/videokit-0.0.17 2/Runtime/Internal/VideoKitSettings.cs:103>
01-24 00:45:36.276 26057 26094 E CRASH   :       #04 System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<VideoKit.Internal.VideoKitSettings/<Awake>d__21> (VideoKit.Internal.VideoKitSettings/<Awake>d__21&) <0xc3>
01-24 00:45:36.276 26057 26094 E CRASH   :       #05 VideoKit.Internal.VideoKitSettings:Awake () <0x9f>
01-24 00:45:36.276 26057 26094 E CRASH   :       #06 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
01-24 00:45:36.349  1238  3644 D MotionRecognitionService: values = 50.0
01-24 00:45:36.349  1238  3644 D MotionRecognitionService: onReceive lux: 50.0  action: 
01-24 00:45:36.349  1238  3644 D MotionRecognitionService: Inject brightness form Cam 50.0
01-24 00:45:36.349  1238  3644 D MotionRecognitionService: Inject calibrated lux
01-24 00:45:36.385 26057 26094 E CRASH   : Tombstone written to: /storage/emulated/0/Android/data/com.MKGames.FluidsSounds/files/tombstone_01
01-24 00:45:36.385 26057 26094 E CRASH   : Forwarding signal 6
01-24 00:45:36.385 26057 26094 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 26094 (UnityMain), pid 26057 (ounds.wallpaper)
01-24 00:45:36.434 26194 26194 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstoneProto
01-24 00:45:36.435   758   758 I tombstoned: received crash request for pid 26094
01-24 00:45:36.435 26194 26194 I crash_dump32: performing dump of process 26057 (target tid = 26094)
01-24 00:45:36.543 26194 26194 E unwind  : Failed to initialize DEX file support: dlopen failed: library "libdexfile.so" not found
01-24 00:45:36.546  1238  3613 D FreecessController: com.samsung.android.game.gamehome(state: Freezeable -> Frozen, Reason: uidIdle)
01-24 00:45:36.550  1238  3644 D MotionRecognitionService: values = 50.0
01-24 00:45:36.550  1238  3644 D MotionRecognitionService: onReceive lux: 50.0  action: 
01-24 00:45:36.550  1238  3644 D MotionRecognitionService: Inject brightness form Cam 50.0
01-24 00:45:36.550  1238  3644 D MotionRecognitionService: Inject calibrated lux
01-24 00:45:36.672 26194 26194 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-24 00:45:36.672 26194 26194 F DEBUG   : Build fingerprint: 'samsung/r8qeea/r8q:13/TP1A.220624.014/G780GXXS6EWF3:user/release-keys'
01-24 00:45:36.672 26194 26194 F DEBUG   : Revision: '10'
01-24 00:45:36.672 26194 26194 F DEBUG   : ABI: 'arm'
01-24 00:45:36.672 26194 26194 F DEBUG   : Processor: '7'
01-24 00:45:36.672 26194 26194 F DEBUG   : Timestamp: 2024-01-24 00:45:36.441954977+0100
01-24 00:45:36.672 26194 26194 F DEBUG   : Process uptime: 3s
01-24 00:45:36.672 26194 26194 F DEBUG   : Cmdline: com.MKGames.FluidsSounds.wallpaper
01-24 00:45:36.673 26194 26194 F DEBUG   : pid: 26057, tid: 26094, name: UnityMain  >>> com.MKGames.FluidsSounds.wallpaper <<<
01-24 00:45:36.673 26194 26194 F DEBUG   : uid: 10334
01-24 00:45:36.673 26194 26194 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
01-24 00:45:36.673 26194 26194 F DEBUG   : Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI GetStaticMethodID called with pending exception java.lang.ExceptionInInitializerError: 
01-24 00:45:36.673 26194 26194 F DEBUG   :   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1126)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at void java.lang.Runtime.load0(java.lang.Class, java.lang.String) (Runtime.java:931)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at void java.lang.System.load(java.lang.String) (System.java:1625)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at boolean com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(com.unity3d.player.UnityPlayer) ((null):-1)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at boolean com.unity3d.player.UnityPlayer$D$a.handleMessage(android.os.Message) ((null):-1)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:226)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at void android.os.Looper.loop() (Looper.java:313)
01-24 00:45:36.673 26194 26194 F DEBUG   :   at void com.unity3d.player.UnityPlayer$D.run() ((null):-1)
01-24 00:45:36.673 26194 26194 F DEBUG   : 
01-24 00:45:36.673 26194 26194 F DEBUG   :     in call to GetStaticMethodID
01-24 00:45:36.673 26194 26194 F DEBUG   :     from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)'
01-24 00:45:36.673 26194 26194 F DEBUG   :     r0  00000000  r1  000065ee  r2  00000006  r3  e51f8048
01-24 00:45:36.673 26194 26194 F DEBUG   :     r4  e51f8058  r5  e51f8040  r6  000065c9  r7  0000016b
01-24 00:45:36.673 26194 26194 F DEBUG   :     r8  00000000  r9  ffffffff  r10 e51f8048  r11 00000058
01-24 00:45:36.673 26194 26194 F DEBUG   :     ip  000065ee  sp  e51f8028  lr  f05067db  pc  f05067ee
01-24 00:45:36.673 26194 26194 F DEBUG   : backtrace:

Sadly I'm not too deep into Live Wallpapers but the main difference is that I want to start Unity as a service (wallpaper service) instead of activity.

<service android:name=".service.LiveWallpaperPresentationService" android:enabled="true" android:label="@string/app_name" android:permission="android.permission.BIND_WALLPAPER" android:process="${applicationId}.wallpaper" android:exported="true">
      <!-- or android:exported="false" -->
      <intent-filter>
        <action android:name="android.service.wallpaper.WallpaperService" />
      </intent-filter>
      <meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper" />
    </service>

This somehow leads to a crash within the checkSession method. It would be great to have a way to disable the check when using LWP or have it surrounded by try catch so that it dosen't cause a crash. Perhaps you also have a better idea.

marvpaul commented 8 months ago

Thank you - it dosen't crash anymore with the latest alpha!!

olokobayusuf commented 8 months ago

Great 😄