jamiemcg / Remarkable

Remarkable - The Markdown Editor for Linux http://remarkableapp.github.io
MIT License
1.97k stars 227 forks source link

Umlauts cause SIGSEGV through libhspell #222

Closed chrisnew closed 1 month ago

chrisnew commented 6 years ago

happens on Archlinux with remarkable-webkit2gtk provided as AUR.

$ pacaur -Qi remarkable-webkit2gtk 
Name            : remarkable-webkit2gtk
Version         : 1.87-3
…
$ pacaur -Qi python 
Name            : python
Version         : 3.6.3-1
…
$ pacaur -Qi hspell
Name            : hspell
Version         : 1.3-1
Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00007fffd71e1bd6 in hspell_check_word () from /usr/lib/libhspell.so.0
(gdb) bt
#0  0x00007fffd71e1bd6 in hspell_check_word () at /usr/lib/libhspell.so.0
#1  0x00007fffd73e9c86 in  () at /usr/lib/enchant/enchant_hspell.so
#2  0x00007ffff55401c8 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#3  0x00007ffff553fc2a in ffi_call () at /usr/lib/libffi.so.6
#4  0x00007fffd85ad33e in _ctypes_callproc () at /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#5  0x00007fffd85add85 in  () at /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#6  0x00007ffff7406d85 in _PyObject_FastCallDict () at /usr/lib/libpython3.6m.so.1.0
#7  0x00007ffff73c81be in  () at /usr/lib/libpython3.6m.so.1.0
#8  0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#9  0x00007ffff73c7a1b in  () at /usr/lib/libpython3.6m.so.1.0
#10 0x00007ffff73c814e in  () at /usr/lib/libpython3.6m.so.1.0
#11 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#12 0x00007ffff73c7a1b in  () at /usr/lib/libpython3.6m.so.1.0
#13 0x00007ffff73c814e in  () at /usr/lib/libpython3.6m.so.1.0
#14 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#15 0x00007ffff73c7a1b in  () at /usr/lib/libpython3.6m.so.1.0
#16 0x00007ffff73c814e in  () at /usr/lib/libpython3.6m.so.1.0
#17 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#18 0x00007ffff73ab2b4 in  () at /usr/lib/libpython3.6m.so.1.0
#19 0x00007ffff73c7c4f in  () at /usr/lib/libpython3.6m.so.1.0
#20 0x00007ffff73c814e in  () at /usr/lib/libpython3.6m.so.1.0
#21 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#22 0x00007ffff73c752b in _PyFunction_FastCallDict () at /usr/lib/libpython3.6m.so.1.0
#23 0x00007ffff7406f5f in _PyObject_FastCallDict () at /usr/lib/libpython3.6m.so.1.0
#24 0x00007ffff7407cd3 in _PyObject_Call_Prepend () at /usr/lib/libpython3.6m.so.1.0
#25 0x00007ffff7407dbb in PyObject_Call () at /usr/lib/libpython3.6m.so.1.0
#26 0x00007ffff5f56eaa in  () at /usr/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so
#27 0x00007ffff5a7e6f5 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#28 0x00007ffff5a91eff in  () at /usr/lib/libgobject-2.0.so.0
#29 0x00007ffff5a96696 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#30 0x00007ffff5a97920 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#31 0x00007fffdf9e5d7a in gtk_text_buffer_insert_interactive () at /usr/lib/libgtk-3.so.0
#32 0x00007fffdf9e5e45 in gtk_text_buffer_insert_interactive_at_cursor () at /usr/lib/libgtk-3.so.0
#33 0x00007fffdfa1223f in  () at /usr/lib/libgtk-3.so.0
#34 0x00007ffff5a7d6f5 in g_cclosure_marshal_VOID__STRINGv () at /usr/lib/libgobject-2.0.so.0
#35 0x00007ffff5a96c01 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#36 0x00007ffff5a9762c in g_signal_emit_by_name () at /usr/lib/libgobject-2.0.so.0
#37 0x00007ffff5a7d6f5 in g_cclosure_marshal_VOID__STRINGv () at /usr/lib/libgobject-2.0.so.0
#38 0x00007ffff5a96c01 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#39 0x00007ffff5a9762c in g_signal_emit_by_name () at /usr/lib/libgobject-2.0.so.0
#40 0x00007fffdf8f5f00 in  () at /usr/lib/libgtk-3.so.0
#41 0x00007fffdf8f6edb in  () at /usr/lib/libgtk-3.so.0
#42 0x00007fffdf8f8ff4 in  () at /usr/lib/libgtk-3.so.0
#43 0x00007fffdfa133ca in  () at /usr/lib/libgtk-3.so.0
#44 0x00007fffd62cb342 in  () at /usr/lib/libgtksourceview-3.0.so.1
#45 0x00007fffdf91a488 in  () at /usr/lib/libgtk-3.so.0
#46 0x00007ffff5a962c2 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#47 0x00007ffff5a97920 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#48 0x00007fffdfa6d9e5 in  () at /usr/lib/libgtk-3.so.0
#49 0x00007fffdfa8f214 in gtk_window_propagate_key_event () at /usr/lib/libgtk-3.so.0
---Type <return> to continue, or q <return> to quit---
#50 0x00007fffdfa92e5c in  () at /usr/lib/libgtk-3.so.0
#51 0x00007fffdf91a488 in  () at /usr/lib/libgtk-3.so.0
#52 0x00007ffff5a96c01 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#53 0x00007ffff5a97920 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#54 0x00007fffdfa6d9e5 in  () at /usr/lib/libgtk-3.so.0
#55 0x00007fffdf9172c2 in  () at /usr/lib/libgtk-3.so.0
#56 0x00007fffdf919443 in gtk_main_do_event () at /usr/lib/libgtk-3.so.0
#57 0x00007ffff2e709f6 in  () at /usr/lib/libgdk-3.so.0
#58 0x00007ffff2ecf475 in  () at /usr/lib/libgdk-3.so.0
#59 0x00007ffff57ae270 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#60 0x00007ffff57aff69 in  () at /usr/lib/libglib-2.0.so.0
#61 0x00007ffff57b0f42 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#62 0x00007fffdf91850f in gtk_main () at /usr/lib/libgtk-3.so.0
#63 0x00007ffff55401c8 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#64 0x00007ffff553fc2a in ffi_call () at /usr/lib/libffi.so.6
#65 0x00007ffff5f57b34 in  () at /usr/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so
#66 0x00007ffff5f597b8 in  () at /usr/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so
#67 0x00007ffff7406d85 in _PyObject_FastCallDict () at /usr/lib/libpython3.6m.so.1.0
#68 0x00007ffff73c81be in  () at /usr/lib/libpython3.6m.so.1.0
#69 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#70 0x00007ffff73c7a1b in  () at /usr/lib/libpython3.6m.so.1.0
#71 0x00007ffff73c814e in  () at /usr/lib/libpython3.6m.so.1.0
#72 0x00007ffff73adb9a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.6m.so.1.0
#73 0x00007ffff73ac1d8 in PyEval_EvalCodeEx () at /usr/lib/libpython3.6m.so.1.0
#74 0x00007ffff73ad06c in PyEval_EvalCode () at /usr/lib/libpython3.6m.so.1.0
#75 0x00007ffff748e2d4 in  () at /usr/lib/libpython3.6m.so.1.0
#76 0x00007ffff7490cc1 in PyRun_FileExFlags () at /usr/lib/libpython3.6m.so.1.0
#77 0x00007ffff7490ec4 in PyRun_SimpleFileExFlags () at /usr/lib/libpython3.6m.so.1.0
#78 0x00007ffff748d160 in Py_Main () at /usr/lib/libpython3.6m.so.1.0
#79 0x0000555555554c39 in main ()
chrisnew commented 6 years ago

