Exception when using a macro script with 1.52u version

Hi folks,

I just updated Fiji software with imagej v 1.52u. In the previous version 1.52p, it was able to run my script without exception, but in the 1.52u it displays the next exception:

(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52u; Java 1.8.0_202 [64-bit]; Mac OS X 10.14.6; 229MB of 4558MB (5%)
 
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at ij.measure.ResultsTable.deleteRow(ResultsTable.java:853)
	at ij.measure.ResultsTable.deleteRows(ResultsTable.java:866)
	at ij.macro.Functions.deleteRows(Functions.java:7067)
	at ij.macro.Functions.doTable(Functions.java:6860)
	at ij.macro.Functions.getVariableFunction(Functions.java:312)
	at ij.macro.Interpreter.getFactor(Interpreter.java:1573)
	at ij.macro.Interpreter.getTerm(Interpreter.java:1530)
	at ij.macro.Interpreter.getStringExpression(Interpreter.java:1711)
	at ij.macro.Interpreter.getStringTerm(Interpreter.java:1454)
	at ij.macro.Interpreter.getString(Interpreter.java:1427)
	at ij.macro.Interpreter.doStatement(Interpreter.java:330)
	at ij.macro.Interpreter.doBlock(Interpreter.java:691)
	at ij.macro.Interpreter.doStatement(Interpreter.java:320)
	at ij.macro.Interpreter.doFor(Interpreter.java:613)
	at ij.macro.Interpreter.doStatement(Interpreter.java:302)
	at ij.macro.Interpreter.doBlock(Interpreter.java:691)
	at ij.macro.Interpreter.runFirstMacro(Interpreter.java:792)
	at ij.macro.Interpreter.doStatement(Interpreter.java:311)
	at ij.macro.Interpreter.doStatements(Interpreter.java:261)
	at ij.macro.Interpreter.run(Interpreter.java:157)
	at ij.macro.Interpreter.run(Interpreter.java:91)
	at ij.macro.Interpreter.run(Interpreter.java:102)
	at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:161)
	at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:145)
	at ij.plugin.Macro_Runner.run(Macro_Runner.java:39)
	at ij.IJ.runPlugIn(IJ.java:202)
	at ij.Executer.runCommand(Executer.java:150)
	at ij.Executer.run(Executer.java:68)
	at java.lang.Thread.run(Thread.java:748)

Also, when I use the macro editor in Fiji, sometimes crash (I need to quit it using Activity Monitor). Is all of this due to my code or the new version is not compatible with my Mac version (macOs Mojave v 10.14.6)?

Thanks.

All the best.

Luis

@Professor_OAT

Could you provide a minimal working example of your script that demo’s this error that you see? Then we can run it and see if the same error persists…

1 Like

This bug, with deleting rows in non-numeric tables, is fixed in the latest ImageJ daily build (1.52v13).

3 Likes

Dear @Wayne and @etadobson,

Finally, it was fixed updating to Imagej 1.52v. Although when I use Threshold function, sometimes Fiji gets crash in this version.This is not happen with 1.52p version. Another question is: What does non-numeric tables mean?

Thanks a lot for your helping!

Luis

A non-numeric table is one that has at least one text entry (e.g. a file name) that’s not in the “Label” column.

2 Likes

Thanks a lot @Wayne !

1 Like