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 #1840 (new defect)

Opened 2013-04-25T13:18:45-05:00

Last modified 2013-05-08T14:40:15-05:00

Menu dispatching broken on graceful-exit branch

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b10-compatibility
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1356


The graceful-exit branch was created to fix #1835. Menus are now updated on WinActivatedEvents. However this is somewhat problematic. For instance use mouse to load two or more sample images quickly. Often you'll get an exception and one of the images doesn't load (and you can no longer exit the program). The exception is related to the menu. ctrueden had an idea from stackoverflow on how to have one menu bar rather than one per window. Either we need to implement that or fix how menus are synced to avoid this exception. And we must decide when to merge graceful-exit to master.


2013-04-25 13:17:06.855 java[27655:903] java.lang.IllegalArgumentException: null source

at java.util.EventObject.<init>(
at java.awt.AWTEvent.<init>(
at java.awt.event.InvocationEvent.<init>(
at java.awt.event.InvocationEvent.<init>(
at sun.awt.PeerEvent.<init>(
at sun.awt.PeerEvent.<init>(
at sun.awt.SunToolkit.executeOnEventHandlerThread(
at apple.awt.CMenuItem.handleAction(

Change History

comment:1 Changed 2013-04-25T13:24:08-05:00 by bdezonia

  • Blocking 1563 added

comment:2 Changed 2013-05-08T14:35:28-05:00 by curtis

  • Component changed from Core to UI Framework
  • Blocking 1356 added; 1563 removed
  • Milestone changed from imagej2-b7-ndim-data to imagej2-b10-compatibility

I  took a crack at addressing this issue, using the modeless JDialog approach discussed at  SO #16175884. But doing it right (which we ultimately must do) is too involved for beta7.

Last edited 2013-05-08T14:36:19-05:00 by curtis

comment:3 Changed 2013-05-08T14:40:15-05:00 by bdezonia

Okay. Note I forgot to update this ticket to note that graceful-exit was merged some time ago.