Frequent Android Crashes

Btw, just to be sure what this backtraces all mean:

it gives line on which code crashed after optimizations

lib lua.so - means somewhere along Lua function was called

lib openal.so - audio subsystem wrapper we’re using

lib corona.so - something in Corona core code. This is most useful tracebacks, really.

Often compile optimizations would mix stuff up together making it really hard to decode tracebacks.

P.S. Thank you all for the tracebacks.

@SGS, please, provide build number.

@vlad it was either 3144 or 3145 - I think 3145

If you have APK, you can run it, and it would print you corona build to console on start.

Don’t have APK but it was definitely 3145 as that is in my downloads folder and 3144 isn’t

For example: this one is crashing when trying to destroy connection between Java and Native side when application exiting. (why would google care about app crashing on exit? It exits anyway ffs, but it’s not the point) Probably caused by referring variable which was already freed. It is rather hard to say why it is sometimes already freed but isn’t so every time. We’ll look into it.

Also, than you everyone for tracebacks. I created tickets and will take a look at them in nearest future (aka Monday). I can not guarantee that anything would be done, but we’ll try fixing them.

@vlad, if it is on app exit shouldn’t errors be silently handled?

I’ll give you a few more Corona related ones (if it helps harden the SDK)…

java.lang.IllegalStateException: at android.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1438) at android.app.FragmentManagerImpl.popBackStackImmediate (FragmentManager.java:577) at android.app.Activity.onBackPressed (Activity.java:2895) at android.app.Activity.onKeyUp (Activity.java:2869) at com.ansca.corona.CoronaActivity.onKeyUp (CoronaActivity.java:3482) at android.view.KeyEvent.dispatch (KeyEvent.java:3361) at android.app.Activity.dispatchKeyEvent (Activity.java:3170) at com.ansca.corona.input.RaiseKeyEventTask$1.run (RaiseKeyEventTask.java:90) at android.os.Handler.handleCallback (Handler.java:751) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6776) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1518) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)

 native: pc 00000000000a2f94 /data/app/com.spheregamestudios.designercity-1/lib/arm/libopenal.so native: pc 0000000000016874 /data/app/com.spheregamestudios.designercity-1/lib/arm/libopenal.so (alcCreateContext+436) native: pc 0000000000005ff7 /data/app/com.spheregamestudios.designercity-1/lib/arm/libalmixer.so (ALmixer\_Init+214) native: pc 000000000011f6d4 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 00000000000fdf84 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 000000000000cc04 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000001ce18 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000d050 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000c35c /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000d1c8 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 00000000000055a0 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so (lua\_pcall+88) native: pc 0000000000006ff8 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000cc04 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000001ce18 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000d050 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000c35c /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 000000000000d1c8 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so native: pc 00000000000055a0 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so (lua\_pcall+88) native: pc 00000000000f58c0 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 00000000000d7a58 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 000000000012f418 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 00000000001313c8 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 000000000012f8d0 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 000000000013062c /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 000000000002b530 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so native: pc 0000000000fd1a35 /data/app/com.spheregamestudios.designercity-1/oat/arm/base.odex

java.lang.IllegalArgumentException: at com.google.android.gles\_jni.EGLImpl.eglGetConfigAttrib (Native Method) at com.ansca.corona.graphics.opengl.GLSurfaceView$ComponentSizeChooser.findConfigAttrib (GLSurfaceView.java:996) at com.ansca.corona.graphics.opengl.GLSurfaceView$ComponentSizeChooser.chooseConfig (GLSurfaceView.java:957) at com.ansca.corona.graphics.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig (GLSurfaceView.java:887) at com.ansca.corona.graphics.opengl.GLSurfaceView$EglHelper.start (GLSurfaceView.java:1070) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1508) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1378)

java.lang.UnsatisfiedLinkError: at java.lang.Runtime.loadLibrary (Runtime.java:367) at java.lang.System.loadLibrary (System.java:1076) at com.ansca.corona.JavaToNativeShim.\<clinit\> (JavaToNativeShim.java:115) at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler (CoronaEnvironment.java:391) at com.ansca.corona.CoronaEnvironment.\<clinit\> (CoronaEnvironment.java:50) at com.ansca.corona.CoronaActivity.onCreate (CoronaActivity.java:228)

Built with 2017.3159
 

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

_ZNK14A4xWorkarounds27Errata51SetVpClipCodeIgnoreE11EsxPrimType13EsxCmdBufTypeiP17GRAS_CL_CLIP_CNTL

