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 1266 - 'path' is required but is unset
'path' is required but is unset
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P4 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2016-05-02 15:41 CDT by awoaks
Modified: 2016-05-03 10:40 CDT
3 users (show)

See Also:

Description awoaks 2016-05-02 15:41:27 CDT
Run any macro that gives an error and has to stop.

For example, just run this with no image open:

title=getTitle();

Then try to open an image from the File:Open... (or Ctrl + O).

Always get:

'path' is required but is unset

And have to restart ImageJ to continue working

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: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Fiji.app

Information about the version of each plugin:

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

Files not up-to-date:
  1ad3be0d (LOCAL_ONLY) 20140419230050 jars/jpedalSTD.jar
  f89825ee (LOCAL_ONLY) 20160330162635 macros/EeveemeasureLOOPE.ijm
  41da7477 (LOCAL_ONLY) 20160422115144 macros/EeveemeasureLOOPED_noBLEACH.ijm
  80cbbced (LOCAL_ONLY) 20160330115307 macros/EeveemeasureWORKIN.ijm
  95c8916b (LOCAL_ONLY) 20141203192213 macros/Golgi2Dstitcher.ijm
  c6a8dcd3 (LOCAL_ONLY) 20150223143131 macros/INVER.txt
  8a117860 (LOCAL_ONLY) 20140612174341 macros/LICORcomposit.txt
  116b0c07 (MODIFIED) 20151009134850 macros/StartupMacros.fiji.ijm
  4c8abbd5 (LOCAL_ONLY) 20150424183418 macros/TFpuncta.ijm
  e9876ace (LOCAL_ONLY) 20150414191927 macros/TfRpuncta.ijm
  4b553741 (LOCAL_ONLY) 20160403214911 macros/Velocity_Measurement_Tool.txt
  7c2c6ffa (LOCAL_ONLY) 20160403174021 macros/boxmaker.ijm
  78c1e5b2 (LOCAL_ONLY) 20160403181936 macros/boxmaker2.ijm
  f7436389 (LOCAL_ONLY) 20151009170833 macros/cDKOcellcounterprep.ijm
  256a19a3 (LOCAL_ONLY) 20150916155649 macros/cDKOpunct.ijm
  7306544e (LOCAL_ONLY) 20151006123315 macros/cDKOpunctaEEA1.ijm
  63789bfd (LOCAL_ONLY) 20151007173639 macros/cDKOpunctaTF.ijm
  5a05cf78 (LOCAL_ONLY) 20160403181927 macros/kymographerPLUSboxmaker2WIP.ijm
  76212b1a (LOCAL_ONLY) 20160502160542 macros/kymographerPLUSboxmaker3_0_WIP.ijm
  a3778679 (LOCAL_ONLY) 20160403174512 macros/kymographerPLUSboxmakerWIP.ijm
  8be68ae4 (LOCAL_ONLY) 20160401155749 macros/kymographerWIP.ijm
  ad04dd35 (LOCAL_ONLY) 20160502162541 macros/kymographer_simplified_0_0_WIP.ijm
  4e8963ae (LOCAL_ONLY) 20160404174721 macros/kymoveloc_0.1.ijm
  25f2121b (LOCAL_ONLY) 20150526120602 macros/liveTFRfile.ijm
  ff910981 (LOCAL_ONLY) 20160502161456 macros/matrix.txt
  e2a4b06b (LOCAL_ONLY) 20151209163256 macros/nucleicountChannel1.ijm
  35de98f2 (LOCAL_ONLY) 20160209134336 macros/nucleicountChannel1working.ijm
  30f922fa (LOCAL_ONLY) 20160209144948 macros/pCREBscoring.ijm
  227d0d6b (LOCAL_ONLY) 20150914121858 macros/puncta3of4.ijm
  8a4c571d (LOCAL_ONLY) 20150502151726 macros/rab5COUNTER.ijm
  7bb90630 (LOCAL_ONLY) 20160419175305 macros/recordAPFRETtest.ijm
  035cbed3 (LOCAL_ONLY) 20160426112441 macros/register_lambdastacks_quickmacro.ijm
  9492b812 (LOCAL_ONLY) 20150728141642 macros/sliceremover.ijm
  24b8881d (LOCAL_ONLY) 20150728141657 macros/sliceremover.txt
  7a6bce6c (LOCAL_ONLY) 20150728174208 macros/splittricolorgreen.ijm
  8564ce26 (LOCAL_ONLY) 20140603164702 macros/stackSplitter.ijm
  257886db (LOCAL_ONLY) 20150527185219 macros/tfuptakecellvolume.ijm
  653432dd (LOCAL_ONLY) 20160403214014 macros/tsp050706.txt
  d9b54764 (LOCAL_ONLY) 20160403214112 plugins/Macros/tsp050706.ijm
  3589dfdf (LOCAL_ONLY) 20160302091613 plugins/MultiStackReg1.45_.jar
  db475fbc (LOCAL_ONLY) 20150527165049 plugins/Voxel_Counter.class
  b2afde18 (LOCAL_ONLY) 20151009132108 plugins/cell_counter.jar