would be nice to disable spellchecking somehow :)

joerg-krause commented 6 years ago

Happens with evolution on Arch Linux, too.

Thread 1 "evolution" received signal SIGSEGV, Segmentation fault.
0x00007fff1e56ebd6 in hspell_check_word () from /usr/lib/libhspell.so.0
(gdb) bt
#0  0x00007fff1e56ebd6 in hspell_check_word () at /usr/lib/libhspell.so.0
#1  0x00007fff1e776c86 in  () at /usr/lib/enchant/enchant_hspell.so
#2  0x00007ffff4a123b8 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#3  0x00007ffff4a124e8 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#4  0x00007ffff3d32dd0 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#5  0x00007ffff3d333c5 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#6  0x00007ffff3acfeb6 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#7  0x00007ffff3e46b2b in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#8  0x00007ffff3e42917 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#9  0x00007ffff3a2345f in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#10 0x00007ffff3b0e4d1 in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#11 0x00007ffff3a1f15d in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#12 0x00007ffff3a1f2ce in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#13 0x00007ffff3a1fc9c in  () at /usr/lib/libwebkit2gtk-4.0.so.37
#14 0x00007fffec0dedc4 in WTF::RunLoop::performWork() () at /usr/lib/libjavascriptcoregtk-4.0.so.18
#15 0x00007fffec1176aa in  () at /usr/lib/libjavascriptcoregtk-4.0.so.18
#16 0x00007ffff61610be in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#17 0x00007ffff6162f69 in  () at /usr/lib/libglib-2.0.so.0
#18 0x00007ffff6163f42 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#19 0x00007ffff6c4950f in gtk_main () at /usr/lib/libgtk-3.so.0
#20 0x000055555555786a in main ()
felixfontein commented 6 years ago

I'm getting the same crash with evolution as well:

Thread 1 "evolution" received signal SIGSEGV, Segmentation fault.
0x00007fffafdf8976 in hspell_check_word () from /usr/lib/libhspell.so.0
(gdb) bt
#0  0x00007fffafdf8976 in hspell_check_word () at /usr/lib/libhspell.so.0
#1  0x00007fffbd2c0ca6 in  () at /usr/lib/enchant/enchant_hspell.so
#2  0x00007ffff317fde2 in e_spell_dictionary_check_word () at /usr/lib/evolution/libevolution-util.so
#3  0x00007ffff317eb10 in e_spell_checker_check_word () at /usr/lib/evolution/libevolution-util.so
#4  0x00007ffff318162e in  () at /usr/lib/evolution/libevolution-util.so
[...]

I'd guess the problem isn't with evolution or Remarkable, but with enchant (or hspell).

felixfontein commented 6 years ago

I played around this a bit. Turned out, the spellcheck language in evolution was set to Hebrew (for whatever reason). Also, I wrote a little test program feeding a string containing "ä" (UTF-8) to enchant; if the language is set to "he" (for Hebrew), I get a core-dump as well.

After changing the spellcheck language in evolution to something else (like English), I was again able to enter umlauts without crashes.

koutheir commented 6 years ago

I had the same issue in a reproducible fashion: starting Remarkable and typing ü+{Enter} crashes the process. I solved the issue by: sudo pacman -S hunspell-de hunspell-en hunspell-en_US hunspell-fr