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 418 - run("Clear Results"); command blocks subsequent roiManager("measure") command on Mac OS X
run("Clear Results"); command blocks subsequent roiManager("measure") command...
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Other
unspecified
Macintosh Mac OS
: P2 normal
Assigned To: wdv
Depends on:
Blocks:
 
Reported: 2012-04-03 21:10 CDT by wdv
Modified: 2012-05-12 06:32 CDT
0 users

See Also:

Description wdv 2012-04-03 21:10:55 CDT
OS: Mac Os X 10.6.8 Snow Leopard, 4Gb
Fiji most recent version (April 3, 2012)
ImageJ version 1.46j
java 1.6.0_29 64-bit

I seem to have encountered a FIJI specific macro problem. When I want to run a quick re-measurement of a ROIset, I use the following code:

>>
setBatchMode(true);
newImage("test","8-bit black",512,512,1);id=getImageID;
roiManager("measure");
selectImage(id);close;
setBatchMode(false);
<<

However, when I want to do this in an automated fashion and assure the results table is empty and will not be appended, I run into trouble when using the run("Clear Results"); command 

>>
setBatchMode(true);
run("Clear Results");
newImage("test","8-bit black",512,512,1);id=getImageID;
roiManager("measure");
selectImage(id);close;
setBatchMode(false);
<<

The results table stays empty (if it is open) and the Fiji status bar says the test image is locked.
The script editor returns the following error:

Started Macro.ijm at Tue Apr 03 12:05:27 CEST 2012
java.lang.NullPointerException: null
	 at ij.plugin.filter.Analyzer.saveResults(Analyzer.java:409)
	 at ij.plugin.filter.Analyzer.measure(Analyzer.java:241)
	 at ij.plugin.filter.Analyzer.run(Analyzer.java:88)
	 at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:256)
	 at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:105)
	 at ij.IJ.runPlugIn(IJ.java:158)
	 at sun.reflect.GeneratedMethodAccessor9.invoke(null:-1)
	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	 at java.lang.reflect.Method.invoke(Method.java:597)
	 at ij.Command.runPlugIn(Command.java:146)
	 at ij.Command.runCommand(Command.java:95)
	 at ij.Executer.run(Executer.java:64)
	 at ij.IJ.run(IJ.java:249)
	 at ij.IJ.run(IJ.java:227)
	 at ij.plugin.frame.RoiManager.measure(RoiManager.java:786)
	 at ij.plugin.frame.RoiManager.runCommand(RoiManager.java:1594)
	 at ij.macro.Functions.roiManager(Functions.java:2400)
	 at ij.macro.Functions.getFunctionValue(Functions.java:215)
	 at ij.macro.Interpreter.getFactor(Interpreter.java:1296)
	 at ij.macro.Interpreter.getTerm(Interpreter.java:1267)
	 at ij.macro.Interpreter.getStringExpression(Interpreter.java:1403)
	 at ij.macro.Interpreter.getStringTerm(Interpreter.java:1226)
	 at ij.macro.Interpreter.getString(Interpreter.java:1183)
	 at ij.macro.Interpreter.doStatement(Interpreter.java:259)
	 at ij.macro.Interpreter.doStatements(Interpreter.java:202)
	 at ij.macro.Interpreter.run(Interpreter.java:103)
	 at ij.macro.Interpreter.run(Interpreter.java:73)
	 at CLI.Refresh_Macros.runScript(Refresh_Macros.java:56)
	 at common.RefreshScripts.runScript(RefreshScripts.java:325)
	 at fiji.scripting.TextEditor$Tab$6.execute(TextEditor.java:1216)
	 at fiji.scripting.TextEditor$Executer$1.run(TextEditor.java:1776)

Thanks in advance,
Best
W
Comment 1 Johannes Schindelin 2012-04-20 22:43:20 CDT
Winnok, have you tested with the newest daily build? There was a work-around that might be working around your issue, too. If it does, please close this bug as fixed. Thanks!
Comment 2 Johannes Schindelin 2012-05-12 06:32:15 CDT
I guess it is fixed. Otherwise I am sure I would have heard back ;-)