Why does keyboard-slide crash my app?
- by Brad Hein
If I physically slide out the keyboard on my Moto Droid A855, it crashes my test app with the stack trace pasted below. I don't understand why?
Also, if I start my app with the keyboard out, my app crashes immediately on startup.
The app consists of an activity, which contains a viewflipper as the main view layout. The viewflipper contains two linearlayouts...
Stack trace:
06-10 21:10:17.652 E/AndroidRuntime( 3785): Uncaught handler: thread main exiting due to uncaught exception
06-10 21:10:17.668 E/AndroidRuntime( 3785): java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper$1@447af0b8
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:667)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ApplicationContext.unregisterReceiver(ApplicationContext.java:747)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:321)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.widget.ViewFlipper.onDetachedFromWindow(ViewFlipper.java:104)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.View.dispatchDetachedFromWindow(View.java:5835)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1076)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:1074)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.dispatchDetachedFromWindow(ViewRoot.java:1570)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.doDie(ViewRoot.java:2556)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.ViewRoot.die(ViewRoot.java:2526)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:218)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.view.Window$LocalWindowManager.removeViewImmediate(Window.java:436)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3498)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3599)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.access$2300(ActivityThread.java:119)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1867)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.os.Handler.dispatchMessage(Handler.java:99)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.os.Looper.loop(Looper.java:123)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at android.app.ActivityThread.main(ActivityThread.java:4363)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at java.lang.reflect.Method.invokeNative(Native Method)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at java.lang.reflect.Method.invoke(Method.java:521)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-10 21:10:17.668 E/AndroidRuntime( 3785): at dalvik.system.NativeStart.main(Native Method)
06-10 21:10:17.684 I/Process ( 1017): Sending signal. PID: 3785 SIG: 3