Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5659 closed defect (duplicate)

If Bing Imagery is added to the toolbar, button isn't grayed out if no data is loaded

Reported by: rickmastfan67 Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

If you happen to customize your toolbar to add any WMS image source to your toolbar, the buttons are clickable even when you have no data loaded. Thus, if you "accidentally" click the button for it before you load any data, the WMS plugin crashes.

Normally, you would expect that the WMS links would be grayed out (like if you open the pulldown menu), or (if it can't be grayed out) a message should popup asking you to load some data first.

===

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-11-22 02:31:33
Last Changed Author: bastiK
Revision: 3668
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-11-21 10:30:59 +0100 (Sun, 21 Nov 2010)
Last Changed Rev: 3668

Identification: JOSM/1.5 (3668 en)
Memory Usage: 90 MB / 455 MB (17 MB allocated, but free)
Java version: 1.6.0_22, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7

Plugin: Create_grid_of_ways (21706)
Plugin: OpeningHoursEditor (24290)
Plugin: RoadSigns (22850)
Plugin: alignways (23560)
Plugin: buildings_tools (23804)
Plugin: colorscheme (21563)
Plugin: download_along (22427)
Plugin: junctionchecking (18)
Plugin: michigan_left (22369)
Plugin: openstreetbugs (23747)
Plugin: osmarender (22765)
Plugin: pdfimport (24186)
Plugin: remotecontrol (22734)
Plugin: restart (23263)
Plugin: reverter (23278)
Plugin: routing (23561)
Plugin: slippymap (23575)
Plugin: tageditor (21026)
Plugin: tagging-preset-tester (22454)
Plugin: terracer (22169)
Plugin: turnrestrictions (24125)
Plugin: undelete (22365)
Plugin: utilsplugin2 (24236)
Plugin: validator (23917)
Plugin: walkingpapers (22549)
Plugin: waydownloader (21706)
Plugin: wayselector (23103)
Plugin: wmsplugin (24221)

java.lang.NullPointerException
	at wmsplugin.WMSLayer.<init>(WMSLayer.java:114)
	at wmsplugin.WMSDownloadAction.actionPerformed(WMSDownloadAction.java:21)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.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)

Attachments (0)

Change History (3)

comment:1 by rickmastfan67, 13 years ago

Component: Core imageryCore
Summary: If any WMS source is added to the toolbar, button is clickable even if no data is loadedIf Bing Imagery is added to the toolbar, button isn't grayed out if no data is loaded

Steps to reproduce:

  1. Start JOSM (don't load ANY data)
  2. F12 > Toolbar customization
  3. Add Bing to the toolbar
  4. Click OK.

What should happen?
The Bing button in the toolbar should be grayed out UNTIL you load some OSM data.

What happens?
The Bing button is clickable without any OSM data loaded. If you click on it while NO data is loaded, you get this error message below.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-02-20 02:31:40
Last Changed Author: jttt
Revision: 3915
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-02-19 19:38:10 +0100 (Sat, 19 Feb 2011)
Last Changed Rev: 3915

Identification: JOSM/1.5 (3915 en)
Memory Usage: 58 MB / 455 MB (23 MB allocated, but free)
Java version: 1.6.0_23, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 7

Plugin: OpeningHoursEditor (25190)
Plugin: RoadSigns (25192)
Plugin: Tracer (25191)
Plugin: alignways (25199)
Plugin: buildings_tools (25192)
Plugin: colorscheme (25192)
Plugin: download_along (25190)
Plugin: imageryadjust (25199)
Plugin: junctionchecking (82)
Plugin: mapdust (25312)
Plugin: measurement (25199)
Plugin: michigan_left (25190)
Plugin: openstreetbugs (25199)
Plugin: openvisible (25192)
Plugin: osmarender (25192)
Plugin: restart (25199)
Plugin: reverter (25190)
Plugin: routing (25199)
Plugin: tageditor (25191)
Plugin: tagging-preset-tester (25191)
Plugin: turnrestrictions (25199)
Plugin: undelete (25199)
Plugin: utilsplugin2 (25190)
Plugin: walkingpapers (25191)
Plugin: waydownloader (25190)
Plugin: wayselector (25191)

java.lang.IllegalArgumentException: input == null!
	at javax.imageio.ImageIO.read(Unknown Source)
	at org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.getAttributionImage(BingAerialTileSource.java:162)
	at org.openstreetmap.josm.gui.layer.TMSLayer.initTileSource(TMSLayer.java:251)
	at org.openstreetmap.josm.gui.layer.TMSLayer.<init>(TMSLayer.java:323)
	at org.openstreetmap.josm.gui.layer.ImageryLayer.create(ImageryLayer.java:134)
	at org.openstreetmap.josm.actions.AddImageryLayerAction.actionPerformed(AddImageryLayerAction.java:27)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.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)

NOTE: This only happens when adding the Bing button to the toolbar. This doesn't happen with any of the other Imagery sources (did in the past, but no longer).

comment:2 by Don-vip, 13 years ago

Resolution: duplicate
Status: newclosed

comment:3 by Don-vip, 13 years ago

Closed as duplicate of #5993.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.