Certain cards make Anki crash when viewed

Hello. I have a deck of about 9,000 cards. Of those, a very small number (~10-20) cause Anki to freeze on desktop whenever I view them either in the browser or via study. I do not get an error message. I’m running Windows 10. Windows and Anki are both up to date. The same cards work fine on my iphone and on Anki web. All the cards in the deck are shared with a study group, other users tell me these cards work fine for them. The affected cards all have a tag in common (let’s call it “foo”), but there are other cards with the foo tag that do not have the issue. I do not see any unique feature of the cards that are having the issue. The error has persisted the whole time I had those cards. I have tried uploading/reinstalling Anki; deleting and re-adding those cards; disabling all add ons; and searching for solutions here and on Google. If anyone has any ideas I’d very much appreciate them. Thank you!

Can you let me know the tag, or better yet a specific card, so I can try to reproduce the issue or take a guess at what it might be? Is the issue during review, editing, or both?

Hi, dae. Thank you for the response. The issue happens during reviewing, editing, or even just browsing. Once these cards come up on the screen, Anki freezes. The cards are in Hebrew. Fields and tag for one of the cards is below. As I said, I have other cards with the same tags that don’t have the issue. In fact, I was able to copy and paste these fields into new cards and those copies did not have the issue.

Question: שלשה הקדוש ברוך הוא אוהבן

Answer:
מי שאינו כועס
ומי שאינו משתכר
ומי שאינו מעמיד על מדותיו

Tags:

  • comprehensive
  • פסחים
  • פסחים_דף_קיג
  • פסחים_פרק_י

If there is a way to upload the .apkg file on the forum I can do that too, but I didn’t see a way to do it.

Also, if there is a way to just export the card info and try to remake the cards I can try that. I found this extension that will export the cards along with review history interval, etc. but I’m not sure how to convert that back to an apkg. It’s add on 1967530655

If you click the <> icon in the top right of the field, you can see its HTML source. That note’s fields appear to contain a lot of extraneous HTML, which may be connected to the issue:

<div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>מי שאינו כועס</div><div>ומי שאינו משתכר </div><div>ומי שאינו מעמיד על מדותיו&nbsp;</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>

If you remove all the extra ones like so, it may help:

<div>מי שאינו כועס</div><div>ומי שאינו משתכר </div><div>ומי שאינו מעמיד על מדותיו&nbsp;</div>
2 Likes

Wow, brilliant. That fixed it. I went through on my phone and deleted all the extra divs and that solved the problem. I see that many other cards from the same website also have repeat div div div but not to the same degree so those aren’t crashing. Is there a way to clean that up across all cards to prevent future issues? (For example, if I could search and replace all div div with just one div, then that might clean things up). Were you able to see the HTML from what I posted or did you find the cards online? I only ask so I can try to grow my skillset as I don’t know much about HTML. Either way, thanks for the excellent diagnosis!

You may be able to use find&replace to replace <div><div><div>..., then again to replace the </div></div></div>.... Recommend you export a backup first before making changes, and check any updated cards still display correctly afterwards.

I looked up that problem card by searching for that text in your AnkiWeb collection (which other forum members cannot do).

Thank you, maybe I will try that. Did not realize you were the creator of Anki. Thank you so much for an amazing resource and for your help with my question.

1 Like

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