Vocab-Apps / anki-language-tools

Anki Language Tools addon
GNU General Public License v3.0
6 stars 0 forks source link

Segfault #105

Closed tassa-yoniso-manasi-karoto closed 2 months ago

tassa-yoniso-manasi-karoto commented 3 months ago

I initially thought this was bug in the anki flatpak package. Here is the copy pasted report I had posted on their issue tracker:


[The bug] occurs when translating / generating audio for a large batch of notes. Once all of the translations for the fields have been loaded, Anki will just crash with no warning popup, nothing logged in console when running from console.

The bug appeared about 2 month ago. It also affects HyperTTS but it doesn't matter because hypertts adds the content on the fly whereas with lang tool when a crash occurs, everything fetched is lost.I was using only google translate each time.

Here is the outcome I have just had with various amount of note & releases:

Flatpak Anki 24.04.1 Python 3.9.18 Qt 6.6.2 PyQt 6.6.1 94 OK 146 CRASH

dmesg: [117315.267533] anki[9084]: segfault at e1 ip 00000000000000e1 sp 00007ffd3c880c58 error 14 in anki[55c759d1c000+19a000] likely on CPU 2 (core 2, socket 0)
dmesg: [117315.267576] Code: Unable to access opcode bytes at 0xb7.

110 OK 125 OK 135 OK 92 OK 146 CRASH (different set than the prev 146 notes)

dmesg: [123020.467452] traps: anki[13671] general protection fault ip:7fbb161b6813 sp:7ffee73f3af8 error:0 in libQt6Gui.so.6[7fbb1611a000+6f3000]

As I said the bug wasn't there just ~2 month ago so I tried an old build: Official Anki 23.12.1-linux-qt6 146 OK (the same set which had just crashed)

Official Anki 24.06.2-linux-qt6 Python 3.9.18 Qt 6.6.2 PyQt 6.6.1 146 OK (the same set which had just crashed) 369 OK ~78 CRASH

dmesg: [137272.239537] anki[10799]: segfault at 561000000119 ip 00007f82943b6813 sp 00007ffe3d3fd138 error 4 in libQt6Gui.so.6[7f829431a000+6f3000] likely on CPU 0 (core 0, socket 0)
dmesg: [137272.239559] Code: 00 75 14 48 8b 00 48 89 ee 5d 48 8b 80 28 01 00 00 ff e0 0f 1f 40 00 31 c0 5d c3 0f 1f 40 00 31 c0 c3 90 0f 1f 40 00 48 8b 07 <ff> a0 18 01 00 00 90 66 0f 1f 44 00 00 48 8b 47 18 48 85 c0 0f 84

Reproduced in the official bug → this is indeed a bug related to the addon

tassa-yoniso-manasi-karoto commented 3 months ago

Another one on processing ~500 notes with HyperTTS with lastest official build

[165023.247122] anki[31103]: segfault at 0 ip 0000000000000000 sp 00007ffe8f16acc8 error 14 in anki[55c85c0d6000+19a000] likely on CPU 2 (core 2, socket 0)
[165023.247145] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
tassa-yoniso-manasi-karoto commented 3 months ago

pinging @dae too, although this occurs only when using the addons I can't tell if this is also relevant to Anki itself or how it is build.

luc-vocab commented 3 months ago

Which Linux distribution are you using? In case it matters. In my experience crashes in the past have happened due to making gui changes on the wrong thread, I'll have to look into it.

tassa-yoniso-manasi-karoto commented 3 months ago

Voidlinux 6.6.32_1

tassa-yoniso-manasi-karoto commented 2 months ago

Seems gone as of anki 24.06.3, hypertts 1.11.1 , langtools 3.33.

luc-vocab commented 2 months ago

OK thank you for the update.