Unity3d and probably NGUI causing crash on nexus 6 (5.1) -
i getting following crash on nexus 6(5.1 os) device. unable make out causing kind of crash , how approach it. appreciate help.
unity3d version : 4.6.5f1 ngui version: 2.6.4
crashlog device:
05-12 11:22:02.401: e/chromium(7468): ### webview version 42.0.2311.138 (code 2311138) 05-12 11:22:02.401: e/chromium(7468): --------- beginning of crash 05-12 11:22:02.401: a/libc(7468): fatal signal 11 (sigsegv), code -6, fault addr 0x1d2c in tid 7489 (main) 05-12 11:22:02.474: i/debug(353): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 05-12 11:22:02.474: i/debug(353): build fingerprint: 'google/shamu/shamu:5.1/lmy47i/1767468:user/release-keys' 05-12 11:22:02.474: i/debug(353): revision: '33696' 05-12 11:22:02.474: i/debug(353): abi: 'arm' 05-12 11:22:02.474: i/debug(353): pid: 7468, tid: 7489, name: main >>> com.xxx.xxxx <<< 05-12 11:22:02.474: i/debug(353): signal 11 (sigsegv), code -6 (si_tkill), fault addr 0xc 05-12 11:22:02.506: i/debug(353): r0 858fe2b0 r1 00000052 r2 00000052 r3 00000000 05-12 11:22:02.506: i/debug(353): r4 858fe2b0 r5 00000052 r6 00000052 r7 aad91da0 05-12 11:22:02.506: i/debug(353): r8 af3e9150 r9 af3e9138 sl 00000003 fp aefb5a00 05-12 11:22:02.506: i/debug(353): ip 00000000 sp af3e90c0 lr aac2a577 pc aacbe97c cpsr 200b0030 05-12 11:22:02.507: i/debug(353): backtrace: 05-12 11:22:02.507: i/debug(353): #00 pc 0017797c /system/vendor/lib/egl/libglesv2_adreno.so (esxcmdbuf::getspace(unsigned int)+15) 05-12 11:22:02.507: i/debug(353): #01 pc 000e3573 /system/vendor/lib/egl/libglesv2_adreno.so (esxframebufferobject::loadstorecmdbufgetspace(esxcmdbuftype, unsigned int)+42) 05-12 11:22:02.507: i/debug(353): #02 pc 00174ba5 /system/vendor/lib/egl/libglesv2_adreno.so (esxbltlib::storebin(esxframebufferobject*, esxrenderinglayout const*, unsigned int)+108) 05-12 11:22:02.507: i/debug(353): #03 pc 00116881 /system/vendor/lib/egl/libglesv2_adreno.so (esxcontext::processandsubmitrendering(esxflushreason)+3936) 05-12 11:22:02.507: i/debug(353): #04 pc 00177435 /system/vendor/lib/egl/libglesv2_adreno.so (esxcmdmgr::flush(esxflushreason)+412) 05-12 11:22:02.508: i/debug(353): #05 pc 0011693d /system/vendor/lib/egl/libglesv2_adreno.so (esxcontext::swapbuffers(esxrect const*, unsigned int, eglresourceaccessinfo*)+140) 05-12 11:22:02.508: i/debug(353): #06 pc 0011dd43 /system/vendor/lib/egl/libglesv2_adreno.so (eglcontext::swapbuffers(esxrect const*, unsigned int, eglresourceaccessinfo*)+54) 05-12 11:22:02.508: i/debug(353): #07 pc 0011ae89 /system/vendor/lib/egl/libglesv2_adreno.so (eglapi::swapbuffers(void*, void*)+140) 05-12 11:22:02.508: i/debug(353): #08 pc 00005dc5 /system/vendor/lib/egl/libegl_adreno.so (eglswapbuffers+28) 05-12 11:22:02.508: i/debug(353): #09 pc 0001237f /system/lib/libegl.so (eglswapbuffers+290) 05-12 11:22:02.508: i/debug(353): #10 pc 003cee58 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #11 pc 003d4374 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #12 pc 0039ef74 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #13 pc 001fc76c /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #14 pc 002a0124 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #15 pc 003d24e4 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #16 pc 003de1b0 /data/app/com.xxx.xxxx-1/lib/arm/libunity.so 05-12 11:22:02.509: i/debug(353): #17 pc 0067a5af /data/dalvik-cache/arm/data@app@com.xxx.xxxx-1@base.apk@classes.dex 05-12 11:22:03.064: i/audioflinger(356): buffer timeout: remove(4097) active list on thread 0xb59c4000
you got fault addr 0xc, r3 00000000, not same case.
in case, happens when there no objects rendered on camera, , camera.targettexture has been set arendertexture, destroy(arendertexture) crash.
fix code 1 (not recommend works):
destroy(arendertexture, 1.0f)
fix code 2 (maybe better way, attach follow script on crashed camera):
using unityengine; [requirecomponent (typeof (camera))] public class crashfix : monobehaviour { void awake () { camera _cam = gameobject.getcomponent<camera>(); gameobject _invisibleobj = gameobject.createprimitive(primitivetype.quad); _invisibleobj.name = "crashfix"; _invisibleobj.layer = getfirstlayernumberfrommask(_cam.cullingmask); _invisibleobj.transform.parent = gameobject.transform; _invisibleobj.transform.localscale = new vector3(0.001f, 0.001f, 0.001f); _invisibleobj.transform.position = _cam.transform.position + _cam.transform.forward * (_cam.nearclipplane+_cam.farclipplane)/2f; material _mat = new material(shader.find("ui/default")); _mat.color = new color32(0,0,0,0); var mr = _invisibleobj.getcomponent<meshrenderer>(); mr.sharedmaterial = _mat; destroy(_invisibleobj.getcomponent<collider>()); } private int getfirstlayernumberfrommask(int mask) { if (mask == 0) return 0; int result = 0; while(true){ if ((mask & 1) == 1) return result; mask >>= 1; ++result; } } }
Comments
Post a Comment