Comment 1 Curtis Rueden 2016-05-02 16:29:25 CDT
Thanks for the bug report! That's a nasty one.

This specific bug only occurs when the "Use SCIFIO when opening files (BETA!)" option of Edit > Options > ImageJ2... is checked.

However, with that option unchecked, there is still a fatal bug: ImageJ2 commands do not run after a macro is canceled. So if you run e.g. the macro you posted, then try running Edit > Options > ImageJ2... itself, nothing will happen henceforth, until the program is restarted.

Both of these behaviors stem from the same root cause, which is related to cancelation of ImageJ commands internally. I am investigating how best to fix now.
Comment 2 Curtis Rueden 2016-05-02 16:50:10 CDT
More technical details on the cause:

After running a macro which errors out, the IJ.isMacro() method still returns true, because Interpreter.getInstance() is still non-null (i.e.: the interpreter does not get cleaned up). This causes later code to assume a macro is currently running and hence behave differently.

You can clear the problematic condition by executing any macro which completes successfully; e.g.:

    showMessage("Back to normal!");

Subsequently, ImageJ2 commands will work again, since this resets the interpreter back to null -- at least until the next macro which errors out.

Still investigating to determine the best way to fix this in general.
Comment 3 Wayne Rasband 2016-05-02 20:16:10 CDT
The latest ImageJ daily build (1.51a16) fixes a bug that sometimes caused macros to not be correctly terminated when an error occurred. You should be able to avoid the "'path' is required but is unset" error by using the Help>Upgrade ImageJ command to upgrade to the daily build.
Comment 4 Curtis Rueden 2016-05-03 07:36:59 CDT
Thanks Wayne. I looked into adding a fix on the ImageJ2 side as well. But after digging in the code, I concluded that doing so would introduce other unintended side effects.
Comment 5 awoaks 2016-05-03 09:59:11 CDT
Updating to daily build 1.51a19 did not fix this problem for me.

I am still getting the same error ('path' is required but is unset) when I try to use File->Open... after running a macro that does not complete successfully
Comment 6 awoaks 2016-05-03 10:12:03 CDT
And now when I step back to 1.50i the bug has mysteriously disappeared.

I will pop back in here with an update if it re-emerges.
Comment 7 Curtis Rueden 2016-05-03 10:40:08 CDT
Upon further reflection and discussion, we decided to include a fix on the ImageJ2 side as well:

https://github.com/imagej/imagej-legacy/commit/64870767c7cee1fbfd5b37722d4641581e25d650

This is redundant with the ImageJ 1.x fix, but will prevent this problem from occurring even with older versions of ImageJ 1.x, as long as the version of ImageJ2 components is new enough.