Modify ↓
Opened 9 years ago
Closed 9 years ago
#12157 closed defect (fixed)
[Conflation Plugin] NullPointerException when the conflation layer is added to the map
Reported by: | coso | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin conflation | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Install "conflation" plugin and restart JOSM
- open the attached file subject.osm
- open the attached file reference.osm
- click "Configure" button on Conflation's toggle dialog
- select the way in reference.osm layer and click "Reference --> Freeze"
- select the way in subject.osm layer and click "Subject --> Freeze"
- click "Generate matches"
What is the expected result?
Matches are generated, "Conflation" layer is created and added to the map.
What happens instead?
Matches are generated, "Conflation" layer is created but there is a NullPointerException and the layer is not added to the map.
Please provide any additional information below.
- the conflation layer is build with new ConflationLayer() thus conflationLayer.matches is null
- the layer is then added to the map with Main.main.addLayer(conflationLayer) but there is a NullPointerException in visitBoundingBox(BoundingXYVisitor v) because conflationLayer.matches == null.
Proposed solution
Move Main.main.addLayer(conflationLayer) after conflationLayer.setMatches(matches)
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2015-11-24 00:04:12 +0100 (Tue, 24 Nov 2015) Build-Date:2015-11-23 23:14:21 Revision:9060 Relative:URL: ^/trunk Identification: JOSM/1.5 (9060 it) Linux Ubuntu 15.10 Memory Usage: 335 MB / 876 MB (243 MB allocated, but free) Java version: 1.7.0_91, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u91-2.6.3-0ubuntu0.15.10.1 VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true] Dataset consistency test: No problems found Plugins: - conflation (0.1.8) - jts (31772) - utilsplugin2 (31772)
Attachments (2)
Change History (3)
by , 9 years ago
Attachment: | subject.osm added |
---|
by , 9 years ago
Attachment: | reference.osm added |
---|
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
fixed in v0.1.9