Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13038 closed defect (fixed)

NullPointerException when loading saved session

Reported by: osmTOGA Owned by: michael2402
Priority: normal Milestone: 16.06
Component: Core Version: latest
Keywords: template_report gsoc-core Cc:

Description

What steps will reproduce the problem?

  1. Start JOSM
  2. Load saved session

What is the expected result?

Saved session loads.

What happens instead?

Apart from the main menu and main toolbar the screen stays blank and the error pops up.

Please provide any additional information below. Attach a screenshot if possible.

After this first error JOSM is totally unusable, every further interaction results in another error. Even closing JOSM works only via the console window.

As a workaround I can first open a new layer and then load the saved session.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-06-23 02:35:10 +0200 (Thu, 23 Jun 2016)
Build-Date:2016-06-23 01:34:05
Revision:10463
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10463 de) Windows 7 64-Bit
Memory Usage: 651 MB / 2222 MB (458 MB allocated, but free)
Java version: 1.8.0_91-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Plugins:
- Mapillary (32158)
- PicLayer (32158)
- RoadSigns (32177)
- apache-commons (32158)
- apache-http (32158)
- buildings_tools (32158)
- continuosDownload (53)
- ejml (32158)
- geochat (32158)
- geotools (31895)
- imagery_offset_db (32158)
- jts (31906)
- measurement (32324)
- opendata (32289)
- reverter (32158)
- todo (29154)
- turnrestrictions (32375)
- utilsplugin2 (32158)

Tagging presets:
- https://josm.openstreetmap.de/josmfile?page=Presets/Communication_Towers&zip=1
- https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1

Map paint styles:
- %UserProfile%\OSM\JOSM-Paintstyles\Power_lines.mapcss
- https://dl.dropbox.com/u/8010189/Forum%20attachments/Hide_nodes.mapcss
- https://github.com/hotosm/HDM-JOSM-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1

Last errors/warnings:
- W: Datei <josm.cache>\tiles\TMS_INDEX.key kann nicht gelöscht werden
- W: Datei <josm.cache>\tiles\TMS_INDEX.data kann nicht gelöscht werden
- W: Datei <josm.cache>\tiles\TMS_INDEX_v2.key kann nicht gelöscht werden
- W: Datei <josm.cache>\tiles\TMS_INDEX_v2.data kann nicht gelöscht werden
- E: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.NullPointerException. Ursache: java.lang.NullPointerException

=== REPORTED CRASH DATA ===
MapView#layerAdded:
 - layer: org.openstreetmap.josm.gui.layer.TMSLayer@5200f931

LayerManager#fireLayerAdded:
 - listener: org.openstreetmap.josm.gui.MainPanel$1@3af1fed
 - event: LayerAddEvent [addedLayer=org.openstreetmap.josm.gui.layer.TMSLayer@5200f931]

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (19) of main
java.lang.NullPointerException
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.attachToMapView(AbstractTileSourceLayer.java:636)
	at org.openstreetmap.josm.gui.MapView.layerAdded(MapView.java:605)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayerChangeListener(LayerManager.java:319)
	at org.openstreetmap.josm.gui.MapView.<init>(MapView.java:512)
	at org.openstreetmap.josm.gui.MapFrame.<init>(MapFrame.java:198)
	at org.openstreetmap.josm.gui.MainPanel.createNewMapFrame(MainPanel.java:91)
	at org.openstreetmap.josm.gui.MainPanel.updateContent(MainPanel.java:66)
	at org.openstreetmap.josm.gui.MainPanel$1.layerAdded(MainPanel.java:160)
	at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(LayerManager.java:357)
	at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(LayerManager.java:176)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:200)
	at org.openstreetmap.josm.gui.layer.LayerManager$1.run(LayerManager.java:163)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:146)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:160)
	at org.openstreetmap.josm.actions.SessionLoadAction$Loader.addLayers(SessionLoadAction.java:131)
	at org.openstreetmap.josm.actions.SessionLoadAction$Loader.access$100(SessionLoadAction.java:64)
	at org.openstreetmap.josm.actions.SessionLoadAction$Loader$1.run(SessionLoadAction.java:119)
	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 java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:197)
	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.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 (1)

patch-fix-13038.patch (744 bytes ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by stoecker, 8 years ago

Keywords: gosc-core added
Milestone: 16.06
Owner: changed from team to michael2402

comment:2 by Don-vip, 8 years ago

Keywords: gsoc-core added; gosc-core removed

by michael2402, 8 years ago

Attachment: patch-fix-13038.patch added

comment:3 by michael2402, 8 years ago

This patch fixes it.

I don't know if this is even required any more but I kept it to be sure...

comment:4 by stoecker, 8 years ago

Can we drop that part and see if the fix actually is required at all anymore and if, then fix the real issue?

comment:5 by michael2402, 8 years ago

I'd like to wait with that until we change the code to really support multiple MapView instances and just leave it for the next release. There are some more Main.map.mapView accesses that need fixing in the TMS code.

Last edited 8 years ago by michael2402 (previous) (diff)

comment:6 by stoecker, 8 years ago

Resolution: fixed
Status: newclosed

In 10480/josm:

fix #13038 - patch by Michael Zangl - gsoc-core - fix exception

comment:7 by stoecker, 8 years ago

Ticket #13057 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain michael2402.
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.