Detaching CWorkingArea containing three or more multi dockables throws exception

Hi Beni,

I came across the following IllegalStateException exception.

I am using a CWorkingArea to manage numerous DefaultMultipleCDockable editors; there are two scenarios to this exception:

Scenario 1: When I open three existing files (via JFileChooser) which create three multi dockable editors stacked insided the CWorkingArea, and then detach the CWorkingArea to a floating dockable (i.e. a JDialog), the first opened dockable disappears from view. That is when the error shows up. Here is the exception report:

java.lang.IllegalStateException: the parent of 'DefaultCommonDockable[dockable=ComposerDockable[unique id=multi 0 composerFactoryID]]' is not 'bibliothek.gui.dock.common.intern.station.CScreenDockStation@83c19c' but 'null'
	at bibliothek.gui.dock.DockHierarchyLock.ensureLinked(DockHierarchyLock.java:342)
	at bibliothek.gui.dock.DockHierarchyLock.access$400(DockHierarchyLock.java:45)
	at bibliothek.gui.dock.DockHierarchyLock$Token.release(DockHierarchyLock.java:417)
	at bibliothek.gui.dock.ScreenDockStation.addDockable(ScreenDockStation.java:1399)
	at bibliothek.gui.dock.ScreenDockStation.executeDrop(ScreenDockStation.java:1579)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1455)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1421)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1405)
	at bibliothek.gui.dock.common.mode.station.CScreenDockStationHandle$External.setLocation(CScreenDockStationHandle.java:223)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.externalize(ExternalizedMode.java:131)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.runApply(ExternalizedMode.java:97)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:404)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:55)
	at bibliothek.gui.dock.support.mode.ModeManager$4.run(ModeManager.java:700)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:694)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:376)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:82)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:657)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6$1.setLocation(LocationModeManager.java:300)
	at bibliothek.gui.dock.common.group.StackGroupMovement.apply(StackGroupMovement.java:99)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6.run(LocationModeManager.java:294)
	at bibliothek.gui.dock.support.mode.ModeManager$3.run(ModeManager.java:476)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:474)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:455)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:289)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$5.run(LocationModeManager.java:265)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.setMode(LocationModeManager.java:258)
	at bibliothek.gui.dock.common.intern.AbstractCDockable.setExtendedMode(AbstractCDockable.java:473)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction.action(CExtendedModeAction.java:189)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction$Action.action(CExtendedModeAction.java:227)
	at bibliothek.gui.dock.action.actions.SimpleButtonAction.trigger(SimpleButtonAction.java:120)
	at weaver.ba.ui.EventUIHelper.triggerDockableButtonGlass(EventUIHelper.java:1747)
	at weaver.ba.ui.EventUIHelper.displayResultForMouseButtonLeftReleaseGlass(EventUIHelper.java:1327)
	at weaver.ba.service.GlobalListenerMonitor.processMousePressAndReleaseEvents(GlobalListenerMonitor.java:1607)
	at weaver.ba.service.GlobalListenerMonitor.eventDispatched(GlobalListenerMonitor.java:1415)
	at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
00:22:07.555 [AWT-EventQueue-0] DEBUG w.b.s.TransferActionListener_Singleton - ++++++++++++++++++++++++++++++++ TransferActionListener_Singleton, -- 

PropertyChangeListener 10000
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: there is already a window in the group dock.multi.\2\ composerFactoryID, add the 

