NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 902 - java.io.IOException: io.scif.FormatException: Invalid TIFF file
java.io.IOException: io.scif.FormatException: Invalid TIFF file
Status: NEW
Product: ImageJ
Classification: Unclassified
Component: SCIFIO
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2014-08-14 16:40 CDT by swee
Modified: 2015-04-06 15:49 CDT
4 users (show)

See Also:


Attachments
this is the script which used to work in IJ1-fiji but now throws exception (1.57 KB, text/x-csrc)
2014-08-14 16:42 CDT, swee
here is a sample containing the files in the folder structure for which the script was writen for (677.80 KB, application/x-zip-compressed)
2014-08-14 17:39 CDT, swee

Description swee 2014-08-14 16:40:23 CDT
Running an imageJ script which uses the function:
run("Image Sequence...", "open=["someTifFile"] number="+numofPics+" starting=1 increment=1 scale=100 file=BF sort");

which used to work in the IJ1-Fiji version now throws this exception:

(Fiji Is Just) ImageJ 2.0.0-rc-13/1.49e; Java 1.6.0_24 [64-bit]; Windows 7 6.1; 213MB of 9189MB (2%)
 
java.io.IOException: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file 	at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:273) 	at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:250) 	at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:78) 	at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50) 	at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:136) 	at net.imagej.legacy.DefaultLegacyHooks.interceptOpenImage(DefaultLegacyHooks.java:335) 	at ij.plugin.FolderOpener.run(FolderOpener.java:190) 	at ij.IJ.runPlugIn(IJ.java:172) 	at ij.Executer.runCommand(Executer.java:131) 	at ij.Executer.run(Executer.java:64) 	at ij.IJ.run(IJ.java:272) 	at ij.macro.Functions.doRun(Functions.java:591) 	at ij.macro.Functions.doFunction(Functions.java:89) 	at ij.macro.Interpreter.doStatement(Interpreter.java:227) 	at ij.macro.Interpreter.doBlock(Interpreter.java:599) 	at ij.macro.Interpreter.doStatement(Interpreter.java:269) 	at ij.macro.Interpreter.doIf(Interpreter.java:957) 	at ij.macro.Interpreter.doStatement(Interpreter.java:245) 	at ij.macro.Interpreter.doBlock(Interpreter.java:599) 	at ij.macro.Interpreter.doStatement(Interpreter.java:269) 	at ij.macro.Interpreter.doFor(Interpreter.java:526) 	at ij.macro.Interpreter.doStatement(Interpreter.java:251) 	at ij.macro.Interpreter.doStatements(Interpreter.java:215) 	at ij.macro.Interpreter.run(Interpreter.java:112) 	at ij.macro.Interpreter.run(Interpreter.java:82) 	at ij.macro.Interpreter.run(Interpreter.java:93) 	at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:153) 	at ij.IJ.runMacro(IJ.java:119) 	at ij.IJ.runMacro(IJ.java:108) 	at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:783) 	at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116) 	at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:156) 	at org.scijava.script.ScriptModule.run(ScriptModule.java:175) 	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167) 	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126) 	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65) 	at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:164) 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 	at java.util.concurrent.FutureTask.run(FutureTask.java:138) 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 	at java.lang.Thread.run(Thread.java:662) Caused by: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file 	at io.scif.img.ImgOpener.createReader(ImgOpener.java:551) 	at io.scif.img.ImgOpener.openImgs(ImgOpener.java:144) 	at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:266) 	... 41 more Caused by: java.io.IOException: io.scif.FormatException: Invalid TIFF file 	at io.scif.AbstractReader.setSource(AbstractReader.java:274) 	at io.scif.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:90) 	at io.scif.img.ImgOpener.createReader(ImgOpener.java:542) 	... 43 more Caused by: io.scif.FormatException: Invalid TIFF file 	at io.scif.formats.MinimalTIFFFormat$Parser.typedParse(MinimalTIFFFormat.java:412) 	at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:867) 	at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:849) 	at io.scif.AbstractParser.parse(AbstractParser.java:252) 	at io.scif.AbstractParser.parse(AbstractParser.java:335) 	at io.scif.AbstractParser.parse(AbstractParser.java:52) 	at io.scif.AbstractReader.setSource(AbstractReader.java:270) 	... 45 more

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: CHECK_TURNED_OFF

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Users\sweel\Desktop\FIJI-W~1\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Users\sweel\Desktop\FIJI-W~1\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140814090445)
Fiji: http://fiji.sc/update/ (last check:20140813115223)

Files not up-to-date:
  ba8c13c5 (LOCAL_ONLY) 20140716220023 macros/StartupMacros.ijm
  d78d6380 (LOCAL_ONLY) 20140625032732 macros/StartupMacrosold.ijm
Comment 1 swee 2014-08-14 16:42:24 CDT
Created attachment 196
this is the script which used to work in IJ1-fiji but now throws exception
Comment 2 Curtis Rueden 2014-08-14 16:48:26 CDT
Please try disabling the "Use SCIFIO when opening files" option under Edit > Options > ImageJ2...
Comment 3 swee 2014-08-14 17:25:40 CDT
Yes, disabling scifio seems to  fix the problem, is scifio essential for anything?
Comment 4 swee 2014-08-14 17:39:16 CDT
Created attachment 197
here is a sample containing the files in the folder structure for which the script was writen for
Comment 5 Mark Hiner 2014-08-18 13:54:16 CDT
The SCIFIO enabled/disabled toggle just selects if it's the default used for opening images, e.g. via "File > Open" or drag and drop.

You can still use it to open data via the "File > Import > Image..." command. 

Thanks for the bug report and sample data!