Unity Android信号11(SIGSEGV),代码1(SEGV_MAPERR),故障地址0x0

时间:2018-05-16 19:53:16

标签: android unity3d sigsegv

我正在使用Unity 2018.1.0f2构建Android应用程序,并在运行时遇到某种分段错误。确切的错误如下:

05-16 20:54:11.834: E/SamsungIME(9413): <AbstractKeyboardView> - onDraw() called
05-16 20:54:12.142: E/ViewRootImpl(17850): sendUserActionEvent() mView == null
05-16 20:54:12.146: E/SKBD KeyboardInfoUtils(9413): getInstance start
05-16 20:54:12.146: E/SKBD KeyboardInfoUtils(9413): sendSIPInformation state:6  isAbstractKeyboardView : true
05-16 20:54:12.151: E/SKBD KeyboardInfoUtils(9413): sending null keyboardInfo as SIP is closed
05-16 20:54:15.401: A/libc(17850): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17865 (UnityMain)
05-16 20:54:15.401: A/libc(17850): [ 05-16 20:54:15.407  3096: 3096 W/         ]
05-16 20:54:15.401: A/libc(17850): debuggerd: handling request: pid=17850 uid=10350 gid=10350 tid=17865
05-16 20:54:15.633: A/DEBUG(17987): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-16 20:54:15.634: A/DEBUG(17987): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS2DRDI:user/release-keys'
05-16 20:54:15.635: A/DEBUG(17987): Revision: '8'
05-16 20:54:15.635: A/DEBUG(17987): ABI: 'arm'
05-16 20:54:15.635: A/DEBUG(17987): pid: 17850, tid: 17865, name: UnityMain  >>> de.zoomapp.zoom <<<
05-16 20:54:15.635: A/DEBUG(17987): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-16 20:54:15.636: A/DEBUG(17987):     r0 00000000  r1 c7ad20b0  r2 cf9ffc24  r3 efc62308
05-16 20:54:15.637: A/DEBUG(17987):     r4 c7ad20b0  r5 c7ad20cc  r6 ffffffff  r7 00000000
05-16 20:54:15.637: A/DEBUG(17987):     r8 00000000  r9 ee67ecb4  sl ee67ebc8  fp ee67e5e8
05-16 20:54:15.637: A/DEBUG(17987):     ip c7ad20b0  sp ee67e5c8  lr cf9ffc3c  pc f2386338  cpsr a00e0030
05-16 20:54:15.651: A/DEBUG(17987): backtrace:
05-16 20:54:15.652: A/DEBUG(17987):     #00 pc 00018338  /system/lib/libc.so (strcmp+47)
05-16 20:54:15.652: A/DEBUG(17987):     #01 pc 0014bc38  /data/app/de.zoomapp.zoom-1/lib/arm/libunity.so
05-16 20:54:15.652: A/DEBUG(17987):     #02 pc 00008484  <anonymous:c7275000>
05-16 20:54:17.518: E/audit(4645): type=1701 audit(1526496857.505:4791): auid=4294967295 uid=10350 gid=10350 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=17865 comm="UnityMain" exe="/system/bin/app_process32" sig=11
05-16 20:54:17.562: E/lowmemorykiller(3180): Error writing /proc/17850/oom_score_adj; errno=22

我尝试以横向和纵向模式提供每个屏幕。当用户在登录屏幕中并单击登录按钮时,会将UnityWebRequest发送到服务器。如果服务器以肯定结果响应,则UI转换将打开加载屏幕,在后台发送多个UnityWebRequests以检索有关要显示的图标和图像的更多信息。加载完成后,将显示主菜单,并且在后台游戏已加载,但已暂停。这个游戏只包含一堆图像并且非常静态,这就是为什么我不在这里详细描述它。 如果用户在点击登录后并且在加载屏幕显示时将他的电话从纵向旋转到横向,则发生所述崩溃。我可以在我的三星Galaxy S7上一直重现这个错误,但是在一个干净的项目中无法做出最小的例子。 这可能是一个问题,可能会产生网络请求?我把日志消息放在我的代码上,在崩溃之前我经常看到一些web请求的yield语句。我有更多的协同程序在异步中加载一些图像。如果我注释掉所有协同程序它运行良好,但我不知道这是否是由于加载运行速度非常快或协同程序导致问题。 然后我在互联网上搜索并发现使用addr2line工具。它为地址0014bc38生成:

operator delete[](void*, std::nothrow_t const&)

我无法找到确切的问题。我希望也许某人有一个提示我如何搜索这个。 谢谢你们。

此致 迈克尔

1 个答案:

答案 0 :(得分:1)

地址为0x0的SEG_MAPERR为null pointer dereference

删除空指针是有效的(并且应该用于delete []运算符)。我怀疑你有某种竞争条件。删除或释放任何内容时放入一些日志(尽管一切都是GC ......)

另外,如果找不到相似的内容,请检查official bug trackersubmit a new bug。我怀疑它是在尝试将新窗口参数发送到应用程序时访问空指针。