element directly to that window or do not use a placeholder
	at bibliothek.gui.dock.ScreenDockStation.register(ScreenDockStation.java:1859)
	at bibliothek.gui.dock.ScreenDockStation.addDockable(ScreenDockStation.java:1364)
	at bibliothek.gui.dock.ScreenDockStation.executeDrop(ScreenDockStation.java:1579)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1455)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1421)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1405)
	at bibliothek.gui.dock.common.mode.station.CScreenDockStationHandle$External.setLocation(CScreenDockStationHandle.java:223)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.externalize(ExternalizedMode.java:131)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.runApply(ExternalizedMode.java:97)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:404)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:55)
	at bibliothek.gui.dock.support.mode.ModeManager$4.run(ModeManager.java:700)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:694)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:376)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:82)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:657)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6$1.setLocation(LocationModeManager.java:300)
	at bibliothek.gui.dock.common.group.StackGroupMovement.apply(StackGroupMovement.java:99)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6.run(LocationModeManager.java:294)
	at bibliothek.gui.dock.support.mode.ModeManager$3.run(ModeManager.java:476)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:474)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:455)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:289)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$5.run(LocationModeManager.java:265)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.setMode(LocationModeManager.java:258)
	at bibliothek.gui.dock.common.intern.AbstractCDockable.setExtendedMode(AbstractCDockable.java:473)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction.action(CExtendedModeAction.java:189)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction$Action.action(CExtendedModeAction.java:227)
	at bibliothek.gui.dock.action.actions.SimpleButtonAction.trigger(SimpleButtonAction.java:120)
	at weaver.ba.ui.EventUIHelper.triggerDockableButtonGlass(EventUIHelper.java:1747)
	at weaver.ba.ui.EventUIHelper.displayResultForMouseButtonLeftReleaseGlass(EventUIHelper.java:1327)
	at weaver.ba.service.GlobalListenerMonitor.processMousePressAndReleaseEvents(GlobalListenerMonitor.java:1607)
	at weaver.ba.service.GlobalListenerMonitor.eventDispatched(GlobalListenerMonitor.java:1415)
	at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

======================================================================
Scenario 2: When I open more than three multi dockable editors, say five, and then detach the CWorkingArea to a floating dockable, the first two opened multi dockables remain stacked inside the CWorkingArea, while the other three multi dockables are detached and stacked inside the floating dockable. Here the error stack for this scenario:

java.lang.IllegalStateException: the parent of 'DefaultCommonDockable[dockable=ComposerDockable[unique id=multi 2 composerFactoryID]]' is not 'bibliothek.gui.dock.common.intern.station.CScreenDockStation@f02bee' but 'null'
	at bibliothek.gui.dock.DockHierarchyLock.ensureLinked(DockHierarchyLock.java:342)
	at bibliothek.gui.dock.DockHierarchyLock.access$400(DockHierarchyLock.java:45)
	at bibliothek.gui.dock.DockHierarchyLock$Token.release(DockHierarchyLock.java:417)
	at bibliothek.gui.dock.ScreenDockStation.addDockable(ScreenDockStation.java:1399)
	at bibliothek.gui.dock.ScreenDockStation.executeDrop(ScreenDockStation.java:1579)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1455)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1421)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1405)
	at bibliothek.gui.dock.common.mode.station.CScreenDockStationHandle$External.setLocation(CScreenDockStationHandle.java:223)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.externalize(ExternalizedMode.java:131)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.runApply(ExternalizedMode.java:97)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:404)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:55)
	at bibliothek.gui.dock.support.mode.ModeManager$4.run(ModeManager.java:700)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:694)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:376)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:82)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:657)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6$1.setLocation(LocationModeManager.java:300)
	at bibliothek.gui.dock.common.group.StackGroupMovement.apply(StackGroupMovement.java:99)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6.run(LocationModeManager.java:294)
	at bibliothek.gui.dock.support.mode.ModeManager$3.run(ModeManager.java:476)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:474)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:455)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:289)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$5.run(LocationModeManager.java:265)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.setMode(LocationModeManager.java:258)
	at bibliothek.gui.dock.common.intern.AbstractCDockable.setExtendedMode(AbstractCDockable.java:473)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction.action(CExtendedModeAction.java:189)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction$Action.action(CExtendedModeAction.java:227)
	at bibliothek.gui.dock.action.actions.SimpleButtonAction.trigger(SimpleButtonAction.java:120)
	at weaver.ba.ui.EventUIHelper.triggerDockableButtonGlass(EventUIHelper.java:1747)
	at weaver.ba.ui.EventUIHelper.displayResultForMouseButtonLeftReleaseGlass(EventUIHelper.java:1327)
	at weaver.ba.service.GlobalListenerMonitor.processMousePressAndReleaseEvents(GlobalListenerMonitor.java:1607)
	at weaver.ba.service.GlobalListenerMonitor.eventDispatched(GlobalListenerMonitor.java:1415)
	at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: there is already a window in the group dock.multi.\4\ composerFactoryID, add the 

element directly to that window or do not use a placeholder
	at bibliothek.gui.dock.ScreenDockStation.register(ScreenDockStation.java:1859)
	at bibliothek.gui.dock.ScreenDockStation.addDockable(ScreenDockStation.java:1364)
	at bibliothek.gui.dock.ScreenDockStation.executeDrop(ScreenDockStation.java:1579)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1455)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1421)
	at bibliothek.gui.dock.ScreenDockStation.drop(ScreenDockStation.java:1405)
	at bibliothek.gui.dock.common.mode.station.CScreenDockStationHandle$External.setLocation(CScreenDockStationHandle.java:223)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.externalize(ExternalizedMode.java:131)
	at bibliothek.gui.dock.facile.mode.ExternalizedMode.runApply(ExternalizedMode.java:97)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:404)
	at bibliothek.gui.dock.facile.mode.AbstractLocationMode.apply(AbstractLocationMode.java:55)
	at bibliothek.gui.dock.support.mode.ModeManager$4.run(ModeManager.java:700)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:694)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:376)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:82)
	at bibliothek.gui.dock.support.mode.ModeManager.apply(ModeManager.java:657)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6$1.setLocation(LocationModeManager.java:300)
	at bibliothek.gui.dock.common.group.StackGroupMovement.apply(StackGroupMovement.java:99)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$6.run(LocationModeManager.java:294)
	at bibliothek.gui.dock.support.mode.ModeManager$3.run(ModeManager.java:476)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:474)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:455)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.apply(LocationModeManager.java:289)
	at bibliothek.gui.dock.facile.mode.LocationModeManager$5.run(LocationModeManager.java:265)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:514)
	at bibliothek.gui.dock.support.mode.ModeManager.runTransaction(ModeManager.java:493)
	at bibliothek.gui.dock.facile.mode.LocationModeManager.setMode(LocationModeManager.java:258)
	at bibliothek.gui.dock.common.intern.AbstractCDockable.setExtendedMode(AbstractCDockable.java:473)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction.action(CExtendedModeAction.java:189)
	at bibliothek.gui.dock.common.intern.action.CExtendedModeAction$Action.action(CExtendedModeAction.java:227)
	at bibliothek.gui.dock.action.actions.SimpleButtonAction.trigger(SimpleButtonAction.java:120)
	at weaver.ba.ui.EventUIHelper.triggerDockableButtonGlass(EventUIHelper.java:1747)
	at weaver.ba.ui.EventUIHelper.displayResultForMouseButtonLeftReleaseGlass(EventUIHelper.java:1327)
	at weaver.ba.service.GlobalListenerMonitor.processMousePressAndReleaseEvents(GlobalListenerMonitor.java:1607)
	at weaver.ba.service.GlobalListenerMonitor.eventDispatched(GlobalListenerMonitor.java:1415)
	at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
	at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

=========================================================================================
The exception does not appear with one or two multi dockables; only from three and up.
Looking at the top line in the stack, I see a ‘null’ at the end; could it be that a check for not null may be the fix?

I am using df_1.1.2p14d Common with Vista.

Please let me know if you need more details. Thank you, Beni.

Adi

I guess you did override the method “isExternalizable” of “CWorkingArea” to make it floatable? I’ll try to reproduce the bug. (I might not find the time to work on this issue before the weekend).

Thanks for that, Beni.

I am attaching executable code that reproduces the mentioned exception for both scenarios. This executable code is from three years ago used during my learning of DF – so it is not the same code that produced the exception stack pasted above. But it is still relevant to my current application since the DF specific code for generating the multi-dockable editors remains similar to this today.
To reproduce the errors: Scenario 1: go to Editor perspective (click button Editor), then from menu File, click ‘New File’ three times. You will see three multi-dockables appear in the working area. Now click on working area’s externalize button and you should see the said error.
For Scenario 2, repeat the process but this time create five multi-dockables and you should see three of the five multi-dockables stacked in the externalized dockable.

Adi

A bugfix will be available in 1.1.2-p14e. There are some other issues I have to look at before uploading a new version. But I will surely upload the new today or tomorrow.

There is a piece of code that enforces that your Dockables are children of working-areas. That piece of code does not trigger if you put a Dockable in its own dialog (which is correct), but it did trigger again as soon as you had a stack of Dockables in a dialog (which meant the framework tried to fix your layout, which then failed and did lead to the exception).

Hi Beni,

The fix in df_1.1.2p14e works perfectly!

I have tested over a dozen other scenarios, some involving 10 or so editor dockables within multiple externalized dialogs, and in each case it works without a hitch. Simply brilliant! Thank you for the speedy fix, and as always, thank you for bringing DF to us.

/Adi