TrackMate tools periodically becoming unresponsive

fiji
imagej
plugin
trackmate
#1

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!
Best,
Vlad

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(ImageStack.java:269)
   at net.imglib2.img.imageplus.ShortImagePlus.<init>(ShortImagePlus.java:98)
   at net.imglib2.img.ImagePlusAdapter.wrapShort(ImagePlusAdapter.java:172)
   at net.imglib2.img.ImagePlusAdapter.wrapLocal(ImagePlusAdapter.java:102)
   at net.imglib2.img.ImagePlusAdapter.wrap(ImagePlusAdapter.java:74)
   at net.imglib2.img.ImagePlusAdapter.wrapImgPlus(ImagePlusAdapter.java:91)
   at fiji.plugin.trackmate.util.TMUtils.rawWraps(TMUtils.java:110)
   at fiji.plugin.trackmate.features.SpotFeatureCalculator.computeSpotFeaturesAgent(SpotFeatureCalculator.java:156)
   at fiji.plugin.trackmate.features.SpotFeatureCalculator.process(SpotFeatureCalculator.java:93)
   at fiji.plugin.trackmate.TrackMate.computeSpotFeatures(TrackMate.java:174)
   at fiji.plugin.trackmate.gui.TrackMateGUIController.actionPerformed(TrackMateGUIController.java:1096)
   at fiji.plugin.trackmate.gui.TrackMateWizard.fireAction(TrackMateWizard.java:321)
   at fiji.plugin.trackmate.gui.TrackMateWizard.access$100(TrackMateWizard.java:30)
   at fiji.plugin.trackmate.gui.TrackMateWizard$8.actionPerformed(TrackMateWizard.java:389)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.Component.processMouseEvent(Component.java:6535)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
   at java.awt.Component.processEvent(Component.java:6300)
   at java.awt.Container.processEvent(Container.java:2236)
   at java.awt.Component.dispatchEventImpl(Component.java:4891)
   at java.awt.Container.dispatchEventImpl(Container.java:2294)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
   at java.awt.Container.dispatchEventImpl(Container.java:2280)
   at java.awt.Window.dispatchEventImpl(Window.java:2750)
   at java.awt.Component.dispatchEvent(Component.java:4713)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
   at java.awt.EventQueue.access$500(EventQueue.java:97)
   at java.awt.EventQueue$3.run(EventQueue.java:709)
   at java.awt.EventQueue$3.run(EventQueue.java:703)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
   at java.awt.EventQueue$4.run(EventQueue.java:731)
   at java.awt.EventQueue$4.run(EventQueue.java:729)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
0 Likes

#2

Thanks for your kind words!

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

0 Likes

#3

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.

0 Likes

#4

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?

0 Likes

#5

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!

0 Likes

#6

Ok,
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)?
0 Likes

#7

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.

1 Like

#8

Hello!

I am having a similar problem as @TheTrappist. I am typically working with 2-color timeseries of ~100-300 frames, but I can replicate the problem in a single monochrome 512x512 image. When Trackmate tools becomes unresponsive, I can still select spots on the image by selecting the corresponding spot in the TrackScheme window, but I lose both mouse and keyboard functionality on the image itself. Interestingly, after Trackmate tools becomes unresponsive, ImageJ interprets the Trackmate keyboard shortcuts (“D” for instance) as ImageJ shortcuts (pressing “D” runs the “Draw” command). Since the keyboard shortcut for “Draw” is ctrl+D, it seems like ImageJ thinks the ctrl key is pressed.

I have not noticed a strong correlation between clicking repeatedly and losing Trackmate tools function, but I have found a way to reproduce the problem. I begin by opening a single 512x512 tif file. I open Trackmate, then click next twice to get to the LoG detector settings window. I hit preview to generate some ROIs and I can select them with Trackmate tools active. Next I hit the back button once, and can still select ROIs. I hit the back button again, returning to the starting window, and I can still select ROIs. I press the Next button, and now I can no longer select ROIs or use keyboard shortcuts for Trackmate tools. I can continue through the tracking workflow and everything works fine, but I can never edit spots again with the open image. If I close the image and reopen it, I can regain Trackmate tools function if I navigate back to the starting window, and click Next once. All of the ROIs that were generated from the original image reappear on the newly opened image and I can select ROIs again.

In a lot of cases, I will run through the automated tracking workflow with a timeseries, and when I get to the end and want to edit the tracks, I can’t select them or use keyboard shortcuts. The rest of the time I lose the Trackmate tools function after it has been working for awhile on the image. My workaround is just to close the image file that has stopped responding, close Trackmate, reopen the image file and restart Trackmate. That solves the problem every time.

As @TheTrappist said in the last post, this is not a serious problem. The workarounds are easy. Trackmate is an incredibly useful program for me, and is the most user friendly tracking package I have worked with. Thank you @tinevez for creating Trackmate and continuing to maintain it.

Some info about my setup:

  • TrackMate v3.8.0
  • ImageJ 1.52k (Fiji)
  • Java: JDK1.8.0_66
  • I have replicated the problem on two windows 10 machines with essentially identical hardware.

Best,

Phil

1 Like