TLabAltoh / TLabWebView

Plug-in for WebView that runs in Unity and can display WebView results as Texture2D
https://tlabgames.gitbook.io/tlabwebview/
MIT License
5 stars 4 forks source link

App crashes when using cardboard vr #7

Open elblogbruno opened 1 month ago

elblogbruno commented 1 month ago

Hello, THanks for this wonderfull plugin. I have tried implementing it with cardboard vr unity plugin and it makes the app crash on start. Here is the logcat output if helps:

07-26 18:15:34.826 18422 18422 E DEBUG   : failed to readlink /proc/18231/fd/158: No such file or directory
07-26 18:15:35.610 18422 18422 F DEBUG   : Process name is com.test.webtestcardboard, not key_process
07-26 18:15:35.610 18422 18422 F DEBUG   : keyProcess: 0
07-26 18:15:35.610 18422 18422 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-26 18:15:35.610 18422 18422 F DEBUG   : Build fingerprint: 'OPPO/CPH2207EEA/OP4F0BL1:13/TP1A.220905.001/R.1680aa8-3bb39-1:user/release-keys'
07-26 18:15:35.610 18422 18422 F DEBUG   : Revision: '0'
07-26 18:15:35.610 18422 18422 F DEBUG   : ABI: 'arm64'
07-26 18:15:35.610 18422 18422 F DEBUG   : Timestamp: 2024-07-26 18:15:35.085370114+0200
07-26 18:15:35.610 18422 18422 F DEBUG   : Process uptime: 85s
07-26 18:15:35.610 18422 18422 F DEBUG   : Cmdline: com.test.webtestcardboard
07-26 18:15:35.610 18422 18422 F DEBUG   : pid: 16738, tid: 18231, name: Chrome_InProcGp  >>> com.test.webtestcardboard <<<
07-26 18:15:35.610 18422 18422 F DEBUG   : uid: 10821
07-26 18:15:35.610 18422 18422 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
07-26 18:15:35.610 18422 18422 F DEBUG   : Cause: null pointer dereference
07-26 18:15:35.610 18422 18422 F DEBUG   :     x0  0000000000000000  x1  0000000000000018  x2  ffffffffffffffc0  x3  0000006c001a1220
07-26 18:15:35.610 18422 18422 F DEBUG   :     x4  0000000000000000  x5  0000000000000004  x6  0000006c001f0008  x7  000000009a5f3912
07-26 18:15:35.610 18422 18422 F DEBUG   :     x8  0000007119cb3000  x9  0000000004cc79d8  x10 00000000ffffffff  x11 00000000000079c0
07-26 18:15:35.610 18422 18422 F DEBUG   :     x12 0000000000000001  x13 0000000000000000  x14 0000007119d89040  x15 00000000f5e2da01
07-26 18:15:35.610 18422 18422 F DEBUG   :     x16 0000007119c79058  x17 0000007227b417c0  x18 0000006f68ef6000  x19 0000006c001ef910
07-26 18:15:35.610 18422 18422 F DEBUG   :     x20 0000006c001a1220  x21 0000000000000002  x22 0000000000008b30  x23 0000006c006f4000
07-26 18:15:35.610 18422 18422 F DEBUG   :     x24 0000006c00116518  x25 0000007119ca7000  x26 0000007114de90d0  x27 0000006f6970a4d0
07-26 18:15:35.610 18422 18422 F DEBUG   :     x28 0000007114020204  x29 0000006f69709810
07-26 18:15:35.610 18422 18422 F DEBUG   :     lr  0000007116def0c8  sp  0000006f697097f0  pc  0000007116da3818  pst 0000000060001000
07-26 18:15:35.610 18422 18422 F DEBUG   : backtrace:
07-26 18:15:35.610 18422 18422 F DEBUG   :       #00 pc 0000000007f67818  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.610 18422 18422 F DEBUG   :       #01 pc 0000000007fb30c4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #02 pc 0000000007fb3020  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #03 pc 0000000007f3f394  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #04 pc 0000000007f676e4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #05 pc 0000000007f67c4c  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #06 pc 0000000007f679c0  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #07 pc 0000000007f68504  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #08 pc 0000000007f65e34  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #09 pc 0000000007f365bc  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #10 pc 0000000007f344ec  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #11 pc 0000000007f32770  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #12 pc 0000000007f119d4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #13 pc 0000000007f0ede4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #14 pc 0000000007f0e3a8  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #15 pc 0000000007f10db8  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #16 pc 0000000007f10c20  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #17 pc 0000000007d63388  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #18 pc 0000000007d62eb4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #19 pc 00000000088458b4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #20 pc 0000000008846768  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #21 pc 0000000007f27ab0  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #22 pc 0000000007f273d4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #23 pc 0000000007f28234  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #24 pc 0000000007f28124  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #25 pc 00000000084215dc  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #26 pc 0000000006166698  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #27 pc 00000000061872f4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #28 pc 0000000005feb1d0  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #29 pc 0000000005feb400  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #30 pc 0000000005fea3a0  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #31 pc 0000000005fe9784  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #32 pc 0000000005fe92d4  /data/app/~~5NbsjWAVkollEMOckFtr6g==/com.google.android.trichromelibrary_653306433-OXKrkfhDQTUdTseCRNopUQ==/base.apk!libmonochrome_64.so (BuildId: 7e846e502aba34ecd583e0155fec7eb89636f1a0)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #33 pc 00000000000e5a08  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: e9653d1f6c173c6b86b171a5be6af6eb)
07-26 18:15:35.611 18422 18422 F DEBUG   :       #34 pc 000000000007f27c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: e9653d1f6c173c6b86b171a5be6af6eb)
07-26 18:15:35.879  2381  8690 I ActivityManager: Process com.test.webtestcardboard (pid 16738) has died: prcp TOP 
07-26 18:15:35.885  2381  8690 I ActivityManager: Killing 18201:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a821i546 (adj 0): isolated not needed
07-26 18:15:36.056  2381  2576 W ActivityManager: setHasOverlayUi called on unknown pid: 16738
07-26 18:15:36.291  2381  2588 I ActivityManager: Waited long enough for: ServiceRecord{e0a806c u0 com.android.mtp/.MtpService}
07-26 18:15:41.271  2381  2589 I ActivityManager: Start proc 18478:com.test.webtestcardboard/u0a821 for next_app {com.test.webtestcardboard/com.starseed.speechtotext.MainActivity}
07-26 18:15:49.630  2381  2683 W PackageManager: Not removing package com.google.android.trichromelibrary hosting lib com.google.android.trichromelibrary version 647818633 used by [VersionedPackage[com.android.chrome/647818633]] for user 0
07-26 18:16:02.955  2381  2588 I ActivityManager: Killing 26252:com.microsoft.emmx/u0a291 (adj 920): excessive cpu 11900 during 300111 dur=1071626 limit=2
07-26 18:16:03.098  2381  4095 W ActivityManager: Exception when unbinding service com.microsoft.emmx/org.chromium.content.app.SandboxedProcessService0:0
07-26 18:16:03.098  2381  4095 W ActivityManager: android.os.DeadObjectException
07-26 18:16:03.098  2381  4095 W ActivityManager:   at android.os.BinderProxy.transactNative(Native Method)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at android.os.BinderProxy.transact(BinderProxy.java:678)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1503)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:5268)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:5850)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:13242)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3562)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3741)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerServiceExtImpl$3.run(ActivityManagerServiceExtImpl.java:2009)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-26 18:16:03.098  2381  4095 W ActivityManager:   at java.lang.Thread.run(Thread.java:1012)
07-26 18:16:03.099  2381  4095 I ActivityManager: Killing 27271:com.microsoft.emmx:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0a291i-9000 (adj 900): isolated not needed
07-26 18:16:03.103  2381  4095 W ActivityManager: Exception when unbinding service com.microsoft.emmx/org.chromium.content.app.SandboxedProcessService0:5
07-26 18:16:03.103  2381  4095 W ActivityManager: android.os.DeadObjectException
07-26 18:16:03.103  2381  4095 W ActivityManager:   at android.os.BinderProxy.transactNative(Native Method)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at android.os.BinderProxy.transact(BinderProxy.java:678)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1503)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:5268)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:5850)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:13242)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3562)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3741)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at com.android.server.am.ActivityManagerServiceExtImpl$3.run(ActivityManagerServiceExtImpl.java:2009)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
07-26 18:16:03.103  2381  4095 W ActivityManager:   at java.lang.Thread.run(Thread.java:1012)
07-26 18:16:03.103  2381  4095 I ActivityManager: Killing 4656:com.microsoft.emmx:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:5/u0a291i-8995 (adj 900): isolated not needed
07-26 18:16:03.120  2381  2576 W ActivityManager: setHasOverlayUi called on unknown pid: 26252