native: pc 0000000000170d84 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZNK14A4xWorkarounds27Errata51SetVpClipCodeIgnoreE11EsxPrimType13EsxCmdBufTypeiP17GRAS\_CL\_CLIP\_CNTL+3) native: pc 0000000000172705 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10A4xContext9HwPreDrawEPK17EsxDrawDescriptor+36) native: pc 00000000000e42dd /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10EsxContext19DrawArraysInstancedE11EsxPrimTypeijj+188) native: pc 00000000000ce93f /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10EsxContext12GlDrawArraysEjii+62) native: pc 0000000000135050 /data/app/net.facv.playwater-1/lib/arm/libcorona.so native: pc 000000000013c6f8 /data/app/net.facv.playwater-1/lib/arm/libcorona.so native: pc 00000000000a33e4 /data/app/net.facv.playwater-1/lib/arm/libcorona.so native: pc 000000000012f904 /data/app/net.facv.playwater-1/lib/arm/libcorona.so native: pc 000000000007ba60 /data/app/net.facv.playwater-1/lib/arm/libcorona.so native: pc 000000000080b0a5 /data/app/net.facv.playwater-1/oat/arm/base.odex

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)

_ZN10A4xContext17WriteVfdStateRegsEPjP10A4xVfdRegsjj

 native: pc 000000000017c882 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10A4xContext17WriteVfdStateRegsEPjP10A4xVfdRegsjj+33) native: pc 000000000017c9c7 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10A4xContext18WriteVfdStateGroupE13EsxCmdBufType+70) native: pc 000000000017ff5b /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10A4xContext13ValidateStateEPK17EsxDrawDescriptor+2170) native: pc 00000000001800e5 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10A4xContext18HwValidateGfxStateEPK17EsxDrawDescriptor+4) native: pc 00000000000ef2cd /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10EsxContext16ValidateGfxStateEPK17EsxDrawDescriptor+460) native: pc 00000000000e4289 /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10EsxContext19DrawArraysInstancedE11EsxPrimTypeijj+104) native: pc 00000000000ce93f /system/vendor/lib/egl/libGLESv2\_adreno.so (\_ZN10EsxContext12GlDrawArraysEjii+62) native: pc 0000000000135050 /data/app/net.facv.playwater-2/lib/arm/libcorona.so native: pc 000000000013c6f8 /data/app/net.facv.playwater-2/lib/arm/libcorona.so native: pc 00000000000a33e4 /data/app/net.facv.playwater-2/lib/arm/libcorona.so native: pc 000000000012f904 /data/app/net.facv.playwater-2/lib/arm/libcorona.so native: pc 000000000007ba60 /data/app/net.facv.playwater-2/lib/arm/libcorona.so native: pc 000000000080b0a5 /data/app/net.facv.playwater-2/oat/arm/base.odex

Both crashes occured on Android 6.0

I seen this one below on several types of devices, but have never seen it in testing.  I’m rather new to app publishing with no idea what to expect from a Corona built app.  Google’s play console lists my apps as 99.4% of daily session being crash free.  Any thoughts on this number?   I currently have no plugins and cannot imagine how such a crash is occurring.  Corona itself likely has some bugs.  Is there a list somewhere to compare these tracebacks against?  What crash rate will google likely see as being problematic?

ZTE Majesty Pro LTE (stark), 1024MB RAM, Android 6.0  (occurs with a variety of devices/android versions)

java.lang.IllegalStateException :

at android.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1411)

at android.app.FragmentManagerImpl.popBackStackImmediate (FragmentManager.java:576)

at android.app.Activity.onBackPressed (Activity.java:2514)

at android.app.Activity.onKeyUp (Activity.java:2488)

at com.ansca.corona.CoronaActivity.onKeyUp (CoronaActivity.java:3516)

at android.view.KeyEvent.dispatch (KeyEvent.java:2665)

at android.app.Activity.dispatchKeyEvent (Activity.java:2741)

at com.ansca.corona.input.RaiseKeyEventTask$1.run (RaiseKeyEventTask.java:90)

at android.os.Handler.handleCallback (Handler.java:743)

at android.os.Handler.dispatchMessage (Handler.java:95)

at android.os.Looper.loop (Looper.java:171)

at android.app.ActivityThread.main (ActivityThread.java:5417)

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

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)

I’m getting the following google play report messages:
 

Samsung Galaxy A5(2017) (a5y17lte), 3072MB RAM, Android 7.0

Relatório 1

android.app.RemoteServiceException :

at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1813)

at android.os.Handler.dispatchMessage (Handler.java:102)

at android.os.Looper.loop (Looper.java:154)

