如题,我试图加载一个远程的zip文件,导致原生崩溃
assetManager.downloader.downloadFile(“http://192.168.0.110/hotupdate/main_1_0_2.zip”, {}, (cur: number, total: number) => {
console.log("压缩包下载进度", cur, total);
}, (err, data) => {
if (err) {
console.log("压缩包下载失败", err.toString());
}
})
这段代码会导致Android原生发生崩溃,崩溃错误为:
--------- beginning of crash
2022-10-24 11:03:46.946 7007-7177/com.zbh.game.djmj A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 7177 (Thread-18)
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: Build fingerprint: ‘samsung/dream2qltezh/dream2qltechn:7.1/N2G48H/G9550ZHU1AQEE:user/release-keys’
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: Revision: ‘12’
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: ABI: ‘x86’
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: pid: 7007, tid: 7177, name: Thread-18 >>> com.zbh.game.djmj <<<
2022-10-24 11:03:47.003 7185-7185/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2022-10-24 11:03:47.004 7185-7185/? A/DEBUG: Abort message: ‘art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: JNI NewStringUTF called with pending exception java.lang.OutOfMemoryError: Failed to allocate a 134217740 byte allocation with 16765216 free bytes and 59MB until OOM’
2022-10-24 11:03:47.004 7185-7185/? A/DEBUG: eax 00000000 ebx 00001b5f ecx 00001c09 edx 00000006
2022-10-24 11:03:47.004 7185-7185/? A/DEBUG: esi a47ff978 edi a47ff920
2022-10-24 11:03:47.004 7185-7185/? A/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 0000003b xss 0000007b
2022-10-24 11:03:47.004 7185-7185/? A/DEBUG: eip d769bcc0 ebp a47ff028 esp a47fefcc flags 00000292
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: backtrace:
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #00 pc 00000cc0 [vdso:d769b000] (__kernel_vsyscall+16)
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #01 pc 0007c07c /system/lib/libc.so (tgkill+28)
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #02 pc 00077855 /system/lib/libc.so (pthread_kill+85)
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #03 pc 0002821a /system/lib/libc.so (raise+42)
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #04 pc 0001eed6 /system/lib/libc.so (abort+86)
2022-10-24 11:03:47.005 7185-7185/? A/DEBUG: #05 pc 0052bee5 /system/lib/libart.so (_ZN3art7Runtime5AbortEPKc+565)