Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11593 closed defect (fixed)

NPE in mapcss.parsergen.ParseException.initialise blocks JOSM start

Reported by: geofrizz@… Owned by: team
Priority: blocker Milestone: 15.08
Component: Core Version:
Keywords: template_report mapcss npe regression javacc Cc: bastiK, simon04

Description

What steps will reproduce the problem?

  1. When start

What is the expected result?

What happens instead?

It will not start but the process remains up !!

2600 ? S 0:00 \_ /bin/sh /usr/bin/josm-latest
2615 ? Sl 0:16 \_ /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Djosm.restart=true -Djosm.home=/

(from the command: ps)

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-06-22 01:32:14
Last Changed Author: Don-vip
Revision: 8519
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-06-21 15:39:45 +0200 (Sun, 21 Jun 2015)
Last Changed Rev: 8519

Identification: JOSM/1.5 (8519 en) Linux Ubuntu 14.04.2 LTS
Memory Usage: 1238 MB / 7282 MB (1143 MB allocated, but free)
Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u79-2.5.5-0ubuntu0.14.04.2
VM arguments: [-Djosm.restart=true, -Djosm.home=/home/geofrizz/.josm-latest, -Djava.net.useSystemProxies=true]

Plugins:
- BuildingGeneralization
- FixAddresses
- Mapillary
- buildings_tools
- commons-imaging
- imagery_offset_db
- measurement
- merge-overlap
- namemanager
- pbf
- reltoolbox
- reverter
- tageditor
- todo
- undelete
- utilsplugin2
- waydownloader

Last errors/warnings:
- E: Failed to locate image 'icons/hot_camping.n.24.png'
- W: Could not get presets icon icons/hot_camping.n.24.png
- E: Failed to locate image ''
- W: Could not get presets icon 
- E: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException. Cause: java.util.concurrent.ExecutionException: java.lang.NullPointerException. Cause: java.lang.NullPointerException

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at org.openstreetmap.josm.Main.<init>(Main.java:632)
	at org.openstreetmap.josm.gui.MainApplication.<init>(MainApplication.java:90)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:445)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at org.openstreetmap.josm.Main.<init>(Main.java:629)
	... 2 more
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException.initialise(ParseException.java:125)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException.<init>(ParseException.java:39)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.generateParseException(MapCSSParser.java:3585)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.error_skipto(MapCSSParser.java:2070)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.sheet(MapCSSParser.java:858)
	at org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource.loadStyleSource(MapCSSStyleSource.java:394)
	at org.openstreetmap.josm.gui.mappaint.MapPaintStyles.loadStyleForFirstTime(MapPaintStyles.java:260)
	at org.openstreetmap.josm.gui.mappaint.MapPaintStyles.readFromPreferences(MapPaintStyles.java:253)
	at org.openstreetmap.josm.gui.preferences.map.MapPaintPreference.initialize(MapPaintPreference.java:181)
	at org.openstreetmap.josm.Main$6.initialize(Main.java:614)
	at org.openstreetmap.josm.Main$InitializationTask.call(Main.java:707)
	at org.openstreetmap.josm.Main$InitializationTask.call(Main.java:691)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

Attachments (0)

Change History (15)

comment:1 Changed 3 years ago by Don-vip

Milestone: 15.07
Priority: majorblocker

comment:2 Changed 3 years ago by Don-vip

Summary: Not start !!NPE in mapcss.parsergen.ParseException.initialise blocks JOSM start

comment:3 Changed 3 years ago by Don-vip

Cc: bastiK simon04 added
Keywords: mapcss npe added

comment:4 Changed 3 years ago by Don-vip

Keywords: regression added

comment:5 Changed 3 years ago by Don-vip

Keywords: javacc added

It looks like JavaCC fails to produce robust code, no?

comment:6 Changed 3 years ago by Don-vip

In 8521/josm:

see #11593, see #11579 - MapCSS: display mapcss parsing exceptions early in case of later JavaCC exception

comment:7 Changed 3 years ago by bastiK

@geofrizz: Could you please attach the map style that is causing the error?

comment:8 in reply to:  7 ; Changed 3 years ago by Klumbumbus

Replying to bastiK:

@geofrizz: Could you please attach the map style that is causing the error?

I suppose it was the "fixme style" (#11579), which is fixed on the server meanwhile but still wrong cached on pc.

comment:9 in reply to:  8 Changed 3 years ago by Don-vip

Replying to Klumbumbus:

I suppose it was the "fixme style" (#11579), which is fixed on the server meanwhile but still wrong cached on pc.

Yes it's because of this style with "close" or "closes" instead of "closed".
It results in raising a parseexception with token.next == null.
I have no idea how to fix that as it is code produced by javaCC.

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

comment:10 Changed 3 years ago by grinapo

(Just as a workaround for the less javically experienced people out there (like me): I have basically deleted $HOME/.josm/cache and plugins, started JOSM successfully, re-dowloaded plugin list, updated them again, and JOSM was able to start with plugins.)

comment:11 in reply to:  10 ; Changed 3 years ago by Klumbumbus

Replying to grinapo:

(Just as a workaround for the less javically experienced people out there (like me): I have basically deleted $HOME/.josm/cache and plugins, started JOSM successfully, re-dowloaded plugin list, updated them again, and JOSM was able to start with plugins.)

It should be enough to just delet the file mirror_https___josm.openstreetmap.de_josmfile_page_Styles_Fixme_style in the cache folder (atleast this worked for me)

Last edited 3 years ago by Klumbumbus (previous) (diff)

comment:12 in reply to:  11 Changed 3 years ago by skorbut

Replying to Klumbumbus:

It should be enough to just delet the file mirror_https___josm.openstreetmap.de_josmfile_page_Styles_Fixme_style in the cache folder (atleast this worked for me)

This worked for me as well.

comment:13 Changed 3 years ago by Don-vip

I have created a new JavaCC issue: https://java.net/jira/browse/JAVACC-289

comment:14 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 8539/josm:

fix #11593 - patch locally ParseException.template to fix NPE until https://java.net/jira/browse/JAVACC-289 is fixed
Edit: Fixed in https://java.net/projects/javacc/sources/1357/diff//?rev1=698&rev2=699

comment:15 Changed 3 years ago by Don-vip

Milestone: 15.0715.08

Milestone renamed

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.