Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Crash when deleting a deck from the widget configuration screen

Open DoomsCoder opened this issue 9 months ago • 6 comments

Checked for duplicates?

  • [x] This issue is not a duplicate

Does it also happen in the desktop version?

  • [x] This bug does not occur in the latest version of Anki Desktop

What are the steps to reproduce this bug?

  1. Add the AnkiDroid widget to the Android home screen.
  2. Long press the widget and tap the edit icon to open the configuration screen.
  3. In the list the decks shown in the configuration, tap the delete the button next to deck.

Expected behaviour

The selected deck should be removed from the widgets list and the application remain open and usable.

Debug info

AnkiDroid Version = 2.24.0alpha5-debug (ee0c0011100a795df0a9d16437f0e603a3be30c1)  
Backend Version = 0.1.63-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)  
Android Version = 13 (SDK 33)  
ProductFlavor = play  
Device Info = motorola | motorola | rhodei | rhodei_g | moto g62 5G | qcom  
WebView Info = [com.google.android.webview | 755910933]: Mozilla/5.0 (Linux; Android 13; moto g62 5G Build/T1SSIS33.1-75-7-16; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.109 Mobile Safari/537.36  
ACRA UUID = aa511b45-fc15-4f87-a9d1-042ac9e9631c  
FSRS = 5.1.0 (Enabled: false)  
Crash Reports Enabled = false

(Optional) Anything else you want to share?

The application crashes immediately. A system message "AnkiDroid has encountered a problem" appears and the Ankidroid feedback dialog is shown.

https://github.com/user-attachments/assets/6dd2bd1d-c8ce-4b49-a334-7524cf78d38e

Research

  • [x] I have checked the manual and the FAQ and could not find a solution to my issue
  • [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)

DoomsCoder avatar Feb 05 '26 19:02 DoomsCoder

Works as expected for me

AnkiDroid Version = 2.24.0alpha0-debug (f23781e3cea106b91ac387f7bd97f0a2ac80fdb5)
Backend Version = 0.1.62-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)
Android Version = 15 (SDK 35)
ProductFlavor = play
Device Info = samsung | samsung | r0s | r0sxeea | SM-S901B | s5e9925
Webview User Agent = Mozilla/5.0 (Linux; Android 15; SM-S901B Build/AP3A.240905.015.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.109 Mobile Safari/537.36
ACRA UUID = 92535caa-459c-486e-a46c-d76205ddcf22
FSRS = 5.1.0 (Enabled: false)
Crash Reports Enabled = false

ShaanNarendran avatar Feb 06 '26 00:02 ShaanNarendran

Update : I have done more testing and can confirm the crash is very specific. Scenario 1 (No Crash): If i add only parent deck to the widget , I can delete it from the widget configuration screen without any problems.

https://github.com/user-attachments/assets/bc4c506a-701b-4b71-8195-fd1081dd89ce

Scenario 2: The crash happens if i add all decks from my collection to the widget. When all decks from my collection are in the widgets list at same time , trying to delete either one from the configuration screen (whether its the parent, the child or another deck in the list) will crash the app.

https://github.com/user-attachments/assets/86500d4e-bd6a-4d6c-8ab5-d0246f586860

DoomsCoder avatar Feb 06 '26 05:02 DoomsCoder

Scenario 2: The crash happens if i add all decks from my collection to the widget. When all decks from my collection are in the widgets list at same time , trying to delete either one from the configuration screen (whether its the parent, the child or another deck in the list) will crash the app.

Is it model specific? Does it happen on a different android version/device since I'm not able to reproduce this following the above

ShaanNarendran avatar Feb 06 '26 08:02 ShaanNarendran

try it on android 13 and api 33, i had reproduced this issue in Pixel 7 (API 33 and android 13)

Ayush-Patel-56 avatar Feb 06 '26 14:02 Ayush-Patel-56

I'll change a bit this screen and also fix this.

lukstbit avatar Feb 06 '26 17:02 lukstbit

cc @lukstbit ; since it was a small fix, i applied it. You can continue with the change in design of screen at your convenience. Thanks.

xenonnn4w avatar Feb 09 '26 20:02 xenonnn4w