at android.app.ActivityThread.main (ActivityThread.java:6776)

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

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1518)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)

Samsung Galaxy Grand Prime (fortunave3g), 1024MB RAM, Android 4.4

Relatório 1 de 1

android.app.RemoteServiceException :

at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1410)

at android.os.Handler.dispatchMessage (Handler.java:102)

at android.os.Looper.loop (Looper.java:136)

at android.app.ActivityThread.main (ActivityThread.java:5426)

at java.lang.reflect.Method.invokeNative (Native Method)

at java.lang.reflect.Method.invoke (Method.java:515)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1268)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1084)

at dalvik.system.NativeStart.main (Native Method)

Can anyone tell me what it’s all about?

 

Note to everyone: You can download old APKs from the releases page on Google Dev Console, run on device and view output with adb logcat

@vlads, will you keep us up to date with any findings you make or not make? 

Of course. But so far it was rather frustrating (exploring crash tracebacks ofter is).

But, here’s some good news: next daily build would contain some experimental fixes for bitmap related crashes. I would appreciate if someone to test those fixes. Build number should be 3169.

Much appreciated @vlads

Hey, [member=‘Fungrip’] and [member=‘Davebollinger’]!

You both posted tracebacks with bitmap stuff in them. I introduced some experimental changes (nothing dangerous) in 2017.3169 which may fix them. Is there a chance you could try them? I still could not reproduce any of the issues.

It may take a couple days, but yes I’ll test it, rebuild/update with 3169 (or whatever latest on that day).  But even then, it may take a while to get enough data to show anything (given that the TOTAL for all crashes is only ~1.5% and I’m in the same boat as you as far as not knowing what specifically would reproduce them)

@vlads will do, and we are in the same boat as you and dave in that we are unable to reproduce it so far.

not to muddy the waters, but with regard to ANR’s not crashes, the following one is my  prime  offender (having 181 reports, next biggest having only 17 reports, then just various onesy-twosy reports below that), I mention it in this context primarily because libopenal/libalmixer are again present near the top: 

EDIT:  build 2017.3155

executing service com.dev.app/shared.google.play.services.base.PackageStateChangedService (no location available) "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x75f11718 self=0xe7305400 | sysTid=20465 nice=-4 cgrp=default sched=0/0 handle=0xea93e534 | state=S schedstat=( 0 0 0 ) utm=387 stm=160 core=4 HZ=100 | stack=0xff662000-0xff664000 stackSize=8MB | held mutexes= native: pc 0000000000017520 /system/lib/libc.so (syscall+28) native: pc 00000000000477bf /system/lib/libc.so (pthread\_join+146) native: pc 0000000000015b58 /data/app/com.dev.app-2/lib/arm/libopenal.so (alcDestroyContext+516) native: pc 0000000000008ed7 /data/app/com.dev.app-2/lib/arm/libalmixer.so (ALmixer\_Quit+230) native: pc 000000000011d48c /data/app/com.dev.app-2/lib/arm/libcorona.so (???) native: pc 000000000011f8c0 /data/app/com.dev.app-2/lib/arm/libcorona.so (???) native: pc 000000000012f9b4 /data/app/com.dev.app-2/lib/arm/libcorona.so (???) native: pc 000000000002b6fc /data/app/com.dev.app-2/lib/arm/libcorona.so (???) native: pc 000000000002e9f8 /data/app/com.dev.app-2/lib/arm/libcorona.so (Java\_com\_ansca\_corona\_JavaToNativeShim\_nativeDone+28) native: pc 00000000000317a5 /data/app/com.dev.app-2/oat/arm/base.odex (Java\_com\_ansca\_corona\_JavaToNativeShim\_nativeDone\_\_J+80) at com.ansca.corona.JavaToNativeShim.nativeDone (Native method) at com.ansca.corona.JavaToNativeShim.destroy (JavaToNativeShim.java:277) at com.ansca.corona.Controller.destroy (Controller.java:286) - locked \<0x0f6a25ca\> (a com.ansca.corona.Controller) at com.ansca.corona.CoronaRuntime.dispose (CoronaRuntime.java:88) at com.ansca.corona.CoronaActivity.onDestroy (CoronaActivity.java:1698) at android.app.Activity.performDestroy (Activity.java:7195) at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1161) at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:4573) at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:4609) at android.app.ActivityThread.-wrap7 (ActivityThread.java) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1692) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6682) at java.lang.reflect.Method.invoke! (Native method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

Sounds “dangerous” to me!

@SGS

Well. It isn’t.

@davebollinger

Build number, please. (it is better if you edit your post and add build number to it)