Anki crashes on copy-pasting in large images on Linux/Gnome3

Whenever I copy to clipboard a large image (all have been from a PDF so far), and then paste it into Anki desktop, the application crashes my desktop environment. This doesn’t seem to happen with other, small images.

My system details are as follows:

  • Anki ⁨2.1.40 (cf446733)⁩
  • Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
  • Ubuntu 18.04
  • GNOME Shell 3.28.4
  • Linux 5.4.45-050445-generic

My journalctl /usr/bin/gnome-shell returns the following:

Apr 22 17:13:15 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce: offset negative (-17ms)
Apr 22 17:13:15 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce: offset negative (-37ms)
Apr 22 17:13:15 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce short: offset negative (-50ms)
Apr 22 17:13:17 michael-desktop gnome-shell[14003]: Some code accessed the property 'WindowPreviewMenu' on the module 'windowPreview'. That property was defined with 'let' or 'const' inside the module. This was 
Apr 22 17:13:23 michael-desktop org.gnome.Shell.desktop[14003]: Fontconfig error: Cannot load default config file: No such file: (null)
Apr 22 17:13:42 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce: offset negative (-18ms)
Apr 22 17:13:42 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce short: offset negative (-32ms)
Apr 22 17:13:45 michael-desktop org.gnome.Shell.desktop[14003]: Fontconfig error: Cannot load default config file: No such file: (null)
Apr 22 17:13:51 michael-desktop org.gnome.Shell.desktop[14003]: Fontconfig error: Cannot load default config file: No such file: (null)
Apr 22 17:13:52 michael-desktop org.gnome.Shell.desktop[14003]: Fontconfig error: Cannot load default config file: No such file: (null)
Apr 22 17:15:01 michael-desktop gnome-shell[14003]: [AppIndicatorSupport-FATAL] unable to update icon
Apr 22 17:15:02 michael-desktop gnome-shell[14003]: [AppIndicatorSupport-FATAL] unable to update icon
Apr 22 17:15:06 michael-desktop gnome-shell[14003]: [AppIndicatorSupport-FATAL] unable to update icon
Apr 22 17:15:06 michael-desktop gnome-shell[14003]: [AppIndicatorSupport-FATAL] unable to update icon
Apr 22 17:17:26 michael-desktop org.gnome.Shell.desktop[14003]: libinput error: client bug: timer event2 debounce short: offset negative (-8ms)
Apr 22 17:17:51 michael-desktop org.gnome.Shell.desktop[14003]: Using O_TMPFILE
Apr 22 17:17:52 michael-desktop org.gnome.Shell.desktop[14003]: Using O_TMPFILE
Apr 22 17:17:59 michael-desktop org.gnome.Shell.desktop[14003]: [16655:16655:0422/171759.581375:ERROR:shared_image_manager.cc(214)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a
Apr 22 17:17:59 michael-desktop org.gnome.Shell.desktop[14003]: [16655:16655:0422/171759.581707:ERROR:shared_image_manager.cc(214)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a
Apr 22 17:19:24 michael-desktop org.gnome.Shell.desktop[14003]: Using O_TMPFILE
Apr 22 17:19:25 michael-desktop org.gnome.Shell.desktop[14003]: Using O_TMPFILE
Apr 22 17:19:26 michael-desktop org.gnome.Shell.desktop[14003]: Using O_TMPFILE

My journalctl /usr/local/bin/anki returns:

Apr 22 17:11:27 michael-desktop Anki[28415]: Error reading events from display: Broken pipe