I have an app (java) which is running on an Android 9 Device (X96 Max). The app has one webview which stays 24/7. Sometimes the app crashes because the chromium webview has an uncaught exception.
Are there other solutions for this problem? how can I identify what cause the problem?
My AndroidManifest properties:
android:hardwareAccelerated="false"
android:largeHeap="true"
android:usesCleartextTraffic="true"
I tried also use this methods every 1 min:
freeMemory();
System.gc();
Cache is disabled:
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
nothing help me. app still crashing.
Added Crash report:
02-06 06:44:32.782 F/chromium( 4950): [FATAL:memory_linux.cc(42)] Out of memory.
--------- beginning of crash
02-06 06:44:32.804 F/libc ( 4950): Fatal signal 7 (SIGBUS), code 0 (SI_USER) in tid 5099 (RenderThread), pid 4950 (com.view.nuvola)
02-06 06:44:33.169 I/crash_dump32(17752): obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-06 06:44:33.186 I/crash_dump32(17752): performing dump of process 4950 (target tid = 5099)
02-06 06:44:33.252 F/DEBUG (17752): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-06 06:44:33.252 F/DEBUG (17752): Build fingerprint: 'Amlogic/franklin/franklin:9/PPR1.180610.011/20200620:userdebug/test-keys'
02-06 06:44:33.252 F/DEBUG (17752): Revision: '0'
02-06 06:44:33.253 F/DEBUG (17752): ABI: 'arm'
02-06 06:44:33.253 F/DEBUG (17752): pid: 4950, tid: 5099, name: RenderThread >>> com.view.nuvola <<<
02-06 06:44:33.253 F/DEBUG (17752): signal 7 (SIGBUS), code 0 (SI_USER), fault addr --------
02-06 06:44:33.253 F/DEBUG (17752): Abort message: '[FATAL:memory_linux.cc(42)] Out of memory.
02-06 06:44:33.253 F/DEBUG (17752): '
02-06 06:44:33.253 F/DEBUG (17752): r0 00000000 r1 815da660 r2 00000400 r3 00000000
02-06 06:44:33.253 F/DEBUG (17752): r4 861ff340 r5 910d6ec4 r6 a416b3c4 r7 861ff324
02-06 06:44:33.253 F/DEBUG (17752): r8 a4170d8c r9 861ff77c r10 861ff778 r11 861ff774
02-06 06:44:33.253 F/DEBUG (17752): ip 861ff344 sp 861ff310 lr 8fcae151 pc 8fcae23a
02-06 06:44:33.256 F/DEBUG (17752):
02-06 06:44:33.256 F/DEBUG (17752): backtrace:
02-06 06:44:33.256 F/DEBUG (17752): #00 pc 0146e23a /system/app/webview/webview.apk (offset 0x780000)
02-06 06:44:33.328 I/crash_dump32(17752): type=1400 audit(0.0:687): avc: denied { read } for name="QuotaManager" dev="mmcblk0p20" ino=393176 scontext=u:r:crash_dump:s0:c56,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c56,c256,c512,c768 tclass=file permissive=1
02-06 06:44:33.480 I/crash_dump32(17752): type=1400 audit(0.0:690): avc: denied { read } for name="libwebviewchromium32.relro" dev="mmcblk0p20" ino=392731 scontext=u:r:crash_dump:s0:c56,c256,c512,c768 tcontext=u:object_r:shared_relro_file:s0 tclass=file permissive=1
02-06 06:44:33.480 I/crash_dump32(17752): type=1400 audit(0.0:691): avc: denied { open } for path="/data/misc/shared_relro/libwebviewchromium32.relro" dev="mmcblk0p20" ino=392731 scontext=u:r:crash_dump:s0:c56,c256,c512,c768 tcontext=u:object_r:shared_relro_file:s0 tclass=file permissive=1