olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.7k stars 226 forks source link

Manuskript 0.16.1 crashes after a while of being opened #1302

Open manito-manopla opened 3 weeks ago

manito-manopla commented 3 weeks ago

Every time I try to do something in manuskript, usually when I try to write, the program crashes. Here is the simple output and verbose of the terminal (I put the boxes there intentionally to cover the name of the document).

Simple.

Fatal Python error: Segmentation fault
Current thread 0xb7b4fc80 (most recent call first):
File "/usr/share/manuskript/manuskript/main.py", line 246 in launch
File "/usr/share/manuskript/manuskript/main.py", line 312 in run
File "/usr/bin/manuskript", line 30 in <module>
Segment violation

Verbose

CRITICAL> An unhandled exception has occurred!
Traceback (most recent call last):
File "/usr/share/manuskript/manuskript/mainWindow.py", line 1210, in saveDatas
r = loadSave.saveProject()  # version=0
File "/usr/share/manuskript/manuskript/loadSave.py", line 23, in saveProject
return v1.saveProject()
File "/usr/share/manuskript/manuskript/load_save/version_1.py", line 358, in saveProject
os.replace(oldPath, newPath)
OSError: [Errno 36] File name too long: '/home/user/Documents/writer/manuskript/███████████████/outline/0-New.md' 
-> '/home/user/Documents/writer/manuskript/███████████████/outline/0-Fatal_Python_error-
_Segmentation_fault____Current_thread_0xb7b4fc80_-most_recent_call_first--____File_--usr-share-manuskript-manuskript-
main-py--_line_246_in_launch____File_--usr-share-manuskript-manuskript-main-py--_line_312_in_run____File_--usr-bin-
manuskript--_line_30_in_-module-__Violaci-n_de_segmento.md'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/share/manuskript/manuskript/ui/views/textEditView.py", line 721, in focusOutEvent
self.submit()
File "/usr/share/manuskript/manuskript/ui/views/textEditView.py", line 330, in submit
self.updateTimer.stop()
RuntimeError: wrapped C/C++ object of type QTimer has been deleted

The above exception was the direct cause of the following exception:

SystemError: _PyEval_EvalFrameDefault returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'PyQt5.QtGui.QHideEvent'> returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3.9/logging/__init__.py", line 2129, in shutdown
for wr in reversed(handlerList[:]):
SystemError: <built-in method __reversed__ of list object at 0xa3c1f4a8> returned a result with an error set
TheJackiMonster commented 3 weeks ago

Okay, so it looks like it's throwing an error in Python OSError: [Errno 36] File name too long: [...] but the actual name of the file path contains output because of a segmentation fault.

So I assume the problem is not inside the code saving the project but somewhere else and the autosave is just accidentally obfuscating the error log. Weird but possible. ^^'

Technically for the rest it looks like the problem might be inside manuskript/ui/views/textEditView.py. Could be finally a segmentation fault that's not caused by some Qt theme.

manito-manopla commented 1 week ago

I disabled autosave, but the problem still persists