Login  Register

Re: Saving Virtual Stack as .avi causes Exception

Posted by Ingo Bartholomaeus on Nov 20, 2009; 11:12am
URL: http://imagej.273.s1.nabble.com/Saving-Virtual-Stack-as-avi-causes-Exception-tp3690396p3690399.html

My previous posting was a little misleading: The error ONLY occurred if I try to overwrite the source file. This however is not really surprising as the data type is "virtual stack". But it would be better if ImageJ did not damage the source file, but instead converts the virtual to a normal stack upon saving, in case the user wants to overwrite the source file.

Ingo


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Ingo Bartholomaeus
Sent: Freitag, 20. November 2009 11:57
To: [hidden email]
Subject: Saving Virtual Stack as .avi causes Exception

Dear all,

I get error messages upon attempting to save virtual stacks as .avi files. Furthermore, ImageJ already started to write the file when the exception occurs, what irretrievably damages the source file, if you had decided to overwrite it.

This is the error message:

#################

java.lang.RuntimeException: An error occurred reading the file.

Frame ended prematurely after 2052 bytes
                at ij.plugin.AVI_Reader.getProcessor(AVI_Reader.java:304)
                at ij.plugin.filter.AVI_Writer.writeImage(AVI_Writer.java:278)
                at ij.plugin.filter.AVI_Writer.run(AVI_Writer.java:72)
                at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:247)
                at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
                at ij.IJ.runPlugIn(IJ.java:155)
                at ij.Executer.runCommand(Executer.java:122)
                at ij.Executer.run(Executer.java:59)
                at java.lang.Thread.run(Thread.java:619)

#################

The error occurred with Java Versions: 1.6.0_10 (32-bit) and 1.6.0_12 (64-bit) and with ImageJ 1.43Lx and also with older versions. OS were Windows XP 64bit SP2 and XP 32bit SP3

Best regards,
Ingo