Opened 8 years ago
Closed 8 years ago
#14282 closed defect (fixed)
NPE on saveSession
Reported by: | wiktorn | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 17.01 |
Component: | Core | Version: | |
Keywords: | template_report gpx heatmap | Cc: | kidelo |
Description
What steps will reproduce the problem?
- I used only OSM data layers and WMS/WMTS layers.
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-01-22 21:57:07 +0100 (Sun, 22 Jan 2017) Build-Date:2017-01-23 02:32:02 Revision:11488 Relative:URL: ^/trunk Identification: JOSM/1.5 (11488 en) Windows 10 64-Bit Memory Usage: 1026 MB / 1751 MB (402 MB allocated, but free) Java version: 1.8.0_121-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 2560x1440 Maximum Screen Size: 2560x1440 VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\31\583aa85f-68319f41, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=65210, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm-latest.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAC1Eam5scC5hcHBsaWNhdGlvbi5ocmVmPWh0dHBzOi8vam9zbS5vcGVuc3RyZWV0bWFwLmRlL2Rvd25sb2FkL2pvc20tbGF0ZXN0LmpubHAA] Dataset consistency test: No problems found Plugins: + apache-commons (32994) + ejml (32680) + geotools (33042) + jts (32699) + opendata (33088) + utilsplugin2 (33088) Validator rules: + https://raw.githubusercontent.com/zibik/adresy_walidator/master/polskie_adresy.mapcss Last errors/warnings: - W: Update plugins - org.openstreetmap.josm.plugins.PluginHandler$UpdatePluginsMessagePanel[,0,0,0x0,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=] - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=403, Error Body=<<h1>Forbidden</h1>Rejected request from RFC1918 IP to public server address> - E: Authorisation Failed - <html>Authorisation at the OSM server with the OAuth token 'X4KOmplyuCze09mp1lBa9endzEdukyWfzfS3zNt6' failed.<br>The token is not authorised to access the protected resource<br>'http://osm.vink.pl/tst/granice/1805052.osm'.<br>Please launch the preferences dialog and retrieve another OAuth token.</html> - W: Unable to get color from '' for color preference 'extrude.main.line' - W: Unable to get color from '' for color preference 'improve.way.accuracy.helper.line' - W: Unable to get color from '' for color preference 'make.parallel.helper.line' - E: Handled by bug report queue: java.lang.NullPointerException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-2 (59) of javawsApplicationThreadGroup java.lang.NullPointerException at javax.swing.DefaultListCellRenderer.getListCellRendererComponent(Unknown Source) at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(Unknown Source) at javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(Unknown Source) at com.sun.java.swing.plaf.windows.WindowsComboBoxUI.getMinimumSize(Unknown Source) at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(Unknown Source) at javax.swing.JComponent.getPreferredSize(Unknown Source) at org.openstreetmap.josm.gui.preferences.display.GPXSettingsPanel.lambda$initComponents$5(GPXSettingsPanel.java:284) at java.beans.PropertyChangeSupport.fire(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source) at java.awt.Component.firePropertyChange(Unknown Source) at javax.swing.JComponent.setBorder(Unknown Source) at javax.swing.LookAndFeel.installBorder(Unknown Source) at javax.swing.plaf.basic.BasicComboBoxUI.installDefaults(Unknown Source) at javax.swing.plaf.basic.BasicComboBoxUI.installUI(Unknown Source) at com.sun.java.swing.plaf.windows.WindowsComboBoxUI.installUI(Unknown Source) at javax.swing.JComponent.setUI(Unknown Source) at javax.swing.JComboBox.setUI(Unknown Source) at javax.swing.JComboBox.updateUI(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI0(Unknown Source) at javax.swing.SwingUtilities.updateComponentTreeUI(Unknown Source) at com.sun.java.swing.plaf.windows.DesktopProperty.updateWindowUI(Unknown Source) at com.sun.java.swing.plaf.windows.DesktopProperty.updateWindowUI(Unknown Source) at com.sun.java.swing.plaf.windows.DesktopProperty.updateAllUIs(Unknown Source) at com.sun.java.swing.plaf.windows.DesktopProperty.access$000(Unknown Source) at com.sun.java.swing.plaf.windows.DesktopProperty$1.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.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.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at javax.swing.JFileChooser.showDialog(Unknown Source) at javax.swing.JFileChooser.showSaveDialog(Unknown Source) at org.openstreetmap.josm.gui.widgets.SwingFileChooser.showSaveDialog(SwingFileChooser.java:106) at org.openstreetmap.josm.gui.widgets.FileChooserManager.openFileChooser(FileChooserManager.java:341) at org.openstreetmap.josm.gui.widgets.FileChooserManager.openFileChooser(FileChooserManager.java:323) at org.openstreetmap.josm.actions.DiskAccessAction.createAndOpenFileChooser(DiskAccessAction.java:115) at org.openstreetmap.josm.actions.SessionSaveAsAction.saveSession(SessionSaveAsAction.java:118) at org.openstreetmap.josm.actions.SessionSaveAsAction.actionPerformed(SessionSaveAsAction.java:81) 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.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.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.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.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$JavaSecurityAccessImpl.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)
Attachments (3)
Change History (12)
comment:1 by , 8 years ago
Cc: | added |
---|---|
Keywords: | gpx heatmap added |
Milestone: | → 17.01 |
follow-up: 4 comment:2 by , 8 years ago
- checked the exception trace, looks like colorTypeHeatMapTune is null. But it can not be, under normal normal circumstances.
colorTypeHeatMapTune.addPropertyChangeListener(e -> { // get image size of environment final int iconSize = (int) colorTypeHeatMapTune.getPreferredSize().getHeight(); // ask the GPX draw for the correct color of that layer final Color color = GpxDrawHelper.DEFAULT_COLOR.getChildColor(layerName != null ? layerName : "").get(); colorTypeHeatIconLabel.setIcon(GpxDrawHelper.getColorMapImageIcon(color, colorTypeHeatMapTune.getSelectedIndex(), iconSize)); });
- I tried to reproduce the problem on my win7, but is not reproduceable currently with latest version. It test the following combinations:
- 1x data layer -> ok
- 1x data layer + bing -> ok
- 1x data layer + bing + 1x gpx -> ok
- 3x data layer (same overlapping region) + bing + landsat + 2x gpx -> ok
- Found similar unexpected exception here, https://community.oracle.com/thread/1526330?start=0. Any idea ?
Can you provide more details, how to reproduce the problem.
comment:3 by , 8 years ago
by , 8 years ago
Attachment: | EmptyColor1.png added |
---|
by , 8 years ago
Attachment: | EmptyColor2.png added |
---|
comment:4 by , 8 years ago
Replying to kidelo:
- checked the exception trace, looks like colorTypeHeatMapTune is null.
I have spoken too fast, it can't be null as we enter the call to getPreferredSize()
comment:5 by , 8 years ago
Resolution: | → othersoftware |
---|---|
Status: | new → closed |
I tried to reproduce this problem but I failed. It looks like this might be a problem inside Java, so maybe this is something inside 121 update. Though I noticed such problems only on 1 computer till now.
comment:6 by , 8 years ago
And one thing (that was the reason I created the ticket) - any idea why showing the Save As dialog try to paint GPX Settings Panel? I didn't have this window open, so this looks like already JVM went astray...
by , 8 years ago
Attachment: | josm_14282_npe_on_save_session_by_kidelo.patch added |
---|
comment:7 by , 8 years ago
Some news:
- Have changed portions of code for more robustness. The colorTypeHeatMapTune cannot be null in this context, but .getPreferredSize() can return a null pointer maybe.
- The observed new key "color." in list of defined colors was inserted by GPX heat map code when it has ask for the default color. This was a bug. I have changed the implementation to avoid this.
comment:8 by , 8 years ago
Resolution: | othersoftware |
---|---|
Status: | closed → reopened |
colorTypeHeatMapTune
seems to be null