Crash on master

I was running on master, adding new cards as usual. I got the following crash that I report just in case it may help

Traceback (most recent call last):
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 99, in _on_closures_pending
closure()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 69, in
lambda future: self.run_on_main(lambda: on_done(future))
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 88, in wrapped_done
on_done(fut)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/operations/init.py”, line 113, in wrapped_done
self._success(result)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/addcards.py”, line 270, in on_success
tooltip(tr.adding_added(), period=500)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/utils.py”, line 729, in tooltip
closeTooltip()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/utils.py”, line 765, in closeTooltip
_tooltipTimer.stop()
RuntimeError: wrapped C/C++ object of type QTimer has been deleted

ignored late blur
ignored late blur
thread ‘’ panicked at ‘assertion failed: note.id.0 == 0’, rslib/src/storage/note/mod.rs:63:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Caught exception:
Traceback (most recent call last):
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 99, in _on_closures_pending
closure()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 69, in
lambda future: self.run_on_main(lambda: on_done(future))
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/taskman.py”, line 88, in wrapped_done
on_done(fut)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/operations/init.py”, line 108, in wrapped_done
future.result()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/external/python/lib/python3.9/concurrent/futures/_base.py”, line 439, in result
return self.__get_result()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/external/python/lib/python3.9/concurrent/futures/_base.py”, line 391, in __get_result
raise self._exception
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/external/python/lib/python3.9/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/operations/init.py”, line 93, in wrapped_op
return self._op(mw.col)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/operations/note.py”, line 22, in
return CollectionOp(parent, lambda col: col.add_note(note, target_deck_id))
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/pylib/anki/collection.py”, line 367, in add_note
out = self._backend.add_note(note=note._to_backend_note(), deck_id=deck_id)
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/pylib/anki/_backend/generated.py”, line 552, in add_note
raw_bytes = self._run_command(2, 1, message.SerializeToString())
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/pylib/anki/_backend/init.py”, line 138, in _run_command
return self._backend.command(service, method, input)
pyo3_runtime.PanicException: assertion failed: note.id.0 == 0

thread ‘’ panicked at ‘called Result::unwrap() on an Err value: PoisonError { … }’, rslib/src/backend/mod.rs:168:18
Error in atexit._run_exitfuncs:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):

Thanks, I’ve pushed a fix for the first one: Cleanup by RumovZ · Pull Request #1676 · ankitects/anki · GitHub
Did the backend error appear at the same time? Looks unrelated to me.

1 Like

I had an error on first “add”. I clicked “ok” and tried to add again. Got a second error, clicked ok and this time it closed.

I’ve not checked whether there were two distinct errors here. I just copied my terminal output when Anki crashed

While it’s possible you’ve hit a bug here, assertion failed: note.id.0 == 0 has typically been caused by add-ons in the past - a new note should not have an id set.

1 Like