Place Holder bug

Hi,

I am getting a exception after moving the dockable(setting the visibility to false after deploying(CGrid) ) to body another dockable . The stack is as follows.

java.lang.NullPointerException
at bibliothek.gui.dock.common.intern.CPlaceholderStrategy.isValidPlaceholder(Unknown Source)
at bibliothek.gui.dock.station.support.PlaceholderList.checkAllPlaceholders(Unknown Source)
at bibliothek.gui.dock.station.support.PlaceholderList.setStrategy(Unknown Source)
at bibliothek.gui.dock.StackDockStation.setPlaceholders(Unknown Source)
at bibliothek.gui.dock.themes.basic.BasicCombiner.combine(Unknown Source)
at bibliothek.gui.dock.themes.ThemeCombiner.combine(Unknown Source)
at bibliothek.gui.dock.themes.StationCombinerValue.combine(Unknown Source)
at bibliothek.gui.dock.SplitDockStation.dropOver(Unknown Source)
at bibliothek.gui.dock.SplitDockStation.dropOver(Unknown Source)
at bibliothek.gui.dock.SplitDockStation.drop(Unknown Source)
at bibliothek.gui.dock.SplitDockStation.drop(Unknown Source)
at bibliothek.gui.dock.SplitDockStation.move(Unknown Source)
at bibliothek.gui.dock.control.relocator.MoveOperation.execute(Unknown Source)
at bibliothek.gui.dock.control.DefaultDockRelocator.executeOperation(Unknown Source)
at bibliothek.gui.dock.control.DefaultDockRelocator.dragMouseReleased(Unknown Source)
at bibliothek.gui.dock.control.DefaultDockRelocator.dragMouseReleased(Unknown Source)
at bibliothek.gui.dock.control.DefaultDockRelocator$MouseRepresentativeListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(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.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)

Can you pls tell what will be the reason for that…?

[QUOTE=srisai]Hi,

I am getting a exception after moving the dockable(setting the visibility to false after deploying(CGrid) ) to body another dockable . The stack is as follows.

Can you pls tell what will be the reason for that…?[/QUOTE]

That is an interesting bug. What kind of Dockable are you moving around, a SingleCDockable, a MultipleCDockable or another Dockable? If your application is small, can you give me an example to reproduce the bug? Because I was not able to reproduce the bug with the description you gave.

I am attaching two file perspective file and the java file.The java file does not contains every thing.Its a huge program.I posted by editing the file.I dont get this exceptions ,everytime I drag the dockable into body of another one.I will get this randomly.

Thanks, I’ll have a closer look in the evening.

I did not find anything in a first quick test (I try again later). I only saw that you are not using the newest version, what version are you using?

I used 1.0.8 version.Even if I updated to 1.1.0,I am getting this null pointer exception.What I have observed is
if I closed the application that opens(using menu bar) the panel which is not visible in the dockable grid and launches it again.Then I moved that panel into another dockables gets this exception.But this also occurs randomly…

Ok, I searched a long time but I was not able to find the cause of the bug. If your work is not confidential, I would be interested to run your entire application to find the bug. Even a look at the way the application interacts with DockingFrames may help.

It that is not possible: Just suppressing the error won’t help because the wrong value would show up at another location. So I would upload a version which contains more checks and hopefully one of the checks is triggered and tells which piece of code introduces the “null” value.

I have to apologize if this is inconvenient for you - especially since you have the bad luck of discovering this bug (and so far being the only one able to reproduce the bug) - but I see no better alternative.