Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unity3d和可能的NGUI导致nexus 6(5.1)崩溃_Unity3d_Ngui - Fatal编程技术网

Unity3d和可能的NGUI导致nexus 6(5.1)崩溃

Unity3d和可能的NGUI导致nexus 6(5.1)崩溃,unity3d,ngui,Unity3d,Ngui,我在Nexus6(5.1操作系统)设备上遇到以下崩溃。我不知道是什么导致了这种撞车,以及如何处理。谢谢你的帮助 Unity3d版本:4.6.5f1 NGUI版本:2.6.4 来自设备的崩溃日志: 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 cras

我在Nexus6(5.1操作系统)设备上遇到以下崩溃。我不知道是什么导致了这种撞车,以及如何处理。谢谢你的帮助

Unity3d版本:4.6.5f1 NGUI版本:2.6.4

来自设备的崩溃日志:

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) from active list on thread 0xb59c4000
05-12 11:22:02.401:E/chromium(7468):####网络视图版本42.0.2311.138(代码2311138)
05-12 11:22:02.401:E/铬(7468):------开始碰撞
05-12 11:22:02.401:A/libc(7468):tid 7489(主)中的致命信号11(SIGSEGV),代码-6,故障地址0x1d2c
05-12 11:22:02.474:I/DEBUG(353):************************************************************************
05-12 11:22:02.474:I/DEBUG(353):构建指纹:“google/shamu/shamu:5.1/LMY47I/1767468:用户/释放密钥”
05-12 11:22:02.474:I/DEBUG(353):修订版:“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,名称:main>>>com.xxx.xxxx您得到的错误地址0xc,r3 00000000,与我的情况不完全相同

在我的例子中,如果摄影机上没有渲染对象,并且camera.targetTexture已设置为aRenderTexture,则销毁(aRenderTexture)将崩溃

修复代码1(不推荐,但有效):

Destroy(aRenderTexture,1.0f)
修复代码2(可能是更好的方法,在崩溃的相机上附加以下脚本):

使用UnityEngine;
[所需组件(摄像机类型))]
公共类CrashFix:单行为{
无效唤醒(){
摄像头_cam=gameObject.GetComponent();
GameObject _invisibleObj=GameObject.CreatePrimitive(PrimitiveType.Quad);
_invisibleObj.name=“CrashFix”;
_invisibleObj.layer=GetFirstLayerNumber fromMask(_cam.cullingMask);
_invisibleObj.transform.parent=gameObject.transform;
_invisibleObj.transform.localScale=新矢量3(0.001f、0.001f、0.001f);
_不可见bj.transform.position=
_cam.transform.position+_cam.transform.forward*(_cam.nearClipPlane+_cam.farClipPlane)/2f;
Material _mat=新材质(Shader.Find(“UI/Default”);
_材料颜色=新颜色32(0,0,0,0);
var mr=_invisibleObj.GetComponent();
mr.sharedMaterial=\u mat;
销毁(_invisibleObj.GetComponent());
}
私有int GetFirstLayerNumberFromMask(int掩码)
{
如果(掩码==0)返回0;
int结果=0;
while(true){
if((掩码&1)==1)返回结果;
掩码>>=1;
++结果;
}
}
}

自上次稳定提交以来,您对代码做了哪些更改?什么都没有,我恢复到稳定提交,但仍在进行。正如我提到的,这种情况只发生在更新了5.1的Nexus 6设备上,即使在5.0.1上,Nexus 6也可以正常工作。你最近有没有升级到新的Unity版本?每次崩溃都会重现吗?您以前在这个设备上测试过以前的提交吗?我在Unity版本4.6.4f和4.6.5f上测试过,结果是一样的。是的,崩溃每次都可以重现。是的,我尝试了所有不同的提交,结果都是一样的。从那时起,坠机事件就发生在SwapBuffer call的某个地方。我无法过滤出到底是什么导致了它。所以,崩溃不是刚刚开始发生的-你只是没有在这个特定的设备上测试,对吗?