trakem2 / TrakEM2

ImageJ plugin for morphological data mining, 3D modeling and image stitching, registration, editing and annotation.
https://imagej.net/TrakEM2
GNU General Public License v3.0
30 stars 32 forks source link

corrupted XML project file #29

Open marcoaaz opened 3 years ago

marcoaaz commented 3 years ago

Hello, I have been working with TrakEM2 for a while. Today, I have had this error when saving the TrakEM2 projects and opening them with notepad (for verification).

<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE trakem2_anything [ <!ELEMENT trakem2 (project,t2_layer_set,t2_display)> <!ELEMENT project (anything)> <!ATTLIST project id NMTOKEN #REQUIRED> <!ATTLIST project unuid NMTOKEN #REQUIRED> <!ATTLIST project title NMTOKEN #REQUIRED> <!ATTLIST project preprocessor NMTOKEN #REQUIRED> <!ATTLIST project mipmaps_folder NMTOKEN #REQUIRED> <!ATTLIST project storage_folder NMTOKEN #REQUIRED> <!ELEMENT anything EMPTY> <!ATTLIST anything id NMTOKEN #REQUIRED> <!ATTLIST anything expanded NMTOKEN #REQUIRED> <!ELEMENT t2_layer (t2_patch,t2_label,t2_layer_set,t2_profile)> <!ATTLIST t2_layer oid NMTOKEN #REQUIRED> <!ATTLIST t2_layer thickness NMTOKEN #REQUIRED> <!ATTLIST t2_layer z NMTOKEN #REQUIRED> <!ELEMENT t2_layer_set (t2_prop,t2_linked_prop,t2_annot,t2_layer,t2_pipe,t2_ball,t2_area_list,t2_calibration,t2_stack,t2_treeline)> <!ATTLIST t2_layer_set oid NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set layer_id NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set transform NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set style NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set locked NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set visible NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set title NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set links NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set composite NMTOKEN #REQUIRED> <!ATTLIST t2_layer_set layer_width NMTOKEN #REQUIRED> ... And so on.. reading it as text. The body of the project looks fine but the header is clearly corrupted. In the log window of Fiji I get this:

Fatal error: column=135 line=321

ERROR:

org.xml.sax.SAXParseException; lineNumber: 321; columnNumber: 135; The entity name must immediately follow the '&' in the entity reference.

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at ini.trakem2.persistence.FSLoader.openFSProject(FSLoader.java:300)
at ini.trakem2.Project.openFSProject(Project.java:554)
at ini.trakem2.Project.openFSProject(Project.java:544)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at HandleExtraFileTypes.tryOpen(HandleExtraFileTypes.java:302)
at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:489)
at HandleExtraFileTypes.run(HandleExtraFileTypes.java:76)
at ij.IJ.runUserPlugIn(IJ.java:235)
at ij.IJ.runPlugIn(IJ.java:198)
at ij.IJ.runPlugIn(IJ.java:187)
at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:512)
at ij.io.Opener.openUsingHandleExtraFileTypes(Opener.java:369)
at ij.io.Opener.openImage(Opener.java:359)
at ij.io.Opener.openImage(Opener.java:243)
at ij.io.Opener.open(Opener.java:109)
at ij.io.Opener.openAndAddToRecent(Opener.java:292)
at ij.plugin.DragAndDrop.openFile(DragAndDrop.java:194)
at ij.plugin.DragAndDrop.run(DragAndDrop.java:160)
at java.lang.Thread.run(Thread.java:748)

==================

I hope you can help me and that this is not a new update. Thanks!.

Marco

imagesc-bot commented 3 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/error-when-reading-project-xml-files-from-trakem2-into-fiji/5278/4