grishkam / QuickFigures

QuickFigures is a toolset for creating scientific figures see publication for details
Other
33 stars 6 forks source link

cannot open saved .ser file #5

Open jwrth opened 2 years ago

jwrth commented 2 years ago

Hello,

I somehow cannot open a previously saved .ser file. I always get following message in the "QuickFigures Messages" window and nothing happens:


java.io.EOFException
java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:3104)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2274)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:561)
appContextforIJ1.ImagePlusMultiChannelSlot.readObject(ImagePlusMultiChannelSlot.java:686)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1158)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2176)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
java.util.ArrayList.readObject(ArrayList.java:797)
sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1158)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2176)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
java.util.ArrayList.readObject(ArrayList.java:797)
sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1158)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2176)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
imageDisplayApp.ImageDisplayIO.readFromFile(ImageDisplayIO.java:51)
imageDisplayApp.ImageDisplayIO.showFile(ImageDisplayIO.java:116)
basicMenusForApp.OpeningFileDropHandler.performsingleFileAction(OpeningFileDropHandler.java:41)
basicMenusForApp.FileDropHandler.drop(FileDropHandler.java:61)
java.awt.dnd.DropTarget.drop(DropTarget.java:455)
sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:538)
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:852)
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:776)
sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
java.awt.Component.dispatchEventImpl(Component.java:4744)
java.awt.Container.dispatchEventImpl(Container.java:2297)
java.awt.Window.dispatchEventImpl(Window.java:2746)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
java.awt.EventQueue$4.run(EventQueue.java:733)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Thanks a lot for any help in advance!

grishkam commented 2 years ago

There are a few possible explanations. Please let me know which makes sense in your circumstances.

1) You might be using the wrong menu item (go to "File>Open>Saved Worksheet") in the QuickFigures menu bar).

2) You saved it with an older version of QuickFigures (not compatible).

3) Perhaps a single object within your figure wont save correctly. That effects the entire file. In that case, I can work on fixing this issue for files saved in the future but there is probably no way to rescue the file you already have.

jwrth commented 2 years ago

Thanks for your reply! I did use "File>Open>Saved Worksheet and I saved and opened it with the same QuickFigures version. I saved it, closed the worksheet, and directly tried to open it again. Would be great if you find a solution to fix this for the future! Thanks a lot!

grishkam commented 2 years ago

I have been working on this. However there seems to be no problem saving/opening when I try to do it. Perhaps QuickFigures is only having trouble with one kind of object or object modification. It would help me to know what is in your figure (screenshot or description would help a lot).

jonrot1906 commented 1 year ago

Hey guys, actually this problem still occurs for me when using .oif or .oib files (which tend to be very big). I can already see from the size of the .ser file, that saving didn't work as it should. Unfortunately, there are no error messages printed. Did you find any workaround already? Greetings!

grishkam commented 1 year ago

I have never tested QuickFigures with .oif or .oib files (I don't have any). I will try to get some example .oif/.oib files and work on figuring out what the problem may be. If it is a size issue, you may try to open the images in FIJI, crop them and save as tiff. Although inconvenient, this method could be used until I fix the issue (and would determine if the issue is the file size).

grishkam commented 1 year ago

I have obtained an .oib file and I am working on fixing the problem (might take time). If one tries to save a second/third time (after 1-2 failed save attempts), it will save successfully. Despite the inconvenience, you should still be able to save your figures.

grishkam commented 1 year ago

I now have worksheet saving working again. You may update QuickFigures and the problem should be resolved. Let me know if this issue reoccurs.

jonrot1906 commented 1 year ago

@grishkam Thanks a lot for your generous and quick help! I will try it out! :-)