[2.1.65] Anki crashes under Windows when selecting text while pressing Ctrl+C because of a clipboard conflict (COM error 0xffffffff800401d4)

How to reproduce:

  1. Open the Add Note window.
  2. Enter a few lines of text in one of the fields.
  3. Press Ctrl+C and keep pressing.
  4. Quickly select some of the text by left clicking and dragging the mouse cursor and repeat a few times, all while keeping Ctrl+C pressed down.
  5. In my case I need to do that just a few times until Anki crashes with the following message (from the console):

Qt critical: OleSetClipboard: Failed to set mime data (text/html, text/plain) on clipboard: COM error 0xffffffff800401d0 (OpenClipboard fehlgeschlagen) (Der Vorgang wurde erfolgreich beendet.)
Qt critical: OleSetClipboard: Failed to set mime data (text/html, text/plain) on clipboard: COM error 0xffffffff800401d0 (OpenClipboard fehlgeschlagen) (Der Vorgang wurde erfolgreich beendet.)
Qt critical: OleSetClipboard: Failed to set mime data () on clipboard: COM error 0xffffffff800401d4 (CloseClipboard fehlgeschlagen) (Der Thread hat keine Zwischenablage ge├Âffnet.)

The conditions I described sound quite artificial but the problem also occurs if you use software that copies selected text and quickly restores the clipboard afterwards.

It seems like this exact error has been addressed before.

The issue occurs in 2.1.62 as well. Anki 2.1.49, however, is unaffected.

This is tracked on Our clipboard handling code seems to cause issues · Issue #2349 · ankitects/anki · GitHub

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