Ticket #1471 (closed defect: wontfix)

Opened 5 years ago

Last modified 3 years ago

Concurrent legacy plugin execution can cause problems

Reported by: curtis Owned by: bdezonia
Priority: critical Milestone: imagej-2.0.0
Component: Legacy Compatibility Version: 2.0.0-beta4
Severity: critical Keywords:
Cc: Blocked By:
Blocking: #1011

Description

If you execute many legacy plugins very quickly, there may be bugs relating to timing issues. For example, if you run Blobs three times in quick succession (Shift+BBB) on some systems, the legacy layer can get out of sync, resulting in exceptions.

Change History

comment:1 Changed 5 years ago by curtis

  • Summary changed from Concurrent legacy plugin execution can fail to Concurrent legacy plugin execution can cause problems

I ran Blobs several times, until a duplicate Blobs window appeared (i.e., there were more Blobs windows than number of times I pressed Shift+B; presumably at least two of the display viewers actually correspond to the same copy of the Blobs dataset). I then pressed W to close a Blobs window, which was successful. But pressing W repeatedly to close out all the windows eventually results in the following exception:

Uncaught exception in thread Thread[plugin thread,6,plugin thread group]
java.lang.NullPointerException
	at imagej.legacy.translate.LegacyUtils.isBinary(LegacyUtils.java:412)
	at imagej.legacy.translate.Harmonizer.updateLegacyImage(Harmonizer.java:117)
	at imagej.legacy.plugin.LegacyCommand$LegacyCommandThread.updateImagePlusesFromDisplays(LegacyCommand.java:343)
	at imagej.legacy.plugin.LegacyCommand$LegacyCommandThread.run(LegacyCommand.java:177)

Maybe because one copy of that particular Blobs ImagePlus was already closed out, so attempting to close it again causes problems?

A related issue is that if you press Shift+BBB fast enough, when the multiple Blobs windows appear, they are all titled "blobs.gif" rather than blobs.gif, blobs-1.gif and blobs-2.gif. Looks like a race condition in the display event hierarchy somewhere. (We can file a separate ticket for it later if addressing the rest of this ticket doesn't fix it.)

comment:2 Changed 3 years ago by curtis

  • Status changed from new to closed
  • Resolution set to wontfix

We are no longer supporting use of ImageJ 1.x commands from modern ImageJ2 UIs, so this issue is now moot.

Note: See TracTickets for help on using tickets.