mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
69 stars 20 forks source link

Exception during interaction with TrackScheme and BranchSpot table open #337

Closed stefanhahmann closed 1 month ago

stefanhahmann commented 1 month ago

How to reproduce

  1. Open https://github.com/mastodon-sc/mastodon-example-data/tree/master/tgmm-mini
  2. Open Feature Computer and Compute all Features
  3. Open a TrackScheme Window
  4. Find a cell division
  5. Delete all spots of one daughter branch, except the first spot after the division
  6. Click on the remaining spot of the branch where the spots have been deleted

GIF 16 10 2024 17-33-21

The following exception appears:

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: bitIndex < 0: -1
    at java.util.BitSet.get(BitSet.java:623)
    at org.mastodon.model.DefaultSelectionModel.isSelected(DefaultSelectionModel.java:137)
    at org.mastodon.model.branch.BranchGraphSelectionAdapter.isSelected(BranchGraphSelectionAdapter.java:101)
    at org.mastodon.model.branch.BranchGraphSelectionAdapter.getSelectedVertices(BranchGraphSelectionAdapter.java:289)
    at org.mastodon.views.table.TableViewFrameBuilder$GraphTableBundle.selectionChanged(TableViewFrameBuilder.java:589)
    at org.mastodon.model.DefaultSelectionModel.resumeListeners(DefaultSelectionModel.java:382)
    at org.mastodon.adapter.SelectionModelAdapter.resumeListeners(SelectionModelAdapter.java:157)
    at org.mastodon.views.trackscheme.display.TrackSchemeNavigationBehaviours.select(TrackSchemeNavigationBehaviours.java:271)
    at org.mastodon.views.trackscheme.display.TrackSchemeNavigationBehaviours.access$1100(TrackSchemeNavigationBehaviours.java:65)
    at org.mastodon.views.trackscheme.display.TrackSchemeNavigationBehaviours$ClickSelectionBehaviour.click(TrackSchemeNavigationBehaviours.java:395)
    at org.scijava.ui.behaviour.MouseAndKeyHandler.mouseClicked(MouseAndKeyHandler.java:265)

Version

Reproducable in Mastodon-Beta-31 Release

tinevez commented 1 month ago

Normally this is fixed in https://github.com/mastodon-sc/mastodon/commit/c19c5abc7a475fb4ea62da8e8f434bc8dd7eac35

stefanhahmann commented 1 month ago

Normally this is fixed in c19c5ab

I just tested this in the current dev branch. It seems to be fixed there.

stefanhahmann commented 1 month ago

Fixed in beta-32 release via https://github.com/mastodon-sc/mastodon/commit/c19c5abc7a475fb4ea62da8e8f434bc8dd7eac35