Most cards appeared as deleted

Currently running 91ca5090aa745c1248dafc83b7f305a2c90d02ff. It has been running for a few days I think.

I just added cards, then opened last card, and it appeared as deleted. I then opened another card, also deleted. I then emptied the search, and realized that most card appeared deleted.

It was resolved when I closed and reopened the browser.

I don’t yet know how to reproduce it. I’ve been syncing back and forth with ankidroid and then adding new cards. I tried to repeat this, but it didn’t reproduce the issue.

I put it here and not on github just because I hope that with some luck other people can help reproduce.

I didn’t think at looking at the terminal at the time. Now I don’t know which messages are related or not to this issue.
I got plenty of

addons21/291119185/main.py:221:endReset is deprecated: please use ‘CollectionOp’

I also got

addons21/291119185/main.py:221:endReset is deprecated: please use ‘CollectionOp’
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/runanki.py”, line 20, in
aqt.run()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/init.py”, line 447, in run
_run()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/init.py”, line 628, in _run
app.exec()
File “/home/milchior/.local/share/Anki2/addons21/291119185/main.py”, line 242, in
a.triggered.connect(lambda , b=browser: onBatchEdit(b))
File “/home/milchior/.local/share/Anki2/addons21/291119185/main.py”, line 234, in onBatchEdit
dialog.exec
()
File "/home/milchior/.cache/bazel/bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/qt/qt5_compat.py", line 77, in qt_exec
return object.exec(*args, **kwargs)
File “/home/milchior/.local/share/Anki2/addons21/291119185/main.py”, line 107, in
lambda state, x=“replace”: self.onConfirm(x))
File “/home/milchior/.local/share/Anki2/addons21/291119185/main.py”, line 186, in onConfirm
batchEditNotes(browser, mode, nids, fld, text, isHtml=isHtml)
File “/home/milchior/.local/share/Anki2/addons21/291119185/main.py”, line 222, in batchEditNotes
mw.requireReset()
File “/home/milchior/.cache/bazel/_bazel_milchior/b5dcfd649323edb47c1b05686521b069/execroot/ankidesktop/bazel-out/k8-fastbuild/bin/qt/runanki.runfiles/ankidesktop/qt/aqt/main.py”, line 779, in requireReset
traceback.print_stack(file=sys.stdout)
requireReset() is obsolete; please use CollectionOp()
ignored late bridge cmd blur:8:1649009382236:path from the root of the extension folder, in png

And

addons21/291119185/main.py:134:getNote is deprecated: please use ‘get_note’
addons21/291119185/main.py:135:fieldNames is deprecated: please use ‘field_names’
addons21/291119185/main.py:90:‘Qt.AlignLeft’ will stop working. Please use ‘Qt.AlignmentFlag.AlignLeft’ instead.
addons21/291119185/main.py:92:‘Qt.Horizontal’ will stop working. Please use ‘Qt.Orientation.Horizontal’ instead.
addons21/291119185/main.py:94:‘QDialogButtonBox.ActionRole’ will stop working. Please use ‘QDialogButtonBox.ButtonRole.ActionRole’ instead.
addons21/291119185/main.py:96:‘QDialogButtonBox.ActionRole’ will stop working. Please use ‘QDialogButtonBox.ButtonRole.ActionRole’ instead.
addons21/291119185/main.py:98:‘QDialogButtonBox.ActionRole’ will stop working. Please use ‘QDialogButtonBox.ButtonRole.ActionRole’ instead.
addons21/291119185/main.py:100:‘QDialogButtonBox.RejectRole’ will stop working. Please use ‘QDialogButtonBox.ButtonRole.RejectRole’ instead.
gettext () is deprecated: Alt+H
addons21/291119185/main.py:234:'BatchEditDialog.exec
()’ is deprecated. Please use ‘BatchEditDialog.exec()’
addons21/291119185/main.py:197:beginReset is deprecated: please use ‘CollectionOp’


It appears after I added a new note type

I looked at the terminal, then changed the card type selected, and saw that no new error message appeared

Currently running on 26d40c3a8ef066fd4bb3c023bddcc606f8cdfe51

After this patch, rows should only be shown as deleted if the card/note id is missing from the db. Maybe you have an add-on deleting notes, or changing their ids?

I’ve checked. I’ve very few add-ons today. Normally, none that delete note. None that change id.
The trouble is that it takes so much time for it to occurs that running with all add-ons deactivated is not a realistic option for me

This occurred after a full sync. After a lot of note type change

Strangely, some lines’ “sort field” are black. They become grey when I remove the mouse or start the screeshot app

This is very likely caused by an add-on.

Not sure what you mean exactly, but sounds just like an artifact of the way Qt repaints rows.

Until you’ve confirmed the issue happens with no add-ons active, and can boil this down to a set of steps to reproduce the issue, I don’t think we’ll be able to do anything about it Arthur.

@Rumo the grey/black issue can be reproduced by selecting a large number of rows, deleting them, and then scrolling down to reveal the rows for the first time - they appear briefly in black before being marked as disabled.