TrackMate tools periodically becoming unresponsive



Hi everyone,

I just came back to TrackMate after a long break (it’s such a fantastic tool! Thank you @tinevez!) but am now running into a strange bug that I can’t figure out or find relevant previous posts about. About 30% of the time it works as expected, but more often than not the TrackMate tool stops having any effect (meaning that, with the tool selected, I still can’t add, remove, or edit any spots in the active stack). This isn’t specific to mouse events, as the keyboard shortcuts in manual tracking mode stop working as well. The problem persists for several seconds to several minutes, then usually (but not always) goes away and I’m able to edit the spots again. Sometimes, the only way I have to get the functionality back is to restart Fiji. Meanwhile, the rest of the plugin is still responsive and I can successfully run other commands, such as automatic spot detection. No error messages are generated in the log except for the one at the bottom of this post, which sometimes (but not always!) appears when I click the “settings” icon in the TrackMate window. Any ideas, suggestions, or help would be greatly appreciated!

Some details on the software versions:

  • ImageJ 1.52i (Fiji installation)
  • TrackMate v3.8.0
  • OS: problem replicated on both Windows 10 and macOS High Sierra
    The entire Fiji installation with all plugins has been freshly updated on 2019-01-29.

Thank you so much in advance for any suggestions!

The error messages that sometimes show up when clicking the “Settings” icon:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Argument out of range: 1
   at ij.ImageStack.getProcessor(
   at net.imglib2.img.imageplus.ShortImagePlus.<init>(
   at net.imglib2.img.ImagePlusAdapter.wrapShort(
   at net.imglib2.img.ImagePlusAdapter.wrapLocal(
   at net.imglib2.img.ImagePlusAdapter.wrap(
   at net.imglib2.img.ImagePlusAdapter.wrapImgPlus(
   at fiji.plugin.trackmate.util.TMUtils.rawWraps(
   at fiji.plugin.trackmate.features.SpotFeatureCalculator.computeSpotFeaturesAgent(
   at fiji.plugin.trackmate.features.SpotFeatureCalculator.process(
   at fiji.plugin.trackmate.TrackMate.computeSpotFeatures(
   at fiji.plugin.trackmate.gui.TrackMateGUIController.actionPerformed(
   at fiji.plugin.trackmate.gui.TrackMateWizard.fireAction(
   at fiji.plugin.trackmate.gui.TrackMateWizard.access$100(
   at fiji.plugin.trackmate.gui.TrackMateWizard$8.actionPerformed(
   at javax.swing.AbstractButton.fireActionPerformed(
   at javax.swing.AbstractButton$Handler.actionPerformed(
   at javax.swing.DefaultButtonModel.fireActionPerformed(
   at javax.swing.DefaultButtonModel.setPressed(
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(
   at java.awt.Component.processMouseEvent(
   at javax.swing.JComponent.processMouseEvent(
   at java.awt.Component.processEvent(
   at java.awt.Container.processEvent(
   at java.awt.Component.dispatchEventImpl(
   at java.awt.Container.dispatchEventImpl(
   at java.awt.Component.dispatchEvent(
   at java.awt.LightweightDispatcher.retargetMouseEvent(
   at java.awt.LightweightDispatcher.processMouseEvent(
   at java.awt.LightweightDispatcher.dispatchEvent(
   at java.awt.Container.dispatchEventImpl(
   at java.awt.Window.dispatchEventImpl(
   at java.awt.Component.dispatchEvent(
   at java.awt.EventQueue.dispatchEventImpl(
   at java.awt.EventQueue.access$500(
   at java.awt.EventQueue$
   at java.awt.EventQueue$
   at Method)
   at java.awt.EventQueue$
   at java.awt.EventQueue$
   at Method)
   at java.awt.EventQueue.dispatchEvent(
   at java.awt.EventDispatchThread.pumpOneEventForFilters(
   at java.awt.EventDispatchThread.pumpEventsForFilter(
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(
   at java.awt.EventDispatchThread.pumpEvents(
   at java.awt.EventDispatchThread.pumpEvents(


Thanks for your kind words!

Ok this one is weird.
What kind of images are you working on?


Wow, thank you for responding so quickly! I’m working on a single-channel stack of 512 x 512 pixel 16-bit images. However, I just checked and I can replicate the problem with the standard sample file, “Tracks for TrackMate”, so it’s not specific to the images I’m looking at… Another couple of things that I should maybe mention:

  • Sometimes the plugin only stops responding to one type of events, e.g. mouse clicks but not keyboard shortcuts, while at other times it ignores both.
  • If the problem occurs while I’m in spot editing mode (the active spot is shown with a dashed green outline), I can still move the spot around by single-clicking anywhere on the image, but can’t exit edit mode by double-clicking away from the spot.
  • When the plugin “hangs”, Fiji stops responding to other TrackMate-unrelated shortcuts, such as the “+” and “-” keys for zooming in and out of the image. I use Fiji very frequently and have never observed this behavior when TrackMate is not running.

This all looks like the plugin is having trouble handling mouse/keyboard events in a sporadic way… It’s very puzzling.


I do not use the editing via mouse (double-clicks) too much these days.
I added the keyboard shortcuts editing (A to add, D to delete, SPACE to move etc.) quickly after because of carpal syndrom.

Do the symptoms persist if you use them instead of double-clicks?


Unfortunately, the symptoms do persist with the keyboard shortcuts. A couple of times, I’ve noticed that I can still use the shortcuts but not mouse clicks, but usually both stop working at the same time. On a side note, I completely agree that the shortcuts are a nicer way to manage manual tracking than mouse clicks!


I am currently using a lot and doing a lot of manual curation for an internal project.
I could not reproduce the bug so far. Can you investigate a bit whether it is

  • workstations dependent?
  • java version dependent?
  • problem size dependent (many cells)?


I think I made some headway on this, or at least found a way to reproducibly trigger the glitch (and a strategy to avoid it). It happens whenever commands, either from the mouse mouse or from the keyboard, get sent in a quick succession (e.g., rapidly hitting “A” when adding more spots or just holding down “A”, or rapidly clicking / double-clicking on the image with the mouse). Knowing this, I can now use the plugin without it crashing as long as I only use the keyboard shortcuts and make sure to leave some time between button presses.

To answer your questions:

  • Workstation dependent? Yes, I see the glitch on 2/2 Macs (OSX High Sierra) tested but on only one out of two Windows 10 machines tested.
  • Java version dependent? No, I tested three versions of Java 8 (including the most recent release as of 2019-02-08) and a legacy version of Fiji with Java 6, with the same results.
  • Problem size dependent? No, I see it starting with a single spot in the sample file that comes included with Fiji and up to very large files with hundreds of spots.

I feel that this is less of a serious problem now that I have a workaround - never using mouseclicks and slightly spacing out keyboard shortcuts - but maybe this forum thread will help someone who experiences a similar problem and stumbles upon it in the future.