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 80 - Exception in opening Command Launcher
Exception in opening Command Launcher
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Linux
: P4 normal
Assigned To: Mark Longair
Depends on:
Blocks:
 
Reported: 2009-09-26 10:59 CDT by Albert Cardona
Modified: 2009-11-12 09:09 CST
2 users (show)

See Also:

Description Albert Cardona 2009-09-26 10:59:27 CDT
Useful Java System Properties:
  os.arch => i386
  os.name => Linux
  os.version => 2.6.27-14-generic
  java.version => 1.6.0_16
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_16-b01
  java.vm.name => Java HotSpot(TM) Client VM
  java.vm.version => 14.2-b01
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.X11GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => gnome
  file.separator => /

Bug Report Text:

1. Open Fiji
2. Type 'l' very quickly to open the Command Launcher. This Exception prints:

java.util.ConcurrentModificationException
at java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
at ij.plugin.CommandFinder.run(CommandFinder.java:289)
at ij.IJ.runPlugIn(IJ.java:154)
at ij.Executer.runCommand(Executer.java:123)
at ij.Executer.run(Executer.java:59)
at java.lang.Thread.run(Thread.java:619)

Sometimes, it does not print, but the Command Launcher does not list any of the scripts under plugins/
There is a synchronization issue--the command launcher should wait until scripts have been added to the Menus table.
Comment 1 Mark Longair 2009-09-26 14:15:47 CDT
I've pushed a fix that works for me.  Unfortunately, there are a lot
of places in Fiji and ImageJA where the commands Hashtable from
Menus.getCommands() is modified and all of them need to be synchronized.
So, the change to ImageJA is:

  http://repo.or.cz/w/imageja.git?a=commitdiff;h=3b8200a3fad1a7dc7ec13f178f865104710d4c15

... and Fiji:

  http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=fiji.git;a=commitdiff;h=2c91023b2ae574be5bf5d3d38f7f638b993818ff

Could you try checking out the command-finder-concurrency-fix branch
of Fiji, doing "git submodule update ImageJA" and check whether that
fixes the issue for you?

many thanks,
mark
Comment 2 Mark Longair 2009-09-26 15:03:27 CDT
Oops, Albert pointed out that this is the wrong fix.  I've pushed a one-line
change to ImageJA's fiji branch:

  http://repo.or.cz/w/imageja.git?a=commitdiff;h=fee0ebc9d6da77fbfd483a25433c866116e604cc

If that's OK, I'll update the submodule in Fiji and send the fix to Wayne.

many thanks,
mark
Comment 3 Johannes Schindelin 2009-11-12 01:41:55 CST
Mark, your commits fixed the issue, right?
Comment 4 Mark Longair 2009-11-12 09:09:09 CST
Yes, I'm marking this as fixed.