ANR with pie chart on a low-end Android device


#1

I am using the Android Charts library (via Xamarin) to display a variety of charts in my app. It mostly works, although even with my limited testing capabilities I was able to find a problem - an ANR (Application Not Responding) after several taps on a pie chart. The chart is in a single point selection mode, and each tap displays an AlertDialog and deselects the point. Other types of charts work without problems. The problem occurs only on a specific device ( http://www.goclever.com/uk/products,c1/tablet,c5/orion-70,a98.html ) which is definitely not a flagship one. Now I understand that it is more of a problem with the device, but is it possible that I’m missing a simple solution to the problem? I’m pasting relevant (I think) parts of /data/anr/traces.txt, I can upload the entire file if that helps.

"main" prio=5 tid=1 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x41b8e9a0 self=0x41a6e010
  | sysTid=20506 nice=0 sched=0/0 cgrp=apps handle=1074889692
  | state=S schedstat=( 0 0 0 ) utm=1588 stm=155 core=3
  #00 pc 00018104 /system/lib/libc.so (__futex_syscall3+8)
  #01 pc 0000d67c /system/lib/libc.so
  #02 pc 0000299c /system/vendor/lib/hw/gralloc.sun6i.so
  #03 pc 000044cc /system/vendor/lib/libIMGegl.so
  #04 pc 0000df4b /system/lib/libEGL.so (eglCreateSyncKHR+46)
  #05 pc 000236c9 /system/lib/libgui.so (android::SurfaceTexture::syncForReleaseLocked(void*)+24)
  #06 pc 00023b13 /system/lib/libgui.so (android::SurfaceTexture::updateTexImage(android::SurfaceTexture::BufferRejecter*, bool)+398)
  #07 pc 0005b81b /system/lib/libandroid_runtime.so
  #08 pc 0001e290 /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #09 pc 0004d411 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+396)
  #10 pc 000276a0 /system/lib/libdvm.so
  #11 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #12 pc 0005ff07 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
  #13 pc 000677e1 /system/lib/libdvm.so
  #14 pc 000276a0 /system/lib/libdvm.so
  #15 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #16 pc 0005fc31 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
  #17 pc 000499fb /system/lib/libdvm.so
  #18 pc 00046959 /system/lib/libandroid_runtime.so
  #19 pc 0004761b /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
  #20 pc 00000db7 /system/bin/app_process
  #21 pc 0001271f /system/lib/libc.so (__libc_init+38)
  #22 pc 00000ae8 /system/bin/app_process
  at android.view.GLES20Canvas.nUpdateTextureLayer(Native Method)
  at android.view.GLES20TextureLayer.update(GLES20TextureLayer.java:87)
  at android.view.TextureView.applyUpdate(TextureView.java:446)
  at android.view.TextureView.getHardwareLayer(TextureView.java:397)
  at android.view.View.getDisplayList(View.java:12619)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.View.draw(View.java:13428)
  at android.view.ViewGroup.drawChild(ViewGroup.java:2928)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
  at com.shinobicontrols.charts.x.dispatchDraw(SourceFile:100)
  at android.view.View.getDisplayList(View.java:12648)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2910)
  at android.view.View.getDisplayList(View.java:12588)
  at android.view.View.getDisplayList(View.java:12694)
  at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1205)
  at android.view.ViewRootImpl.draw(ViewRootImpl.java:2186)
  at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2058)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1867)
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1002)
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4400)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
  at android.view.Choreographer.doCallbacks(Choreographer.java:562)
  at android.view.Choreographer.doFrame(Choreographer.java:532)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
  at android.os.Handler.handleCallback(Handler.java:725)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:137)
  at android.app.ActivityThread.main(ActivityThread.java:5041)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:511)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
  at dalvik.system.NativeStart.main(Native Method) 

"GLThread 236" prio=5 tid=11 NATIVE
  | group="main" sCount=1 dsCount=0 obj=0x42497888 self=0x6aa18870
  | sysTid=23899 nice=0 sched=0/0 cgrp=apps handle=1782327624
  | state=S schedstat=( 0 0 0 ) utm=25 stm=7 core=0
  #00 pc 00018104 /system/lib/libc.so (__futex_syscall3+8)
  #01 pc 0000d5d4 /system/lib/libc.so
  #02 pc 0001ff77 /system/lib/libgui.so (android::ConsumerBase::onFrameAvailable()+18)
  #03 pc 0001e373 /system/lib/libgui.so (android::BufferQueue::ProxyConsumerListener::onFrameAvailable()+34)
  #04 pc 0001ec0b /system/lib/libgui.so (android::BufferQueue::queueBuffer(int, android::ISurfaceTexture::QueueBufferInput const&, android::ISurfaceTexture::QueueBufferOutput*)+738)
  #05 pc 00024799 /system/lib/libgui.so (android::SurfaceTextureClient::queueBuffer(ANativeWindowBuffer*, int)+320)
  #06 pc 00023cc1 /system/lib/libgui.so (android::SurfaceTextureClient::hook_queueBuffer(ANativeWindow*, ANativeWindowBuffer*, int)+10)
  #07 pc 0000162c /system/vendor/lib/libpvrANDROID_WSEGL.so
  #08 pc 00001e2c /system/vendor/lib/libpvrANDROID_WSEGL.so
  #09 pc 0000bad4 /system/vendor/lib/libIMGegl.so (IMGeglSwapBuffers+552)
  #10 pc 0000e67d /system/lib/libEGL.so (eglSwapBuffers+164)
  #11 pc 00048443 /system/lib/libandroid_runtime.so
  #12 pc 0001e290 /system/lib/libdvm.so (dvmPlatformInvoke+112)
  #13 pc 0004d411 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+396)
  #14 pc 000276a0 /system/lib/libdvm.so
  #15 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
  #16 pc 0005fc31 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
  #17 pc 0005fc5b /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
  #18 pc 000547d7 /system/lib/libdvm.so
  #19 pc 0000e3d8 /system/lib/libc.so (__thread_entry+72)
  #20 pc 0000dac4 /system/lib/libc.so (pthread_create+160)
  at com.google.android.gles_jni.EGLImpl.eglSwapBuffers(Native Method)
  at com.shinobicontrols.charts.GLTextureView$e.d(SourceFile:1167)
  at com.shinobicontrols.charts.GLTextureView$f.l(SourceFile:1553)
  at com.shinobicontrols.charts.GLTextureView$f.run(SourceFile:1267)

#2

Hi cynic,

Thank you very much for including the traces.txt information and I’m sorry to hear you’re experiencing this problem.

We’ve never had anything like this reported for this device before but from the traces.txt file it looks like a similar crash that is sometimes found in the older Samsung Galaxy Tab devices (P7510 and P7500R). That, however, seems to be the result of a Samsung driver bug so it may well not be connected. It certainly doesn’t look like you’re missing some simple solution.

We’ll have to look into this further and see if we can recreate the issue our side on any of our test devices (I’m particularly interested in trying it on our Galaxy Tab). Is it possible for you to send the project (including source) as a zip to info@shinobicontrols.com? If not, just a cut down sample that exhibits the same problem would be great?

Finally, it says on the spec sheet for the Orion device that it’s running Android 4.2. Is this the case with your device, or has it been updated and if so to what Android version?

Kind regards,

Patrick


#3

I’ve sent you the e-mail. The device is using the latest firmware but it is still 4.2.