maybe something related to threads?

Thanks Bruno

TLabAltoh commented 1 month ago

Thanks for the report, I tested on my phone and google-vr-sdk-for-unity. Here is sample project I tested. Please try it once (I use package manager to install this webview plugin like google-vr-sdk so you need to just clone and build app).

Also, please check the behavior when hardware acceleration false. In my search, there are also possible that problem caused by GPU related error. If black screen is displayed when hardware acceleration false (app does not crash), I need to implement non-hardware acceleration use case.

https://github.com/TLabAltoh/TLabWebView/blob/master/Editor/Scripts/UnityWebViewPostprocessBuild.cs#L29

// changed = androidManifest.SetHardwareAccelerated(true) || changed;
changed = androidManifest.SetHardwareAccelerated(false) || changed;

Other. My webview plugin uses vulkan as graphics api by default. Is there a problem when using opengles?

firdiar-mita commented 1 month ago

@elblogbruno if you sending a logs, please try build the app using "Development" env for more clear logs because release build stacktrace is encrypted

elblogbruno commented 1 month ago

Thanks for the report, I tested on my phone and google-vr-sdk-for-unity. Here is sample project I tested. Please try it once (I use package manager to install this webview plugin like google-vr-sdk so you need to just clone and build app).

Also, please check the behavior when hardware acceleration false. In my search, there are also possible that problem caused by GPU related error. If black screen is displayed when hardware acceleration false (app does not crash), I need to implement non-hardware acceleration use case.

