Bug: Anki Deletes most/all of my IO clozes when modifying occlusion positions

Hello

A truly devastating bug!

At first, I thought I have accidently deleted a handful of occlusions by clicking the wrong key when modifying an IO card.

But then, I re-traced my steps, and noticed that it is indeed a bug.

I was only able to reproduce it with this card. I tried reproducing it with the other IO cards, but I couldn’t…

Version <U+2068>24.06.2 (33a92379)<U+2069>
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Windows 10

Some facts about the card:

  • Created on 2024-05-24
  • Here is the content of the field (I have lost some clozes):
{{c2::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}<br>{{c1::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}<br>{{c13::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}<br>{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}<br>{{c9::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}<br>{{c3::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}<br>{{c5::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}<br>{{c12::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}<br>{{c6::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}<br><img src="paste-Image.jpg">
  • Here is the content of the slfld
{{c2::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}{{c1::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}{{c13::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}{{c9::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}{{c3::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}{{c5::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}{{c12::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}{{c6::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}

Have a look at the GIF below (notice how, just after moving the boxes, the clozes disappear completely):
IOBug

After some tinkering around, I can see that these

These specific positions are troublesome. Try pasting them into their respective columns in the collection.anki2 database.

You will get the same results.

Make sure you have an image (inside your media folder) with the name paste-Image.jpg.

I have even tried the following (cloze numbers ordered):

flds

{{c1::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}<br>{{c2::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}<br>{{c3::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}<br>{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}<br>{{c5::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}<br>{{c6::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}<br>{{c7::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}<br>{{c8::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}<br>{{c9::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}<br><img src="paste-Image.jpg">

sfld

{{c1::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}{{c2::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}{{c3::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}{{c5::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}{{c6::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}{{c7::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}{{c8::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}{{c9::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}

Thanks for the report; I’ve logged this on Bug: Anki Deletes most/all of my IO clozes when modifying occlusion positions · Issue #3267 · ankitects/anki · GitHub. To make it easier to look into, it would be great if you could:

  • Restore a backup into a new profile, from before the clozes were lost
  • Export the problem note into an .apkg
  • Confirm that the same steps still trigger the issue
  • Rename to .zip and upload to the linked issue above
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.