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 1016 - ERROR java.lang.IllegalArgumentException
ERROR java.lang.IllegalArgumentException
Status: NEEDSINFO
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
Macintosh Mac OS
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2015-03-02 09:53 CST by Ojas Deshpande
Modified: 2015-03-02 10:13 CST
2 users (show)

See Also:

Description Ojas Deshpande 2015-03-02 09:53:12 CST
ERROR


(Fiji Is Just) ImageJ 2.0.0-rc-25/1.49m; Java 1.6.0_65 [64-bit]; Mac OS X 10.9.5; 37MB of 5991MB (<1%)
 
java.lang.IllegalArgumentException
	at java.nio.Buffer.position(Buffer.java:216)
	at io.scif.io.NIOFileHandle.buffer(NIOFileHandle.java:544)
	at io.scif.io.NIOFileHandle.seek(NIOFileHandle.java:246)
	at io.scif.io.RandomAccessInputStream.seek(RandomAccessInputStream.java:139)
	at io.scif.formats.tiff.TiffParser.getSamples(TiffParser.java:839)
	at io.scif.formats.tiff.TiffParser.getSamples(TiffParser.java:746)
	at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:627)
	at io.scif.formats.MinimalTIFFFormat$Reader.openPlane(MinimalTIFFFormat.java:537)
	at io.scif.AbstractReader.openPlane(AbstractReader.java:167)
	at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:170)
	at io.scif.filters.ChannelFiller.openPlane(ChannelFiller.java:151)
	at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:304)
	at io.scif.filters.PlaneSeparator.openPlane(PlaneSeparator.java:208)
	at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:225)
	at io.scif.filters.AbstractReaderFilter.openPlane(AbstractReaderFilter.java:191)
	at io.scif.img.ImgOpener.read(ImgOpener.java:805)
	at io.scif.img.ImgOpener.read(ImgOpener.java:771)
	at io.scif.img.ImgOpener.readPlanes(ImgOpener.java:758)
	at io.scif.img.ImgOpener.openImgs(ImgOpener.java:361)
	at io.scif.img.ImgOpener.openImgs(ImgOpener.java:257)
	at io.scif.img.ImgOpener.openImgs(ImgOpener.java:146)
	at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:123)
	at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:109)
	at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:75)
	at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
	at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:135)
	at net.imagej.legacy.DefaultLegacyHooks.interceptFileOpen(DefaultLegacyHooks.java:327)
	at ij.IJ.open(IJ.java)
	at ij.macro.Functions.open(Functions.java:2478)
	at ij.macro.Functions.doFunction(Functions.java:149)
	at ij.macro.Interpreter.doStatement(Interpreter.java:226)
	at ij.macro.Interpreter.doBlock(Interpreter.java:598)
	at ij.macro.Interpreter.doStatement(Interpreter.java:268)
	at ij.macro.Interpreter.doIf(Interpreter.java:956)
	at ij.macro.Interpreter.doStatement(Interpreter.java:244)
	at ij.macro.Interpreter.doBlock(Interpreter.java:598)
	at ij.macro.Interpreter.doStatement(Interpreter.java:268)
	at ij.macro.Interpreter.doFor(Interpreter.java:525)
	at ij.macro.Interpreter.doStatement(Interpreter.java:250)
	at ij.macro.Interpreter.doStatements(Interpreter.java:214)
	at ij.macro.Interpreter.run(Interpreter.java:111)
	at ij.macro.Interpreter.run(Interpreter.java:81)
	at ij.macro.Interpreter.run(Interpreter.java:92)
	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:794)
	at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116)
	at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:160)
	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:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:695)




MACRO
-----------------------------------
NoChannels= 2     // Define the no of channels
NoZStacks= 35     // Define the no of Z sections

// Define the directories
Input = getDirectory("/Users/odeshpande/Documents/20141218_foroptimisingmacro_20150112_63517 PM/");
Output = getDirectory("/Users/odeshpande/Documents/20141218_foroptimisingmacro_20150112_63517 PM/output/");

list_Input = getFileList(Input);

//hyperstack and spilt into individual channel files for each time point for every input image
for(i=0; i<list_Input.length; i++){
	if(endsWith(list_Input[i], ".tif")){
	open(Input+list_Input[i]);
			Title1 = getTitle();
            N = nSlices;				
            NoFrames = N/(NoChannels*NoZStacks);
           run("Stack to Hyperstack...", "order=xyczt(default) channels=NoChannels slices=NoZStacks   frames=NoFrames display=Color");
		   run("Split Channels");
			selectWindow("C1-"+Title1);
			Title2 = getTitle();
			saveAs("Tiff", Output+Title2+"_C1");
			selectWindow("C2-"+Title1);
			Title3 = getTitle();
			saveAs("Tiff", Output+Title3+"_C1");
			run("Close All");
	}				
	}

Information about your version of Java:

  os.arch => x86_64
  os.name => Mac OS X
  os.version => 10.9.5
  java.version => 1.6.0_65
  java.vendor => Apple Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_65-b14-462-11M4609
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 20.65-b04-462
  java.vm.vendor => Apple Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => apple.awt.CGraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => null
  file.separator => /

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: null
  imagej.dir => /Applications/Fiji.app

Information about the version of each plugin:

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

Files not up-to-date:
  200a30ac (MODIFIED) 20150302154002 Contents/Info.plist
  b6bf3817 (OBSOLETE_UNINSTALLED) 20141120053514 jars/edu_mines_jtk.jar
  25895ad6 (OBSOLETE_UNINSTALLED) 20141120053514 jars/imglib2-ops-2.0.0-beta-26.jar
  8c636e50 (OBSOLETE_UNINSTALLED) 20141120053514 jars/jai_codec.jar
  717dd8e0 (OBSOLETE_UNINSTALLED) 20141120053514 jars/jai_core.jar
  1ad3be0d (LOCAL_ONLY) 20141120053514 jars/jpedalSTD.jar
  a2677f69 (LOCAL_ONLY) 20150113191609 macros/BatchMacro.ijm
Comment 1 Curtis Rueden 2015-03-02 10:13:01 CST
Looks like a bug in the SCIFIO TIFF reader. You can avoid it by disabling "Use SCIFIO when opening files" in the Edit > Options > ImageJ2 menu.

To reproduce this problem, we would need a sample TIFF file which illustrates the issue.