Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash due to Invalid district key "2018tx" #872

Closed
1fish2 opened this issue Sep 16, 2018 · 2 comments
Closed

Crash due to Invalid district key "2018tx" #872

1fish2 opened this issue Sep 16, 2018 · 2 comments

Comments

@1fish2
Copy link
Contributor

1fish2 commented Sep 16, 2018

On Android 8.1 emulator with Google Play (also reported on 8.0), do this:

  1. Open the "Districts" screen via the hamburger menu.
  2. Scroll down.
  3. Observe crash due to invalid district key "2018tx".

The problem is the string "tx" is not in the list of strings in DistrictType.fromAbbreviation().

    --------- beginning of crash
09-15 21:19:22.197 4387-4387/com.thebluealliance.androidclient.development E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.thebluealliance.androidclient.development, PID: 4387
    java.lang.IllegalArgumentException: Invalid district key
        at com.thebluealliance.androidclient.listeners.DistrictClickListener.<init>(DistrictClickListener.java:21)
        at com.thebluealliance.androidclient.listitems.DistrictListElement.getView(DistrictListElement.java:61)
        at com.thebluealliance.androidclient.adapters.ListViewAdapter.getView(ListViewAdapter.java:29)
        at android.widget.AbsListView.obtainView(AbsListView.java:2365)
        at android.widget.ListView.makeAndAddView(ListView.java:2052)
        at android.widget.ListView.fillDown(ListView.java:786)
        at android.widget.ListView.fillGap(ListView.java:750)
        at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5225)
        at android.widget.ListView.trackMotionScroll(ListView.java:1971)
        at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4769)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:655)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        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)
09-15 21:19:22.199 4387-4387/com.thebluealliance.androidclient.development W/GAv4: Discarding hit. Missing tracking id parameter: exd=IllegalArgumentException (@DistrictClickListener:<init>:21) {main},cd=com.thebluealliance.androidclient.activities.HomeActivity,a=1824206452,exf=1,sf=100.0,t=exception,av=4.3.1-2+g7354a73,an=The Blue Alliance Debug,aid=4.3.1-2+g7354a73,tid=
09-15 21:19:22.203 4387-4387/com.thebluealliance.androidclient.development E/UncaughtException: java.lang.IllegalArgumentException: Invalid district key
        at com.thebluealliance.androidclient.listeners.DistrictClickListener.<init>(DistrictClickListener.java:21)
        at com.thebluealliance.androidclient.listitems.DistrictListElement.getView(DistrictListElement.java:61)
        at com.thebluealliance.androidclient.adapters.ListViewAdapter.getView(ListViewAdapter.java:29)
        at android.widget.AbsListView.obtainView(AbsListView.java:2365)
        at android.widget.ListView.makeAndAddView(ListView.java:2052)
        at android.widget.ListView.fillDown(ListView.java:786)
        at android.widget.ListView.fillGap(ListView.java:750)
        at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5225)
        at android.widget.ListView.trackMotionScroll(ListView.java:1971)
        at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4769)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:655)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        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)
@1fish2
Copy link
Contributor Author

1fish2 commented Sep 16, 2018

This branch has the minimal fixes to the build files to build and install the APK with current dev tools. Then you can set breakpoints.

@1fish2
Copy link
Contributor Author

1fish2 commented Oct 1, 2018

(This Issue duplicates #868.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant