Layout.add( new SeparatingMenuPiece( new SingleCDockableListMenuPiece( co

Hi, loaded charts are added to the Window menu, –
layout.add( new SeparatingMenuPiece( new SingleCDockableListMenuPiece( dk.control ), true, false, true )).
“layout” is a new RootMenuPiece.

The below exception appears when a dockable chart is deleted and a new chart is loaded when more than two charts are added. Printed the indexes in - remove(…), but its called more than I expected.

This is how the chart is deleted, control.removeSingleDockable(dockable.getUniqueId()).
It doesn’t consistently generate an exception, I can’t find a pattern.

Exception in thread “VisualATS_DF1.1” java.lang.IllegalArgumentException: index greater than the number of items.
at javax.swing.JPopupMenu.remove(
at javax.swing.JMenu.remove(
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$200(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

I’ll have a look into this issue maybe tomorrow (no promises).

But if the behavior is not consistent, then usually it is something related to multi-threading. Make sure you call all methods of the framework only within the EDT (EventDispatchThread).

Thanks Beni!
The layout menu is added in the below thread, also delete chart/dockable , add new chart/dockable is in that thread.
No other thread access add chart nor delete chart, but all new chart/dockable run in a new thread. The exception is only related to the
SingleCDockableListMenuPiece, and no exceptions occur without it. Removing it from the gui window menu eliminates the problem, no exceptions occur.

I have other methods for selecting a chart in a tool bar, so if it continues to be a problem I can remove that part of the layout menu.

public static void main(String s[]) {
SwingUtilities.invokeLater(new Runnable() {

        public void run() {
            new DeskTop();


The bug is caused by the SeparatingMenuPiece. For a workaround you have to remove the SeparatingMenuPiece. I will fix this in the next version. Unfortunatelly my developer machine has some issue right now and I have first to reinstall Ubuntu, Eclipse, Java, etc… I hope to be able to work again on the weekend.

Confirmed! Sorry I didn’t try that myself, would have saved your time, little rusty I guess.

Ok, version 1.1.2p8e is online, download here. Let me know if that solves the issue you found (it did in my test).

[offtopic]Today I learned - even if you fu** up a dist-upgrade, reinstalling Ubuntu will not delete all your settings. :open_mouth: [/offtopic]

“Ubuntu will not delete all your settings.” lol, pure unadulterated luck - I’d say.

Yes 1.1.2p8e works perfectly thanks.

Except for the ClassNotFoundException in workarounds.Java7Workaround
points to .Workarounds.tryAddWorkaround(
Commented out // tryAddWorkaround( “bibliothek.util.workarounds.Java7Workaround” ); and no more issues.

Except for the ClassNotFoundException in workarounds.Java7Workaround
points to .Workarounds.tryAddWorkaround(
Commented out // tryAddWorkaround( “bibliothek.util.workarounds.Java7Workaround” ); and no more issues.[/QUOTE]

Thansk for the reply.
Are you using Java 7? That is a strange exception… and it did not happen with the old version?

Yes the latest /usr/lib/jvm/jdk1.7.0_25