Opened 14 years ago
Closed 14 years ago
#5389 closed defect (fixed)
WMS: New empty layer does not work
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core imagery | Version: | latest |
Keywords: | Cc: |
Description
If you add a new empty layer, an error occurs
revision: 3475 Is-Local-Build: true loading plugin 'wmsplugin' (version 22854) wmsplugin: remote control not available java.lang.NullPointerException at wmsplugin.WMSPlugin.getGrabber(WMSPlugin.java:364) at wmsplugin.WMSLayer.startGrabberThreads(WMSLayer.java:748) at wmsplugin.WMSLayer.<init>(WMSLayer.java:130) at wmsplugin.WMSLayer.<init>(WMSLayer.java:107) at wmsplugin.WMSPlugin$1.actionPerformed(WMSPlugin.java:334) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:1327) at javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:568) at javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:465) at javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:411) at javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:305) at javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched(BasicPopupMenuUI.java:807) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2353) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2245) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2203) at java.awt.Component.dispatchEventImpl(Component.java:4528) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Attachments (0)
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Currently you need it to load a saved wms layer.
This should also work with File > Open and there should be WMS > Open Layer from File
comment:3 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed in plugin revision 22960.
NullPointerException was caused by access to "baseURL" which is null in an empty layer.
Fix: Don't call startGrabberThreads() from constructor if baseURL is null. Additionally call startGrabberThreads() if baseURL is not null after loading WMSLayer from file. (Calling startGrabberThreads() after loading the layer from file seems to be a good idea because baseURL may have changed.)
Actually I don't know what an empty layer should be used for. Removing it?