加载矢量瓦片退出出现ANR

0 投票

Input dispatching timed out

ANR Input dispatching timed out (com.geov.runtimeviewer/com.geov.runtimeviewer.BMOD.PipePatrolModule.activity.PipeLinePatrolMainActivity, Waiting to send key event because the focused window has not finished processing all of the input events that were previously delivered to it. Outbound queue length: 0. Wait queue length: 1.)

com.supermap.mapping.MapControl2Native.jni_OnDestroy(Native Method)

2 com.supermap.mapping.MapControl2$3.surfaceDestroyed(MapControl2.java:348)

3 android.view.SurfaceView.updateSurface(SurfaceView.java:658)

4 android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:262)

5 android.view.View.dispatchWindowVisibilityChanged(View.java:12895)

6 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

7 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

8 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

9 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

10 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

11 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

12 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

13 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

14 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

15 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

16 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1553)

17 android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1851)

18 android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1534)

19 android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7420)

20 android.view.Choreographer$CallbackRecord.run(Choreographer.java:1100)

21 android.view.Choreographer.doCallbacks(Choreographer.java:895)

22 android.view.Choreographer.doFrame(Choreographer.java:826)

23 android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1086)

24 android.os.Handler.handleCallback(Handler.java:873)

25 android.os.Handler.dispatchMessage(Handler.java:99)

26 android.os.Looper.loop(Looper.java:201)

27 android.app.ActivityThread.main(ActivityThread.java:6861)

28 java.lang.reflect.Method.invoke(Native Method)

29 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)

30 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

6月 10 分类:  53次浏览 | 用户: 曹半斤 才疏学浅 (11 分)

2 个回答

0 投票
这个可能跟超图的sdk开发包有关,应该不是很稳定,存在漏洞。
6月 10 用户: 行者不懂 牛刀小试 (211 分)
0 投票
您好,需要您确认以下几个问题:
1.使用的iMobile for Android的版本是哪个版本
2.出现ANR的情况是偶然出现还是必现的呢
3.除了加载矢量瓦片,地图上还有其他图层吗?比如跟踪图层、动态图层
4.在onDestroy方法是否有写其他方法
6月 11 用户: 董懿鑫 登峰造极 (5,818 分)
1.supermap-imobile-10.0.1-189-android-zip-chs

2.ANR必现

3.地图就是一个图层 矢量瓦片图层

4.onDestroy中写了map.close方法。后面发现这是一个耗时操作。会等待很久才会执行完毕,但是如果不写close方法必现出现ANR,这边考虑原因是否是以下几点:

1.矢量瓦片中数据量非常之大,加载过程中切换层级,导致页面绘制变慢,这个时候突然切换页面,sufaceview的生命周期已经销毁,但是超图内部的绘制还在执行,导致出现的anr,

2.超图Map类是否有整个地图生命周期的方法,如百度地图那样的,onpause,onstart,onresume方法?去暂停绘制,控制内部
经过测试出现ANR这个情况是因为瓦片没有渲染完成就强制退出这个界面导致的,目前解决方案是可以等瓦片渲染基本完成后再进行页面跳转。对于生命周期或者渲染完成的监听事件我们会跟研发反馈,感谢提出这个问题
...