We get this error from customers in large numbers after adding the achievements of the Google Play game services to our application. There are two types of traces, the last of which (second trace below) starts with android.app.Application.onLowMemory () on device 4.0.4.
I am puzzled next. Can google-play-services_lib register an instance of com.google.android.gms.common.images.e (whatever that is), as if it were a ComponentCallbacks component, then when the application tries to call a method on that instance, the class cast exception thrown? Both types of stacks we saw - due to onConfigurationChanged () or onLowMemory () - are the methods http://developer.android.com/reference/android/content/ComponentCallbacks.html
Has anyone seen this exception? I got this a couple of times since adding google-play-services_lib to our project (we use it for achievements). This happens when our application is inactive, possibly when it is paused (for example, the "Home" button), although as soon as it happened when the USB was disconnected from the network - as the configuration changed on the way, the device might switch portrait / landscape during processing? This is not easy to reproduce, so I'm not sure what is going on.
16:05:35.587 DEBUG: onStop: disconnecting clients. lq (... 17 seconds elapse with no events related to the app) 16:05:52.292 java.lang.ClassCastException: com.google.android.gms.common.images.e cannot be cast to android.content.ComponentCallbacks at android.app.Application.onConfigurationChanged(Application.java:91) at android.app.ActivityThread.performConfigurationChanged(ActivityThread.java:3800) at android.app.ActivityThread.handleConfigurationChanged(ActivityThread.java:3973) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1348) at android.os.Handler.dispatchMessage(Handler.java:99) 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:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) 18:00:46.230 WTF: errorNoNotify: Exception "main": java.lang.ClassCastException: com.google.android.gms.common.images.e cannot be cast to android.content.ComponentCallbacks android.app.Application.onLowMemory(Application.java:99) hm java.lang.ClassCastException: com.google.android.gms.common.images.e cannot be cast to android.content.ComponentCallbacks at android.app.Application.onLowMemory(Application.java:99) at android.app.ActivityThread.handleLowMemory(ActivityThread.java:3690) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1233) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)
source share