We're getting this error from customers in large numbers after adding Google Play game services achievements to our app. There are two types of traces, this latest one (2nd trace below) starts from android.app.Application.onLowMemory() on a 4.0.4 device.
I'm puzzled by the trace. Could google-play-services_lib be registering an instance of com.google.android.gms.common.images.e (whatever that is) as if it is a ComponentCallbacks, then when the app tries to call a method on that instance the class cast exception is triggered? Both types of stacks we've seen -- due to onConfigurationChanged() or onLowMemory() -- are methods of http://developer.android.com/reference/android/content/ComponentCallbacks.html
Has anyone seen this exception? I have gotten it a couple times since adding google-play-services_lib to our project (we use it for achievements). It happens when our app is not active, perhaps when being paused (e.g. Home button) although once it seemed to occur when USB was unplugged -- as configuration changed is in the path maybe the device was switching portrait/landscape while being handled? It is not easily reproducible so I'm not sure what's happening yet.
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)