https://github.com/TLabAltoh/TLabWebView/blob/master/Editor/Scripts/UnityWebViewPostprocessBuild.cs#L29

// changed = androidManifest.SetHardwareAccelerated(true) || changed;
changed = androidManifest.SetHardwareAccelerated(false) || changed;

Other. My webview plugin uses vulkan as graphics api by default. Is there a problem when using opengles?

Wow, that was fast. Let me try!

Thanks

@elblogbruno if you sending a logs, please try build the app using "Development" env for more clear logs because release build stacktrace is encrypted

Oh sorry for that. That helps as well.

elblogbruno commented 1 month ago

Thanks for the report, I tested on my phone and google-vr-sdk-for-unity. Here is sample project I tested. Please try it once (I use package manager to install this webview plugin like google-vr-sdk so you need to just clone and build app). Also, please check the behavior when hardware acceleration false. In my search, there are also possible that problem caused by GPU related error. If black screen is displayed when hardware acceleration false (app does not crash), I need to implement non-hardware acceleration use case. https://github.com/TLabAltoh/TLabWebView/blob/master/Editor/Scripts/UnityWebViewPostprocessBuild.cs#L29

// changed = androidManifest.SetHardwareAccelerated(true) || changed;
changed = androidManifest.SetHardwareAccelerated(false) || changed;

Other. My webview plugin uses vulkan as graphics api by default. Is there a problem when using opengles?

Wow, that was fast. Let me try!

Thanks

@elblogbruno if you sending a logs, please try build the app using "Development" env for more clear logs because release build stacktrace is encrypted

Oh sorry for that. That helps as well.

Yeah I can say screen is black on my phone if I set to false.

TLabAltoh commented 1 month ago

Thanks for the info. Also if hardware buffer acceleration is true, did my sample work? Are there any problems when switching graphics API (vulkan ↔ opengles)? @elblogbruno

elblogbruno commented 1 month ago

Thanks for the info. Also if hardware ~buffer~ acceleration is true, did my sample work? Are there any problems when switching graphics API (vulkan ↔ opengles)? @elblogbruno

https://github.com/TLabAltoh/google-cardborad-webview-sample works on my phone with cardboard vr plugin, so probably the crash on my phone from my project comes from another place.

I will try switching graphics on this https://github.com/TLabAltoh/google-cardborad-webview-sample project and see how it goes.

TLabAltoh commented 1 month ago

Thanks for the info. Also if hardware ~buffer~ acceleration is true, did my sample work? Are there any problems when switching graphics API (vulkan ↔ opengles)? @elblogbruno

https://github.com/TLabAltoh/google-cardborad-webview-sample works on my phone with cardboard vr plugin, so probably the crash on my phone from my project comes from another place.

I will try switching graphics on this https://github.com/TLabAltoh/google-cardborad-webview-sample project and see how it goes.

Thanks. Anyway, it is possible that my plugin conflicts with others, I am considering adding non-hardware aceralation mode.

elblogbruno commented 1 month ago

https://github.com/TLabAltoh/google-cardborad-webview-sample project with hardware acceleration on unity 2022.3.17f1:

If I set to vulkan: image

Screenshot_2024-08-06-15-52-10-95_c56e9a8fa8f4a5a4750b12b580031c40

if I set to opengl: image Screenshot_2024-08-06-15-53-39-26_c56e9a8fa8f4a5a4750b12b580031c40

to make the project work with 2022.3.17f1 I just removed android.enableR8=MINIFY_WITH_R_EIGHT from gradleTemplate.file

TLabAltoh commented 1 month ago

I think there is also hardware buffer related problem in some devices (I received report of vulkan api problem in other issue), so I added option for hardware buffer on/off option (defualtly on). This is no graphics api dependent implementation. If you want to use this plugin with vulkan api but hardware buffer mode doesn't work, please consider setting this option off (no-hardwarebuffer mode). This implementation is not graphics api dependent, but hevy than hardware buffer mode. Please note it.

2

@elblogbruno