Bugzilla – Bug 835 |
Fiji hangs when installing macro tool |
Last modified: 2014-08-31 00:45:12 CDT |
⚠ |
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. |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
Created attachment 181 install from more
Created attachment 182 install from plugin tools
Created attachment 183 startup
Hi Mark, This is the case "Install from more" which is attachment 181. The process starts at Toolbar.itemStateChanged:1270 and the critical difference is at Executer.runCommand:131. The interesting code is void runCommand(String cmd) { Hashtable table = Menus.getCommands(); String className = (String)table.get(cmd); if (className!=null) { String arg = ""; if (className.endsWith("\")")) { // extract string argument (e.g. className("arg")) int argStart = className.lastIndexOf("(\""); if (argStart>0) { arg = className.substring(argStart+2, className.length()-2); className = className.substring(0, argStart); } } if (IJ.shiftKeyDown() && className.startsWith("ij.plugin.Macro_Runner") && !Menus.getShortcuts().contains("*"+cmd)) IJ.open(IJ.getDirectory("plugins")+arg); else IJ.runPlugIn(cmd, className, arg); There is a hash table of commands and the question is: what is the command which gets picked up? In the ImageJ environment the className comes back as ij.plugin.Macro_Runner("Tools/Postage_Action_Tool.ijm") This ends with ") so it is parsed into 2 strings: className = ij.plugin.Macro_Runner and arg = Tools/Postage_Action_Tool.ijm In Fiji something else comes out. The className comes back as script:/home/ilan/Fiji.app/plugins/Tools/Postage_Action_Tool.ijm Of course no parsing is performed and arg="" Not surpringly the IJ.runPlugIn(cmd, className, arg) works totally differently. Later on down the line, this results in the crash. So the hash table has been changed. Where it has been changed and why it has been changed, I don't know, but the change results in a crash. If you have any idea why it isn't picking up "ij.plugin.Macro_Runner" but instead is using script:/...., I would be interested in hearing about it. Now I'll go look at the second case. Thanks, Ilan
This is the case Install from plugin tools, attachment 182. The ImageJ environment returns the same ij.plugin.Macro_Runner("Tools/Postage_Action_Tool.ijm") Likewise Fiji returns its same script:/home/ilan/Fiji.app/plugins/Tools/Postage_Action_Tool.ijm In this case the macro is executed instead of being installed. The execution involves a log file print, but there is no crash. Why the first case crashes must be some unwinding of a different stack sequence, after it has attempted to write to the log file. In this case the bug is that it executes the macro instead of installing it. At least it is more friendly in that no crash occurs. Still the basic problem is the change in the hash table of menu commands. I would like to help, but I don't know where to go from here. Ilan