I’m reviewing at an image occlusion card but it looks wrong (the occlusions don’t line up with the image) and when I edit it,
- the image changes to a different image, and
- there are more occlusions.
What’s going on? How can I fix it?
I’m reviewing at an image occlusion card but it looks wrong (the occlusions don’t line up with the image) and when I edit it,
What’s going on? How can I fix it?
Let’s start with –
Built-in Image Occlusion
Anki 24.11 (87ccd24e) (src) (ao)
Python 3.12.8 Qt 6.8.2 PyQt 6.8.0
Platform: Linux-6.12.5-x86_64-with-glibc2.40
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Deck duplication ['1779572689', 2022-06-11T07:24, 'None', '']
Markdown Support Tables Code Highlighting Math Darkmode ['1786114227', 2025-01-11T06:18, 'None', '']
===IDs of active AnkiWeb add-ons===
1779572689 1786114227
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Any suggestions on how I can debug this?
It’d help to get a recording from you.
Will try you running Tools > Check Media (and delete your unused media), and run Tools > Check Database?
Have you gone through the Troubleshooting Checklist – especially #6 video drivers?
Have you modified your IO note type/templates?
Did you use that “Deck duplication” add-on with any of these notes/cards/decks?
Also: Do you zoom in during review (either with a mouse wheel / Ctrl, the menu or via templates)? Maybe the occlussion masks didn’t scale as they should.
Done, no dice.
That deleted some other images I was using in another deck, so something’s not quite right with that. I undid this change.
Keep holding Shift down until the on-screen message informs you that Anki has started in safe mode.
I held down Shift when starting Anki but I didn’t get any message informing me about safe mode.
I tried disabling all my addons and restarting Anki; the problem persists.
I don’t think it’s a video driver problem. It doesn’t feel like a graphics glitch. It feels like Anki is just showing the wrong image for this card. For example, here’s the view in the Browse window:
And when I click Preview:
I don’t think so.
Front
{{#Header}}<div>{{Header}}</div>{{/Header}}
<div style="display: none">{{cloze:Occlusion}}</div>
<div id="err"></div>
<div id="image-occlusion-container">
{{Image}}
<canvas id="image-occlusion-canvas"></canvas>
</div>
<script>
try {
anki.imageOcclusion.setup();
} catch (exc) {
document.getElementById("err").innerHTML = `Error loading image occlusion. Is your Anki version up to date?<br><br>${exc}`;
}
</script>
Back
{{#Header}}<div>{{Header}}</div>{{/Header}}
<div style="display: none">{{cloze:Occlusion}}</div>
<div id="err"></div>
<div id="image-occlusion-container">
{{Image}}
<canvas id="image-occlusion-canvas"></canvas>
</div>
<script>
try {
anki.imageOcclusion.setup();
} catch (exc) {
document.getElementById("err").innerHTML = `Error loading image occlusion. Is your Anki version up to date?<br><br>${exc}`;
}
</script>
I don’t remember.
You should try it anways.
Also what I asked:
Do you zoom in during review (either with a mouse wheel / Ctrl, the menu or via templates)? Maybe the occlussion masks didn’t scale as they should.
especially #6 video drivers?
Ok I tried switching from Software to OpenGL and restarting Anki but didn’t help.
Do you zoom in during review (either with a mouse wheel / Ctrl, the menu or via templates)? Maybe the occlussion masks didn’t scale as they should.
Restarting Anki and not-zooming doesn’t help. I think the occlusions are correctly placed, it’s just showing the wrong image underneath them.
I think the occlusions are correctly placed, it’s just showing the wrong image underneath them.
Interessting. Can you try with the latest version as well?
Can you try with the latest version as well?
Same result with 25.02
Can you try the cards in another computer / on a smartphone / on ankiweb and see if the problem appears there as well?
Can I get AnkiWeb to show me that card without reviewing all the other cards in the deck first?
I held down Shift when starting Anki but I didn’t get any message informing me about safe mode.
I’ve never heard of that not working. Did you hold it down from before you started the app until the app window opened on your screen?
I don’t think it’s a video driver problem. It doesn’t feel like a graphics glitch. It feels like Anki is just showing the wrong image for this card
The reason why I suggested that is issues like Anki shows the wrong card/question/answer can specifically be caused by the video drivers, and that is frequently a fix for issues that sound an awful lot like yours.
Ok I tried switching from Software to OpenGL and restarting Anki but didn’t help.
Were those the only ones available to you? You should try all of the options.
Can I get AnkiWeb to show me that card without reviewing all the other cards in the deck first?
The easiest way is to build that card into a Filtered deck on desktop and then sync that to AnkiWeb.
Back
It might just be a mis-paste in your message, but the back template shouldn’t match the front template exactly. There’s an extra section at the end. [Although I’m not sure that would cause the issue you’re seeing.]
I think the occlusions are correctly placed, it’s just showing the wrong image underneath them.
This is bringing me thoughts about how the app could be confused between the two images. Obviously that wrong-image exists in your collection too – do the images have similar filenames [check the “Question” column to see the filename]? Are you using that wrong-image on another note? Do those cards display it correctly?
I’ve never heard of that not working. Did you hold it down from before you started the app until the app window opened on your screen?
Yes.
Were those the only ones available to you? You should try all of the options.
Ok I also tried Vulkan and that didn’t work either.
It might just be a mis-paste in your message, but the back template shouldn’t match the front template exactly. There’s an extra section at the end.
Yes, mispaste.
Front
{{#Header}}<div>{{Header}}</div>{{/Header}}
<div style="display: none">{{cloze:Occlusion}}</div>
<div id="err"></div>
<div id="image-occlusion-container">
{{Image}}
<canvas id="image-occlusion-canvas"></canvas>
</div>
<script>
try {
anki.imageOcclusion.setup();
} catch (exc) {
document.getElementById("err").innerHTML = `Error loading image occlusion. Is your Anki version up to date?<br><br>${exc}`;
}
</script>
Back
{{#Header}}<div>{{Header}}</div>{{/Header}}
<div style="display: none">{{cloze:Occlusion}}</div>
<div id="err"></div>
<div id="image-occlusion-container">
{{Image}}
<canvas id="image-occlusion-canvas"></canvas>
</div>
<script>
try {
anki.imageOcclusion.setup();
} catch (exc) {
document.getElementById("err").innerHTML = `Error loading image occlusion. Is your Anki version up to date?<br><br>${exc}`;
}
</script>
<div><button id="toggle">Toggle Masks</button></div>
{{#Back Extra}}<div>{{Back Extra}}</div>{{/Back Extra}}
check the “Question” column to see the filename
Question and Answer each show two filenames:
do the images have similar filenames
Those two filenames are adjacent in the lexicographic order of my media directory filenames.
Are you using that wrong-image on another note?
I don’t think so.
Question and Answer each show two filenames:
That’s not normal, is it? Did you look in your collection.media
folder at those 2 files (Managing Files - Anki Manual ), and are they the right-image and wrong-image you’re seeing for this note/card?
That’s not normal, is it?
No, it’s weird.
Did you look in your
collection.media
folder at those 2 files
Yes.
are they the right-image and wrong-image you’re seeing for this note/card?
Yes.
I’m not sure how this happened, but it seems like the IO note somehow attached both pictures, and it’s showing you one in the edit window, but the other in the study screen. Anything you can do to what’s there with the correct image might be enough. Deleting the wrong-image file (from your collection.media
) might be enough too.