# Error copying data when editing a note field Anki 2.1.54

**URL:** <https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147>\
**Category:** Help\
**Created:** [September 15, 2022, 12:59am UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147 "2022-09-15T00:59:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![origamilife](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@origamilife](https://forums.ankiweb.net/u/origamilife)\
**Post date:** [September 15, 2022, 12:59am UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/1 "2022-09-15T00:59:07Z")

</div>

Error copying data when editing a note field Anki 2.1.54

I’m getting an error window popping up when I copy text from a note field while editing a note. The error text is:

==============  
Error  
An error occurred. Please use Tools \> Check Database to see if that fixes the problem.  
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.  
Anki 2.1.54 (b6a7760c) Python 3.9.10 Qt 6.3.1 PyQt 6.3.1  
Platform: Linux  
Flags: frz=True ao=False sv=2  
Add-ons, last update check: 2022-09-07 18:21:06

# Caught exception: Traceback (most recent call last): File “aqt.progress”, line 118, in handler File “aqt.editor”, line 1349, in RuntimeError: wrapped C/C++ object of type QMimeData has been deleted

Steps to recreate error (Case 1):

1. Select BROWSE from the top menu.
2. Select a note to edit.
3. Highlight some or all text in a note field.
4. Copy text to clipboard. (Use keyboard shortcut CRTL+c or select COPY from right-clicked popup menu.)  
Error window pops up.

Steps to recreate error (Case 2):  
1.Select a deck to review.  
2. Begin review.  
3. While reviewing a card, select EDIT button on the lower left corner.  
4. In popup window, highlight some or all text in a note field.  
5. Copy text to clipboard. (Use keyboard shortcut CRTL+c or select COPY from right-clicked popup menu.)  
Error window pops up.

In both cases, even though the error window pops up, the selected text has been placed in the clipboard and may be successfully pasted after the error window has been closed.

Additional information about the error:

1. This is occurring on a Chromebook (Intel 64 bit CPU) running Anki desktop in the Linux Beta (Crostini) Debian 11 Bullseye environment. I CANNOT duplicate the error on my PC laptop (Intel 64 bit CPU) running Debian 11 Bullseye. Copy/paste works fine on that machine. Both machines are running Anki 2.1.54.

2. Error window does not pop up 100% of the time on the Chromebook. Sometimes, but not always, the first attempt after a reboot will complete without the error window popping up.

3. Copy/paste used to work without error on Anki 2.1.49. I’m only getting the error after upgrading to 2.1.54.

4. I can copy text, without getting the error, from a CARD REVIEW screen or from the PREVIEW screen while browsing.

5. I’ve not loaded any add-ons to either of my Anki installs.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [September 15, 2022, 3:29am UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/2 "2022-09-15T03:29:30Z")

</div>

Please let me know if the issue persists when the first 2.1.55 beta comes out.

---

<div class="post-metadata">

**Author:** ![origamilife](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@origamilife](https://forums.ankiweb.net/u/origamilife)\
**Post date:** [September 30, 2022, 11:58pm UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/3 "2022-09-30T23:58:23Z")

</div>

I downloaded and untar’ed 55 beta 1. I did not do a permanent install, but simply ran Anki from the folder created by the tar command. Below is the output to the terminal window with comments (indicated by ##) when I did something.

## cd’ed to anki55 folder

## entered ./anki

x@penguin:~/anki-2.1.55-linux-qt6$ ./anki  
Anki starting…  
Initial setup…  
Running with temporary Qt5 compatibility shims.  
Run with DISABLE\_QT5\_COMPAT=1 to confirm compatibility with Qt6.  
Preparing to run…  
Wayland support is disabled by default due to bugs:

## Disabling the http link that AnkiForum refuses to accept.

h_t_t_p_s://github.com/ankitects/anki/issues/1767  
You can force it on with an env var: ANKI\_WAYLAND=1  
Command ‘dbus-send --session --print-reply=literal --reply-timeout=1000 --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:‘org.freedesktop.appearance’ string:‘color-scheme’’ returned non-zero exit status 1.  
Qt info:

GL Type: desktop  
Surface Type: OpenGL  
Surface Profile: NoProfile  
Surface Version: 3.1  
QSG RHI Backend: OpenGL  
Using Supported QSG Backend: yes  
Using Software Dynamic GL: no  
Using Multithreaded OpenGL: yes

Init Parameters:

- application-name Anki
- browser-subprocess-path /home/x/anki-2.1.55-linux-qt6/lib/PyQt6/Qt6/libexec/QtWebEngineProcess
- disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
- disable-setuid-sandbox
- disable-speech-api
- enable-features NetworkServiceInProcess,TracingServiceInProcess
- enable-threaded-compositing
- enable-use-zoom-for-dsf false
- in-process-gpu
- use-gl desktop

Starting main loop…  
mpv not found, reverting to mplayer

## Opened a BROWSE window.

## Highlighted some text in the first record displayed.

## Copied text to clipboard.

## Pasted text to another field in the same record.

## So far, so good.

## Attempted to repeat the process.

## Highlighted some text.

## Copied text to clipboard.

Qt warning: QXcbClipboard: Selection request should be caught before

## Pasted text to another field in the same record.

Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Qt warning: QXcbClipboard: Selection request should be caught before  
Segmentation fault (core dumped)

## Anki has crashed.

Without rebooting the Chromebook, I restarted Anki, repeated the steps as above and got similar results.

After restarting Anki again, I tried to repeat the steps as above. This time I was not able to complete a cut/paste. The Qt warning appeared once when I first copied to the clipboard. When I tried to paste, their were no Qt warnings. ‘Segmentation fault (core dumped)’ appeared immediately after and Anki again crashed.

I should add that, unlike Anki54, there were no popup windows with error messages. Just messages in the terminal window.

Better luck next time!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [October 3, 2022, 4:07am UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/4 "2022-10-03T04:07:14Z")

</div>

I suspect the issue lies in \_flagAnkiText(), though I’m not sure whether the code is doing something wrong or whether it’s triggering a Qt bug. If you’re able to build Anki from source, you could try varying the 10ms delay to something else to see if it makes a difference.

---

<div class="post-metadata">

**Author:** ![origamilife](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@origamilife](https://forums.ankiweb.net/u/origamilife)\
**Post date:** [October 3, 2022, 9:50pm UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/5 "2022-10-03T21:50:38Z")

</div>

Unfortunately, building from source code is a skill which I’ve not mastered, yet. But your mention of a Qt bug, prompted me to go back and try the Qt5 versions of Anki54 and Anki55. Each produced similar errors to its Qt6 sibling. It seems, to me, that if the bug is in Qt, then it is in Qt5 and Qt6.

Sorry I can’t be more help.

---

<div class="post-metadata">

**Author:** ![Nostalgia](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@Nostalgia](https://forums.ankiweb.net/u/Nostalgia)\
**Post date:** [March 13, 2023, 12:12pm UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/6 "2023-03-13T12:12:55Z")

</div>

Sadly this exact issue persists for me, also on a Chromebook. Funnily enough, copy and paste works just fine within this add-on (htps://ankiweb.net/shared/info/1781298089)(one t of the https is missing). I can even copy text from the windows of said add-on and then paste them into an Anki field, that works just fine. Just trying to copy and paste within Anki seems to crash it.

---

<div class="post-metadata">

**Author:** ![Nostalgia](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@Nostalgia](https://forums.ankiweb.net/u/Nostalgia)\
**Post date:** [March 16, 2023, 6:44pm UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/7 "2023-03-16T18:44:54Z")

</div>

For now I’ll just downgrade to 2.1.49, hopefully this won’t be a problem anymore in some future version one day.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 3:29am UTC](https://forums.ankiweb.net/t/error-copying-data-when-editing-a-note-field-anki-2-1-54/23147/8 "2023-05-01T03:29:38Z")

</div>


