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

[Bug] v2.16alpha33 crashes when changing Decks in Card Browser and Statistics #9914

Closed
4 tasks done
ThoreBor opened this issue Nov 18, 2021 · 7 comments · Fixed by #9917
Closed
4 tasks done

[Bug] v2.16alpha33 crashes when changing Decks in Card Browser and Statistics #9914

ThoreBor opened this issue Nov 18, 2021 · 7 comments · Fixed by #9917
Assignees

Comments

@ThoreBor
Copy link
Contributor

Reproduction Steps
  1. Open Card Browser or Statistics
  2. Tap on the deck on top to change it
Expected Result

Deck selector pops up

Actual Result

App crashes

Debug info

AnkiDroid Version = 2.16alpha33
Android Version = 11
Manufacturer = Xiaomi
Model = Redmi Note 8 Pro
Hardware = mt6785
Webview User Agent = Mozilla/5.0 (Linux; Android 11; Redmi Note 8 Pro Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/96.0.4664.45 Mobile Safari/537.36
ACRA UUID = 748a0c66-d316-44d1-b35d-89891a69b2bf
Scheduler = std2
Crash Reports Enabled = true
DatabaseV2 Enabled = true

Research
  • I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • I have checked the manual and the FAQ and could not find a solution to my issue
  • I have searched for similar existing issues here and on the user forum
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
@david-allison
Copy link
Member

david-allison commented Nov 18, 2021

Thanks! Did this work in previous alphas?

https://couchdb.ankidroid.org/acralyzer/_design/acralyzer/index.html#/report-details/df4d5354-da4b-4cdf-a3d4-880a0d185c03

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.widget.Spinner.getSelectedItem()' on a null object reference
at com.ichi2.anki.dialogs.DeckSelectionDialog$DecksArrayAdapter.onBindViewHolder(DeckSelectionDialog.kt:4)
at com.ichi2.anki.dialogs.DeckSelectionDialog$DecksArrayAdapter.onBindViewHolder(DeckSelectionDialog.kt:1)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:1)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:8)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:7)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:55)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:2)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:1)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:3)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:9)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:65)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:12)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:13)
at android.view.View.measure(View.java:26057)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:481)
at android.view.View.measure(View.java:26057)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7105)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:26057)
at com.afollestad.materialdialogs.internal.MDRootLayout.onMeasure(MDRootLayout.java:35)
at android.view.View.measure(View.java:26057)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7105)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:26057)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7105)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:26057)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7105)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:767)
at android.view.View.measure(View.java:26057)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3633)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2411)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2677)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2135)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8622)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:975)
at android.view.Choreographer.doCallbacks(Choreographer.java:799)
at android.view.Choreographer.doFrame(Choreographer.java:734)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:960)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8057)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

@david-allison
Copy link
Member

Introduced in f96bdfb. #9755

Spinner spinner = getActivity().findViewById(R.id.note_deck_spinner);

This spinner only exists in NoteEditor

@ThoreBor
Copy link
Contributor Author

I'm not completely sure, but I think it worked in 2.16beta20 and earlier. I didn't test any betas between 20 and 33 though.

@ThoreBor
Copy link
Contributor Author

Introduced in f96bdfb. #9755

Spinner spinner = getActivity().findViewById(R.id.note_deck_spinner);

This spinner only exists in NoteEditor

Alright, great!

@david-allison david-allison self-assigned this Nov 18, 2021
@david-allison
Copy link
Member

Will get this sorted today. My thoughts are that alpha feedback is invaluable to us, and in return we should keep alpha users as happy as possible

@mikehardy
Copy link
Member

Will get this sorted today. My thoughts are that alpha feedback is invaluable to us, and in return we should keep alpha users as happy as possible

💯 on that - merged and I'm sorting the rest of the days PRs right now, will do a new alpha afterwards. Note @ThoreBor that we are blocked from uploading to the play store alpha channel until we finish scoped storage migration work and can increase our target API, but they will be on the releases page

@ThoreBor
Copy link
Contributor Author

Thank you guys for the fast fix. I always download from the releases page.

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

Successfully merging a pull request may close this issue.

3 participants