Issue in Opening Image

Hello everyone,
I am receiving an error message and I cannot open some images in a QuPath project. Do you know what the issue is?
Thank you
Caner

23:59:29.394 [qupathgui-1] [INFO ] qupath.lib.gui.QuPathGUI - Current version 0.2.3, latest stable release 0.2.3 - nothing to update
23:59:31.956 [JavaFX Application Thread] [ERROR] qupath.lib.io.PathIO - Reached end of file...
java.io.EOFException
        at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.base/java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at qupath.lib.objects.PathROIObject.readExternal(PathROIObject.java:202)
        at qupath.lib.objects.PathCellObject.readExternal(PathCellObject.java:93)
        at java.base/java.io.ObjectInputStream.readExternalData(Unknown Source)
        at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at qupath.lib.objects.PathObject.readExternal(PathObject.java:870)
        at java.base/java.io.ObjectInputStream.readExternalData(Unknown Source)
        at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.base/java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
        at qupath.lib.io.PathIO.readImageDataSerialized(PathIO.java:145)
        at qupath.lib.io.PathIO.readImageData(PathIO.java:278)
        at qupath.lib.projects.DefaultProject$DefaultProjectImageEntry.readImageData(DefaultProject.java:729)
        at qupath.lib.gui.QuPathGUI.openImageEntry(QuPathGUI.java:2695)
        at qupath.lib.gui.QuPathApp.start(QuPathApp.java:79)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Unknown Source)
23:59:31.989 [JavaFX Application Thread] [ERROR] qupath.lib.gui.dialogs.Dialogs - Load ImageData: QuPath has encountered a problem, sorry.
If you can replicate it, please report it with 'Help -> Report bug (web)'.

java.lang.NullPointerException
23:59:32.409 [JavaFX Application Thread] [ERROR] qupath.lib.gui.dialogs.Dialogs - Load ImageData
java.lang.NullPointerException: null
        at qupath.lib.objects.hierarchy.PathObjectHierarchy.setHierarchy(PathObjectHierarchy.java:769)
        at qupath.lib.io.PathIO.readImageDataSerialized(PathIO.java:203)
        at qupath.lib.io.PathIO.readImageData(PathIO.java:278)
        at qupath.lib.projects.DefaultProject$DefaultProjectImageEntry.readImageData(DefaultProject.java:729)
        at qupath.lib.gui.QuPathGUI.openImageEntry(QuPathGUI.java:2695)
        at qupath.lib.gui.QuPathApp.start(QuPathApp.java:79)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Unknown Source)

Do the same images open using other software - the software they were originally created with, or BioFormats in FIJI?

I really have no idea, but it looks like the file might be corrupted or incompletely copied.

Uploading the image to something like GoogleDrive and sharing a link to see if other people get the same error also might help identify the problem.

Thank you for your answer.

There is no issue with the image file. I can open it even in QuPath without any issue.
But your answer alerted me that I did not check the project entry data. And it was the corrupted one.

I found out that there was 10 times file size difference between data.qpdata and data.qpdata.bkp files. Probably something went wrong with the last script. I recovered with the backup file and it is working well now.

1 Like

Ah, good call! As I recall there is a hard character size limit on the qpdata files. If you are running into that it helps to remove unneeded measurements.

Thank you for the recommendation. I did not know this. Probably it caused the issue. I will check it.