bigdataviewer / bigdataviewer_fiji

Fiji plugins for starting BigDataViewer and exporting data.
GNU General Public License v3.0
21 stars 9 forks source link

Invalid byte 1 of 1-byte UTF-8 sequence error when opening hdf file #24

Closed jnahlers closed 2 years ago

jnahlers commented 2 years ago

Hi there, I am trying to open an hdf file (attached, zipped). I can open the file in HDFView, and using the "Load HDF5 File..." option in Fiji. However, if I try and open it with "Open XML/HDF5" from the BigDataViewer I get the following error. It seems it has something to do with an encoding?


(Fiji Is Just) ImageJ 2.3.0/1.53f51; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 161MB of 24257MB (<1%)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw exception

at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:307)

at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:166)

at ij.IJ.runPlugIn(IJ.java)

at ij.Executer.runCommand(Executer.java:150)

at ij.Executer.run(Executer.java:68)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Module threw exception

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:303)

... 5 more

Caused by: java.lang.RuntimeException: Module threw exception

at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)

at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)

at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

... 1 more

Caused by: java.lang.RuntimeException: mpicbg.spim.data.SpimDataIOException: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at bdv.ij.BigDataViewerPlugIn.run(BigDataViewerPlugIn.java:139)

at org.scijava.command.CommandModule.run(CommandModule.java:196)

at org.scijava.module.ModuleRunner.run(ModuleRunner.java:163)

at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)

... 6 more

Caused by: mpicbg.spim.data.SpimDataIOException: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at bdv.spimdata.XmlIoSpimDataMinimal.load(XmlIoSpimDataMinimal.java:75)

at bdv.BigDataViewer.open(BigDataViewer.java:505)

at bdv.ij.BigDataViewerPlugIn.run(BigDataViewerPlugIn.java:135)

... 9 more

Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)

at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)

at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)

at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)

at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:329)

at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1266)

at bdv.spimdata.XmlIoSpimDataMinimal.load(XmlIoSpimDataMinimal.java:71)

... 11 more

BG_Y0_BEFORE.zip

tpietzsch commented 2 years ago

"Open XML/HDF5" is for opening the XML file of a XML/HDF5 pair that was exported into the BigDataViewer format. (See https://imagej.net/plugins/bdv/#exporting-datasets-for-the-bigdataviewer). This cannot be used to open arbitrary HDF5 files. If using the "Load HDF5 File..." option in Fiji works, and you want to view the resulting stack in BigDataViewer, you can just load the stack and then use "Plugins > BigDataViewer > Open Current Image"