manuskript icon indicating copy to clipboard operation
manuskript copied to clipboard

Repeated crashes for drag and drop

Open Vidyut opened this issue 4 years ago • 9 comments

Manuskript crashes if I try to reorder files/folders using drag and drop. Using latest release, latest Ubuntu, latest everything. All updates up to date.

I am not sure what is responsible, but some interesting lines in syslog were

Warning: There are some items with overlapping IDs: ['28', '30', '30', '28']

And

Aug 15 15:45:13 saaki manuskript.desktop[91875]: CRITICAL> An unhandled exception has occurred!
Aug 15 15:45:13 saaki manuskript.desktop[91875]: Traceback (most recent call last):
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "/usr/share/manuskript/manuskript/models/abstractModel.py", line 299, in canDropMimeData
Aug 15 15:45:13 saaki manuskript.desktop[91875]:     items = self.decodeMimeData(data)
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "/usr/share/manuskript/manuskript/models/abstractModel.py", line 347, in decodeMimeData
Aug 15 15:45:13 saaki manuskript.desktop[91875]:     item = outlineItem(xml=ET.tostring(child))
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "/usr/share/manuskript/manuskript/models/outlineItem.py", line 37, in __init__
Aug 15 15:45:13 saaki manuskript.desktop[91875]:     abstractItem.__init__(self, model, title, _type, xml, parent, ID)
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "/usr/share/manuskript/manuskript/models/abstractItem.py", line 45, in __init__
Aug 15 15:45:13 saaki manuskript.desktop[91875]:     self.setFromXML(xml)
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "/usr/share/manuskript/manuskript/models/abstractItem.py", line 306, in setFromXML
Aug 15 15:45:13 saaki manuskript.desktop[91875]:     root = ET.XML(xml)
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/etree.pyx", line 3214, in lxml.etree.XML
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 1764, in lxml.etree._parseDoc
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
Aug 15 15:45:13 saaki manuskript.desktop[91875]:   File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError

Vidyut avatar Aug 15 '21 10:08 Vidyut

It looks like there is an unhandled error in the code parsing XML which crashed Manuskript. I assume you use the 0.12.0 release?

TheJackiMonster avatar Aug 15 '21 11:08 TheJackiMonster

Yes. Using 0.12.0

Vidyut avatar Aug 15 '21 12:08 Vidyut

If it is any help, the drag and drop worked fine a few times too, then started crashing, then worked again a few times, and started crashing again. The app also crashes when adding attribute-value pairs to the characters.

Again, not always, but once it starts crashing for either drag/drop or the attribute-value, it will keep crashing if I try to do it. Editing other things in the project continues to work and the problem actions work correctly with a new project too. So, i am not a coder, but logically, it seems there is some error in how the project files are created/updated or how the software interacts with them in specific conditions.

Vidyut avatar Aug 15 '21 12:08 Vidyut

But this is a major problem, because scenes cannot be reorganized in the project.

Vidyut avatar Aug 15 '21 12:08 Vidyut

Did not know if it matters, but more information in case it is relevant. The crash happens in outline view as well as index cards and whether the drag and drop is attempted for the items in the list or index cards or the tree on the left. Same result for all. Crash. So whatever the problem is is likely not related to any individual view/location.

Vidyut avatar Aug 15 '21 12:08 Vidyut

The app also crashes when adding attribute-value pairs to the characters.

This is a problem which was reported multiple times previously and it was fixed for the next release.

The other parts seem to be a different problem and I'm not sure if it's only ID related for example. I'd recommend to try running Manuskript from source to see if the problems still occur.

If it is really related to file handling (load & save) this should get fixed in the future because I already started refactoring most parts of this. However it's likely to stay a problem until 0.14.0 if we don't get a quick workaround implemented since my refactored code isn't really compatible with the current codebase but more like a new implementation.

Anyway thanks for the amount of information. Maybe someone will fix this ealier than expected.

TheJackiMonster avatar Aug 15 '21 14:08 TheJackiMonster

just to say in case it helps, I can confirm this intermittent crash-on-drag+drop error in 0.12, which has happened to me several times tonight, the most recent log looking very similar to OP's report.

2021-08-29 20:49:56,189 - manuskript.logging - CRITICAL - An unhandled exception has occurred! Traceback (most recent call last): File "/usr/share/manuskript/manuskript/mainWindow.py", line 866, 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 264, in saveProject files.append(("revisions.xml", mdl.saveToXML())) File "/usr/share/manuskript/manuskript/models/abstractModel.py", line 550, in saveToXML root = ET.XML(self.rootItem.toXML()) File "src/lxml/etree.pyx", line 3214, in lxml.etree.XML File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument File "src/lxml/parser.pxi", line 1764, in lxml.etree._parseDoc File "src/lxml/parser.pxi", line 1127, in lxml.etree._BaseParser._parseDoc File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError File "", line 1 lxml.etree.XMLSyntaxError: internal error: Huge input lookup, line 1, column 12351122

queuingforsarnies avatar Aug 29 '21 12:08 queuingforsarnies

I am also having the same issue documented in this thread (and on #865) while I was editing a new file and configuring its labels. The exception is returned every time I am trying to open this specific file, but no problem working with other projects.

Manuskript 0.12.0 (Python 3.8.9)

  • PyQt 5.15.4 (compiled against Qt 5.15.2)
    • Qt 5.15.2 (runtime)
  • lxml.etree 4.6.3.0
    • libxml 2.9.5 (compiled: 2.9.5)
    • libxslt 1.1.30 (compiled: 1.1.30)
  • pyEnchant 3.2.0 (libenchant: 2.2.7)
  • pySpellChecker 0.6.2
  • Symspellpy 6.7.0
  • Markdown 3.3.4 ... There are some items with overlapping IDs: ['15', '15', '15'] WARNING> There are some items with overlapping IDs: ['15', '15', '15'] Project D:/FILES/50-Education/2021-Master/Classes/ENVR E-129A/Assignements/Template - Paper - ENVR E129a.msk loaded. An unhandled exception has occurred! Traceback (most recent call last): File "manuskript\ui\views\treeDelegates.py", line 30, in paint File "manuskript\functions_init_.py", line 223, in outlineItemColors AttributeError: 'NoneType' object has no attribute 'icon' CRITICAL> An unhandled exception has occurred! Traceback (most recent call last): File "manuskript\ui\views\treeDelegates.py", line 30, in paint File "manuskript\functions_init_.py", line 223, in outlineItemColors AttributeError: 'NoneType' object has no attribute 'icon' QPaintDevice: Cannot destroy paint device that is being painted WARNING> QPaintDevice: Cannot destroy paint device that is being painted

QuantumGrizzly avatar Oct 25 '21 23:10 QuantumGrizzly

Can anyone reproduce the issue in version 0.13.1? (or even in the current state from the develop branch running Manuskript from source?)

TheJackiMonster avatar May 16 '22 14:05 TheJackiMonster