Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7907 closed defect (fixed)

Error Loading data from the API

Reported by: pierzen Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Start JOSM
  2. Load data from the API all city of Alep

What is the expected result?
I searched for Aleppo, Syria, then selected all city. Data should load without error messages.

What happens instead?
Everything works fine loading small sections of the city. Then loading larger sections, the data is loaded but JOSM error message is reported.

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-07-27 01:31:07
Last Changed Author: simon04
Revision: 5369
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-26 19:54:44 +0200 (Thu, 26 Jul 2012)
Last Changed Rev: 5369

Identification: JOSM/1.5 (5369 fr)
Memory Usage: 80 MB / 247 MB (28 MB allocated, but free)
Java version: 1.6.0_33, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP
Dataset consistency test: No problems found

Plugin: licensechange (28412)
Plugin: openstreetbugs (28412)
Plugin: reverter (28503)
Plugin: turnrestrictions (28412)
Plugin: utilsplugin2 (28412)

java.lang.NullPointerException
	at org.openstreetmap.josm.data.osm.visitor.paint.MapPainter.drawTextOnPath(MapPainter.java:464)
	at org.openstreetmap.josm.gui.mappaint.LineTextElemStyle.paintPrimitive(LineTextElemStyle.java:35)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$StyleCollector.drawAll(StyledMapRenderer.java:139)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:232)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:281)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:455)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:534)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$700(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.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.Dialog$1.run(Unknown Source)
	at java.awt.Dialog$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	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:170)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.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 (0)

Change History (7)

comment:1 Changed 7 years ago by Don-vip

I cannot reproduce. Can you attach your data set ?

comment:2 Changed 7 years ago by Don-vip

However I got strange output on console when playing with Map paint styles:

Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property casing-color to type class java.awt.Color: found #66066 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!
Warning: unable to convert property fill-color to type class java.awt.Color: found color: #664466 of type class java.lang.String!

EDIT: OK, reproduced.

Last edited 7 years ago by Don-vip (previous) (diff)

comment:3 Changed 7 years ago by Don-vip

I'm on the rush and cannot investigate further. The NPE occurs on p.
Here are the variables values in the function when the NPE occurs:

this	MapPainter  (id=133)	
way	Way  (id=139)	
text	TextElement  (id=152)	
name	"شارع البحتري" (id=155)	
poly	Polygon  (id=159)	
lastPoint	Point  (id=164)	
it	CopyList$Itr  (id=168)	
pathLength	62.89397624427238	
fontMetrics	FontDesignMetrics  (id=171)	
rec	Rectangle2D$Float  (id=190)	
t1	0.062756218605206	
t2	0.937243781394794	
p1	 (id=187)	
p2	 (id=189)	
angleOffset	0.0	
offsetSign	1.0	
tStart	0.062756218605206	
frc	FontRenderContext  (id=177)	
gv	StandardGlyphVector  (id=180)	
i	10	
rect	Rectangle2D$Float  (id=174)	
t	1.0803417462149083	
p	null	<-- NPE
---
way: {Way id=24887560 version=18 VT nodes=[{Node id=270422128 version=6 V lat=36.2074991,lon=37.1336121}, {Node id=270422129 version=6 V lat=36.2073274,lon=37.1336266}, {Node id=270421810 version=6 V lat=36.2072027,lon=37.1337468}, {Node id=539078394 version=1 V lat=36.2070161,lon=37.1345909}, {Node id=1839783779 version=1 V lat=36.2067761,lon=37.1356769}, {Node id=539078305 version=1 V lat=36.2065338,lon=37.1367734}, {Node id=270421811 version=6 V lat=36.2064686,lon=37.1370684}, {Node id=270228837 version=8 V lat=36.2063093,lon=37.1377122}, {Node id=270228821 version=8 V lat=36.2061846,lon=37.1383473}, {Node id=270421812 version=6 V lat=36.2061639,lon=37.1388709}, {Node id=544487494 version=1 V lat=36.2061021,lon=37.1393257}, {Node id=325670484 version=5 V lat=36.2060398,lon=37.1397848}, {Node id=325670613 version=4 V lat=36.2059778,lon=37.1402412}, {Node id=325670351 version=6 V lat=36.2059164,lon=37.1406934}, {Node id=325670809 version=4 V lat=36.2058279,lon=37.1413446}, {Node id=325671476 version=2 V lat=36.2057389,lon=37.142}, {Node id=544488161 version=1 V lat=36.2056869,lon=37.1423828}, {Node id=270421813 version=6 V lat=36.2055752,lon=37.1432053}, {Node id=270421814 version=8 V lat=36.2056237,lon=37.1435058}, {Node id=544487637 version=1 V lat=36.2058151,lon=37.143976}, {Node id=540565439 version=1 V lat=36.2059501,lon=37.1443074}, {Node id=544487660 version=1 V lat=36.2063015,lon=37.1453884}, {Node id=270421816 version=6 V lat=36.2066486,lon=37.1464841}, {Node id=270421580 version=7 V lat=36.206711,lon=37.1468703}]}
---
text: TextElement{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Dialog,name=Helvetica,style=plain,size=12] color=#000000 haloRadius=2.0 haloColor=java.awt.Color[r=255,g=255,b=255]}
---
gv: SGV{font: java.awt.Font[family=Dialog,name=Helvetica,style=plain,size=12], frc: java.awt.font.FontRenderContext@4e94adfe, glyphs: (12)[3b5, 38d, 3ad, 3c9, 3, 38d, 3dd, 38f, 3a1, 395, 3ad, 3f1], positions: (26)[0.0@0.0, 10.0@0.0, 12.0@0.0, 18.0@0.0, 25.0@0.0, 28.0@0.0, 30.0@0.0, 36.0@0.0, 45.0@0.0, 52.0@0.0, 61.0@0.0, 67.0@0.0, 75.0@0.0], flags: tx}
---
rect: java.awt.geom.Rectangle2D$Float[x=61.0,y=-12.064453,w=6.0,h=15.09375]
---

comment:4 Changed 7 years ago by Don-vip

Simple steps to reproduce:

  1. Download way 24887560
  2. Enable Potlatch2 map paint style
  3. Zoom out several times. NPE occurs

comment:5 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 5374/josm:

fix #7907 - NPE when rendering way name at low zoom

comment:6 Changed 7 years ago by Don-vip

In 5376/josm:

see #7907 - MapCSS fixes

comment:7 Changed 7 years ago by Don-vip

Ticket #7933 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 team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.