NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1973 (closed defect: fixed)

Opened 2013-07-30T13:52:56-05:00

Last modified 2013-08-01T12:34:13-05:00

Event processing can hang

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b8-analysis
Component: Analysis Plugins Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1457

Description

Recently the event processing was changed to accommodate some needs with status area updates. Now you can hang things by doing this:

open boats
Add Data to X (like 25 pixels)

Debugger shows multiple threads blocked on each other

Change History

comment:1 Changed 2013-07-31T10:49:55-05:00 by hinerm

  • Owner changed from hinerm to bdezonia
  • Status changed from new to reviewing

Note that this occurs because of the dataset view being rebuilt on the EDT, which ultimately leads to autoscale -> computeMinMax on the EDT, which tries to send status updates back to the EDT, which deadlocks. This would be an issue for any computation called during rebuilding that would display its own status updates.

This issue should be fixed in  this commit.

DatasetView/display rebuilds should now occur off the EDT.

I had to add a null check in the SwingDisplayPanel because the first time it redraws the computation may not be complete, thus the projector is null. But after rebuilding another event is dispatched and the display panel redraws correctly.

I didn't see any other UI implementations of the ImageDisplayPanel, but those would need a similar check.

bdezonia, can you verify this works on your end?

comment:2 Changed 2013-08-01T10:47:49-05:00 by bdezonia

  • Owner changed from bdezonia to hinerm

As things didn't work here I am reassigning to hinerm

comment:3 Changed 2013-08-01T11:36:11-05:00 by hinerm

  • Owner changed from hinerm to bdezonia

Specifically, adding a channel to an RGB image was causing exceptions due to the timing of the rebuild methods.

As of  this commit the rebuilds are now synchronized on the context, which leads to the correct execution order and seemed to fix the error on my end.

bdezonia please test again to confirm.

comment:4 Changed 2013-08-01T12:34:13-05:00 by bdezonia

  • Status changed from reviewing to closed
  • Resolution set to fixed

Appears to be working. Closing.