-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] delete deck crash with v16 schema #12007
Comments
I can't reproduce this. AD devs: can I get access to the crash reports? |
Report says this is v2 scheduler, maybe you're using v3? |
@BrayanDSO assuming it is a v3 issue, would it be easy to add a v3 toggle in advanced that is only visible when v16 is enabled, assuming no maintainers object? |
Yes, the preferences part is somewhat simple. I'd have it disabled instead of invisible though. Idk about what you may want to do with the logic of getting the sched version, so I'll just leave a patch of the preferences part: Index: AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt
--- a/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt (revision 0cebb8acd1ca9a4404fe28fd2f2279ac0190c3a4)
+++ b/AnkiDroid/src/main/java/com/ichi2/anki/preferences/AdvancedSettingsFragment.kt (date 1660305411144)
@@ -112,6 +112,13 @@
}
requireActivity().packageManager.setComponentEnabledSetting(providerName, state, PackageManager.DONT_KILL_APP)
}
+ // v3 scheduler
+ requirePreference<SwitchPreference>(R.string.enable_v3_sched_key).apply {
+ setOnPreferenceChangeListener { newValue ->
+ // TODO enable v3 sched
+ }
+ }
+
// Use V16 backend
requirePreference<SwitchPreference>(R.string.pref_rust_backend_key).apply {
if (!BuildConfig.LEGACY_SCHEMA) {
Index: AnkiDroid/src/main/res/values/preferences.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values/preferences.xml b/AnkiDroid/src/main/res/values/preferences.xml
--- a/AnkiDroid/src/main/res/values/preferences.xml (revision 0cebb8acd1ca9a4404fe28fd2f2279ac0190c3a4)
+++ b/AnkiDroid/src/main/res/values/preferences.xml (date 1660305279142)
@@ -112,6 +112,7 @@
<string name="anki_card_external_context_menu_key">anki_card_enable_external_context_menu</string>
<string name="pref_reset_languages_key">resetLanguages</string>
<string name="pref_backup_max_key">backupMax</string>
+ <string name="enable_v3_sched_key">v3sched</string>
<!-- Advanced statistics -->
<string name="pref_computation_precision_key">advanced_forecast_stats_compute_precision</string>
<string name="pref_compute_n_days_key">advanced_forecast_stats_compute_n_days</string>
Index: AnkiDroid/src/main/res/values/10-preferences.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/values/10-preferences.xml b/AnkiDroid/src/main/res/values/10-preferences.xml
--- a/AnkiDroid/src/main/res/values/10-preferences.xml (revision 0cebb8acd1ca9a4404fe28fd2f2279ac0190c3a4)
+++ b/AnkiDroid/src/main/res/values/10-preferences.xml (date 1660305279134)
@@ -339,6 +339,7 @@
<string name="use_rust_backend_title" maxLength="41">Use the new backend</string>
<string name="use_rust_backend_summary">Enables newer Anki features, such as the v3 scheduler\nUNSTABLE. Do not use on a collection you care about. NOT reverted on app close</string>
<string name="use_rust_backend_warning">There is a chance this could corrupt your installation completely, requiring app uninstall and deletion of the AnkiDroid folder, and has a chance of propagating corruption via sync to AnkiWeb.\n\nWe welcome the testing, but please make sure you have a valid non-AnkiWeb backup.</string>
+ <string name="enable_v3_sched_title" maxLength="41">Use the v3 scheduler</string>
<!-- Developer options -->
<string name="pref_cat_dev_options" maxLength="41">Developer options</string>
Index: AnkiDroid/src/main/res/xml/preferences_advanced.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/main/res/xml/preferences_advanced.xml b/AnkiDroid/src/main/res/xml/preferences_advanced.xml
--- a/AnkiDroid/src/main/res/xml/preferences_advanced.xml (revision 0cebb8acd1ca9a4404fe28fd2f2279ac0190c3a4)
+++ b/AnkiDroid/src/main/res/xml/preferences_advanced.xml (date 1660305257213)
@@ -154,5 +154,10 @@
android:title="@string/use_rust_backend_title"
android:summary="@string/use_rust_backend_summary"
android:defaultValue="false"/>
+ <SwitchPreference
+ android:key="@string/enable_v3_sched_key"
+ android:dependency="@string/pref_rust_backend_key"
+ android:title="@string/enable_v3_sched_title"
+ android:defaultValue="false"/>
</PreferenceCategory>
</PreferenceScreen> |
It is the new backend but v2 Scheduler. I can see it in Anki after sync. I reinstalled the app and I am still able to reproduce. |
Which shared deck are you downloading? |
I downloaded e.g. "Fyzika 1 - Mechanika (Pomi)" and "Czech Sentences". |
I got a request for the stack trace on this one, I fetched it, along with the device info key/value pairs and the logcat device URL https://ankidroid.org/acra/app/1/installation/8811dfdf-46ff-4a51-bbea-195fe8c86a5f/report Looking at the questions above, it appears we may want to extend the device info to report what scheduler is in use, and what schema is in use?
|
There were two crashes and they were slightly different, here is the one 1 day ago, previous was a couple hours ago
|
I'm about to be away from keyboard again but just a quick note that since this is a release build the line numbers don't match anything (they are shrunk during release build process). Apologies for that. It is probably possible to pull the release tag and re-run the release build and generate the de-obfuscation file if that's a barrier, but historically it's rare that the stack frame names aren't sufficient to reason out what happened |
The first crash report commented "Delete a shared deck" is related to this issue. The second crash report commented "Import apkg" is related to #11845. |
Thanks @pavreh, I've fixed the first issue, and can't seem to reproduce the second one - it perhaps could be something specific to your collection. Does 'check database' with the new schema enabled help? @BrayanDSO thanks for that. I gave it a try and noticed a couple of problems:
@Arthur-Milchior I left those comments open above in case you wanted to confirm they've been addressed - feel free to close them when you're ready. |
BrayanDSO@b56f00b should fix those, but it has the issue of always re-enabling the v3 scheduler pref, either here on desktop (BrayanDSO@b56f00b#diff-476d84626da0890329ad2b072200ad9c053710d55539ab3bdd95187ef8c2a6adR126-R127). Please take a look |
Reproduction Steps
Expected Result
The deck is deleted. It is possible to undo the deletion.
Actual Result
The deck is deleted but a crash occures. "Undo delete deck" is not available.
Tested with different shared decks. Crash report has been sent.
Debug info
AnkiDroid Version = 2.16alpha77
Android Version = 12
Manufacturer = samsung
Model = SM-A225F
Hardware = mt6769t
Webview User Agent = Mozilla/5.0 (Linux; Android 12; SM-A225F Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36
ACRA UUID = 8811dfdf-46ff-4a51-bbea-195fe8c86a5f
Scheduler = std2
Crash Reports Enabled = true
DatabaseV2 Enabled = true
Research
Enter an [x] character to confirm the points below:
The text was updated successfully, but these errors were encountered: