Ticket #1604 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Legacy output tracking can be problematic

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b6-legacy
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: curtis Blocked By:
Blocking: #1584


Note that the legacy output tracking stores info in thread local lists. Any legacy plugin that creates threads that display image data can hatch legacy outputs that are not seen by LegacyCommand (because the output set and closed set are in different thread locals). Figure out a way to fix this.

I had thought of making the output tracker keep a single pair of lists of imagePluses that are hashed on thread group. Then no thread local duplication arises. Perhaps there are issues with this though. Such as two plugins with different sets of outputs getting lumped together in one output imps set. Probably this is not an issue. Investigate the best approach.

Change History

comment:1 Changed 7 years ago by bdezonia

  • Blocking 1459 added

comment:2 Changed 7 years ago by bdezonia

  • Cc curtis added

I committed an experimental fix on the legacy-tracker branch. The approach is indeed to track imagePluses per ThreadGroup rather than per Thread. LegacyCommand was already making its own ThreadGroup for other reasons. This new implementation eliminates ThreadLocals in lieu of synchronized methods. The methods are static but this is not really a change from before.

Curtis please review and let me know what you think of the design. Thanks.

comment:3 Changed 7 years ago by bdezonia

Note: this ticket was hatched as a result of investigating #1404. That ticket has a source snippet that could be used to test this new implementation. That remains as a TODO.

comment:4 Changed 7 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from imagej2-b7-ndim-data to imagej2-b6-legacy-undo

Fixed with merge commit 3e5ee3f7bb7ff765c4ef1d1dca587d6090a63c9b

comment:5 Changed 7 years ago by bdezonia

  • Blocking 1584 added; 1459 removed
Note: See TracTickets for help on using tickets.