Lev161
Lev161

Reputation: 155

How to detect why the error happens

The app is in the market and sometimes it reports a crash. The issue occured 5 times on 3 different devices with different Android versions. The stacktrace differs a bit depending on the android version, but mostly looks like this:

java.lang.IllegalStateException:
at android.widget.TextView.onKeyUp (TextView.java:7465)
at android.view.KeyEvent.dispatch (KeyEvent.java:2750)
at android.view.View.dispatchKeyEvent (View.java:11724)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at com.android.internal.policy.DecorView.superDispatchKeyEvent (DecorView.java:591)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent (PhoneWindow.java:1829)
at android.app.Activity.dispatchKeyEvent (Activity.java:3280)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent (AppCompatActivity.java:534)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent (WindowCallbackWrapper.java:58)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent (AppCompatDelegateImplBase.java:316)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent (WindowCallbackWrapper.java:58)
at com.android.internal.policy.DecorView.dispatchKeyEvent (DecorView.java:401)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent (ViewRootImpl.java:4747)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:4619)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4214)
at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4180)
at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:4307)
at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4188)
at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:4364)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4214)
at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4180)
at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4188)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:6682)
at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:6656)
at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:6617)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage (ViewRootImpl.java:3944)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6501)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)

How can I understand where the issue happens to test, debug and fix it?

Upvotes: 1

Views: 183

Answers (1)

Lev161
Lev161

Reputation: 155

@i.terrible thank you for your suggestions. To understand the issue I had to check the crash logs and videos google provided (luckily the issue also appeared on google's emulators and their logs were more informative). The reason of the issue is in the imeOptions of the EditText. I've put actionDone there to avoid focusing unfocusable views and that has fixed the issue.

Upvotes: 1

Related Questions