Pasting and editing large amounts of text in editor causes a segfault
nate@Sapphire-Desktop:~$ manuskript
Fatal Python error: Segmentation fault
Current thread 0x00007f6c4508fc00 (most recent call first):
File "/usr/share/manuskript/manuskript/main.py", line 239 in launch
File "/usr/share/manuskript/manuskript/main.py", line 295 in run
File "/usr/bin/manuskript", line 30 in <module>
Segmentation fault (core dumped)
nate@Sapphire-Desktop:~$
This appears to be caused by pasting a large amount (over 500 words at a time) into the editor. Once I do so, attempting to edit the text seems to cause a segmentation fault after a short delay.
I'm running Manuskript 0.12 on Ubuntu 21.10. I'm using the native .deb package as published in the Releases tab of this repository.
I have never witnessed this behaves. I copy complete scenes (between 200 up to 2000 Words), from manuskript to OpenOffice (I can't get LanguageTool get running under manuskript) and then back.
I use the actual dev tree of manuskript, under Ubuntu.
Regards
Maybe this is a bug caused by multi-threading and missing synchronization. At least this could explain why it might happen on only some machines regularly while others never encounter it.
This could also be a problem regarded to Qt... at least the lines in the stacktrace don't help much. So the segmentation fault seems to be caused outside of the python code, I assume.
I don't now why it's happening but I found a temporary solution. Just install all requirements in virtual environment and run Manuskript from it. I literally do not understand how it works - versions of libs in my venv and my system are the same. But in venv Manusckript don't fall in segfolt
UPD. Problem was reproduced on Linux kernels from 5.4 to 5.10. In all branches (develop and master)
I will run it in a debugger when I get the chance to see whether I can get a more in-depth stack trace than what it's giving me.
In my experience, Python code never segfaults, it will throw some sort of exception, so either this is a bug in CPython (unlikely) or it's not the Python that's causing it. But this is just speculation and I don't actually know for sure.
On Fri, 19 Nov 2021, 17:22 AnyKeyShik Rarity, @.***> wrote:
I don't now why it's happening but I found a temporary solution. Just install all requirements in virtual environment and run Manuskript from it. I literally do not understand how it works - versions of libs in my venv and my system is the same. But in venv Manusckript don't fall in segfolt
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/olivierkes/manuskript/issues/963#issuecomment-974567398, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ25MW3ZZEIA2WPJKZUGQKLUM3Z3ZANCNFSM5IIZMYVA .
Same problem here. Natively and in the flatpak and in the dev branch.
Similar solution worked for me as @AnyKeyShik proposed. I installed it using the Nix package via nix-env -i manuskript
It runs stable there.
@Ozymandias42 Just out of curiosity, can you check which version of Python the Nix package is using? Might be written in the logs. Maybe I could try to get the flatpak to adapt to the version fixing this as I assume this is a problem with either Python or another dependency we use.
@Ozymandias42 Just out of curiosity, can you check which version of Python the Nix package is using? Might be written in the logs. Maybe I could try to get the flatpak to adapt to the version fixing this as I assume this is a problem with either Python or another dependency we use.
@TheJackiMonster Seems to be version 3.9.6
[nix-shell:~/manuskript]$ python --version
Python 3.9.6
[nix-shell:~/manuskript]$ which python
/nix/store/k0z9n599k02hab8qjjp3ljw065iwjcvg-python3-3.9.6/bin/python
