3

Has anyone had an issue where their Android app has gone ANR when being resumed from background with the main thread getting stuck at:

  at android.view.GLES20Canvas.nFinish(Native Method)

It seems to happen to me after sending the app to the background multiple times, after drilling down between 3 to 4 activities on the stack then going back up to the root activity multiple times.

Here is a complete stack on main thread before ANR:

  at android.view.GLES20Canvas.nFinish(Native Method)   
  at android.view.GLES20Canvas.onPostDraw(GLES20Canvas.java:257)    
  at android.view.HardwareRenderer$Gl20Renderer.onPostDraw(HardwareRenderer.java:1806)  
  at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1389)  
  at android.view.ViewRootImpl.draw(ViewRootImpl.java:2367) 
  at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2239)  
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1872)    
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)  
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5481)    
  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:730)    
  at android.os.Handler.dispatchMessage(Handler.java:92)    
  at android.os.Looper.loop(Looper.java:137)    
  at android.app.ActivityThread.main(ActivityThread.java:5103)  
  at java.lang.reflect.Method.invokeNative(Native Method)   
  at java.lang.reflect.Method.invoke(Method.java:525)   
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)    
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)   
  at dalvik.system.NativeStart.main(Native Method)

I have just confirmed that I can not recreate this bug on a device Acer 100 7" Tablet running android 4.0.3

My other test device Nexus 4 running android 4.3 recreates this bug with certainty on around the third time resuming the app after opening 3 or more activities on the activity stack with in application.

Weirdness. Also seeing it on an HTC running 4.4

Eran
  • 387,369
  • 54
  • 702
  • 768
Dave Thomas
  • 3,667
  • 2
  • 33
  • 41
  • Possibly related SO question: http://stackoverflow.com/questions/2112768/prevent-onpause-from-trashing-opengl-context – Morrison Chang Jan 07 '14 at 20:54
  • @Morrison - I am not using any GLSurfaceViews but I do have a google map view, which I believe is a surface view. Could this be the view that is causing the redrawing issue? – Dave Thomas Jan 07 '14 at 21:27
  • Given that Google Maps Android v2 requires OpenGL ES 2.0 - perhaps. If you can duplicate the issue you might want to create a bug report. – Morrison Chang Jan 07 '14 at 21:42
  • Wasn't the map. The map's view root view was NoSaveStateFrameLayout. Using support library map fragment too by the way. – Dave Thomas Jan 07 '14 at 21:46
  • I was using PinnedHeaderListView in my project, (and before that another project based on it, PinnedHeaderExpListView). After removing those libraries and using my own implementation for pinned headers I am no longer getting ANRs. I noticed I was only getting ANRs when I went to the activity that had the listview that used the library in it. – Dave Thomas Jan 10 '14 at 01:22

0 Answers0