App crashes on using wakelock
Hi,
I have a mobile app that uses webview for a particular page. In addition, I need this web view page to remain awake when a user is accessing it.
I have enabled wake lock on initialising the page and on the back button I have setup the mechanism to disable it. The problem is that when a user opens the page, then returns back to the home page and then clicks on the button to go the web view page again the app crashes. [This never happens in debug mode but when I create an apk and install it in a mobile app this crash happens]
Build fingerprint: 'xiaomi/ginkgo/ginkgo:9/PKQ1.190616.001/V11.0.6.0.PCOINXM:user/release-keys' Revision: '0' ABI: 'arm' pid: 12136, tid: 12136, name: com.org.g_shala >>> com.org.g_shala <<< signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1469)] Check failed: fml::jni::CheckException(env). ' r0 00000000 r1 00002f68 r2 00000006 r3 00000008 r4 00002f68 r5 00002f68 r6 ffa775e4 r7 0000010c r8 ffa77778 r9 bcc6647c r10 ffa77658 r11 bcbcd680 ip ebfc63bc sp ffa775d0 lr ebf307f9 pc ebf2801e
backtrace: #00 pc 0001d01e /system/lib/libc.so (abort+58) #01 pc 0015ae43 /data/app/com.org.g_shala-ncDru0Ovgiq_fagwEMomeQ==/lib/arm/libflutter.so (offset 0x149000)
No crash is encountered when wakelock is not setup. Can you please advise me on this issue ?
Regards, Ameya