Anki 25.05 Beta

While I was reviewing a deck in Anki 25.05.1 Beta 1 for macOS, I pressed I to open the card info window. The window appeared, but it was completely blank except for the Close button at the bottom. When I closed the window and tried to exit the study session (by pressing S), Anki crashed with the following stack trace:

Anki 25.05 (0aaa6383)  
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-15.4.1-arm64-arm-64bit

Traceback (most recent call last):
  File "aqt.taskman", line 148, in _on_closures_pending
  File "aqt.taskman", line 88, in <lambda>
  File "aqt.sync", line 52, in on_future_done
  File "concurrent.futures._base", line 439, in result
  File "concurrent.futures._base", line 391, in __get_result
  File "concurrent.futures.thread", line 58, in run
  File "aqt.sync", line 62, in <lambda>
  File "anki.collection", line 1153, in sync_status
  File "anki._backend_generated", line 94, in sync_status
  File "anki._backend", line 161, in _run_command
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: PoisonError { .. }

After re-launching Anki, I was able to reproduce the crash by repeating the steps above while reviewing the same card. However, doing the same steps on other cards did not produce any buggy behavior.

Ok I’ve found the bug (the parameters aren’t upgraded to FSRS6 in the retrievability priority functions) but the fix remains the same. Thanks for helping clear that up.

2 Likes

Additional info: When I run Anki in the terminal with RUST_BACKTRACE=1, it prints the following panic when opening the Info window:

thread '<unnamed>' panicked at rslib/src/stats/card.rs:161:39:
index out of bounds: the len is 0 but the index is 18446744073709551615
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: anki::stats::card::<impl anki::collection::Collection>::stats_revlog_entries_with_memory_state
   4: anki::stats::service::<impl anki::services::StatsService for anki::collection::Collection>::card_stats
   5: anki::services::<impl anki::backend::Backend>::run_service_method
   6: rsbridge::Backend::__pymethod_command__
   7: pyo3::impl_::trampoline::trampoline
   8: rsbridge::<impl pyo3::impl_::pyclass::PyMethods<rsbridge::Backend> for pyo3::impl_::pyclass::PyClassImplCollector<rsbridge::Backend>>::py_methods::ITEMS::trampoline
   9: _method_vectorcall_VARARGS_KEYWORDS
  10: __PyEval_EvalFrameDefault

(Edited to add Rust backtrace.)

Could it be this?

Try it on a different card with more reviews.

Yes, it could be related. The card that triggered the crash has exactly one review later than ignore_reviews_before. Other cards I tried (with more recent reviews) do not trigger the same behavior. I don’t have a local build of Anki set up to test with that fix, but I may try it later if I have time, or I can provide a .colpkg if someone else wants to try confirming it.

Edit: Looking at the code for stats_revlog_entries_with_memory_state, I’m pretty sure this should be fixed by that patch.

1 Like

After upgrading to the latest version, I experienced frequent crashes in the browse window when trying to multi-select items using the Shift key. Despite repeatedly restarting Anki, the issue persisted. However, the problem mysteriously resolved itself at some point, and I can no longer reproduce the bug. I’m sharing this information for reference. Thanks.

Anki 25.05 (0aaa6383) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-15.3.2-arm64-arm-64bit

1 Like

Beta 2 is now available. Please let us know if you hit any further issues.

4 Likes

MathJax does not scale correctly in the editor:

Beta:

Previous version:

@Anon_0000 I remember you doing some MathJax related changes (before the first beta). Maybe you can take a look?

My change was related to the font size of the mathjax popup, which should not have an effect on the fields and how mathjax is rendered. I can take a look though.

@Lama06 Can you send me the mathjax as text please (from the html field)? Please paste it into a code block like this: “`some code goes here`”, so that you get the code in a gray box like this: some code goes here.

1 Like
<anki-mathjax>n</anki-mathjax><br><anki-mathjax>a_n</anki-mathjax><br><anki-mathjax>\lim_{n\rightarrow\infty}{a_n}</anki-mathjax><br><br>
1 Like

bisected, e7fbf15 is the first bad commit. but i don’t know css well enough to figure out why this is happening

1 Like

Thanks. You’re right, seems like I introduced this issue after all. Turning off min-height: 1.5em; of the <anki-editable> does instantly solve it.

I guess the issue is that the * {} means “apply to all”, but it apparently shouldn’t be applied like this. I’ll see if there’s a better way.

This should work

diff --git a/ts/editable/ContentEditable.svelte b/ts/editable/ContentEditable.svelte
index 9b1b4f056..d0cfe89df 100644
--- a/ts/editable/ContentEditable.svelte
+++ b/ts/editable/ContentEditable.svelte
@@ -69,6 +69,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
         &:focus {
             outline: none;
         }
+
+        min-height: 1.5em;
     }
 
     /* editable-base.scss contains styling targeting user HTML */
diff --git a/ts/editable/editable-base.scss b/ts/editable/editable-base.scss
index bc8dea985..3cfaa63b4 100644
--- a/ts/editable/editable-base.scss
+++ b/ts/editable/editable-base.scss
@@ -2,7 +2,6 @@
 
 * {
     max-width: 100%;
-    min-height: 1.5em;
 }
 
 p {
2 Likes

Indeed. That’s much better than my first thought, which was just doing this:

*:not(.mathjax) {
    min-height: 1.5em;
}

Would you like to open a PR @llama ?

2 Likes

My crash is fixed in beta 2.

2 Likes

Issue: “Grade Now” does not work as expected.

Steps to Reproduce:

  1. Open the browser.
  2. Ensure you are viewing cards (not notes).
  3. Right-click on a card that:
    • Is neither buried nor suspended.
    • Has been manually rescheduled.
  4. Select Grade Now from the context menu.
  5. In the dialog that appears, choose Again.

Actual Result:


Note: This dialog is not translated.

Expected Result:

  1. The context menu entry should display “Grade Now 
” (with ellipsis). Ellipsis (three dots) are typically added programmatically to strings requiring additional user input before action execution. Other context menu options around “Grade Now” include ellipsis, so this should align for consistency.
  2. Grade Now should work correctly for non-suspended cards without triggering an error message, even if the card had been rescheduled manually.
  3. Anyway, the error message “Can’t answer suspended cards” is misleading in this context if the actual problem is that the card had been rescheduled.
  4. If the error message “Can’t answer suspended cards” is actually used, it should be available for localization in Pontoon.
  5. The existence of the error string “Can’t answer suspended cards” is strange, given that applying this feature to suspended cards generally works.

It’s weird that you see the error message when your card is not suspended.

I cannot reproduce this bug on a card manually rescheduled by Set Due Date. Could you provide more details about the affected card? Such as the card info.

HinzugefĂŒgt 2024-06-10
Erstmals wiederholt 2024-06-11
Zuletzt wiederholt 2025-02-19
FĂ€llig 2025-05-06
Positionsnummer 5355
Intervall ⁚2,79⁩ Monate
StabilitÀt ⁚21⁩ Tage
Schwierigkeitsgrad 95%
Abrufbarkeit 73%
Wiederholungen 55
Fehlversuche 9
Durchschnittliche Zeit ⁚22,16⁩ Sekunden
Gesamter Zeitaufwand ⁚20,32⁩ Minuten
Kartentyp Karte 1
Notiztyp Einfach
Stapel A::Französisch::2_DE→FR
Stapelprofil DEFR
Karten-ID 1718028527617
Notiz-ID 1718028527617
Benutzerdefinierte Daten v=reschedule