#11593 closed defect (fixed)
NPE in mapcss.parsergen.ParseException.initialise blocks JOSM start
Reported by: | 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?
- 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 (19)
comment:1 by , 9 years ago
Milestone: | → 15.07 |
---|---|
Priority: | major → blocker |
comment:2 by , 9 years ago
Summary: | Not start !! → NPE in mapcss.parsergen.ParseException.initialise blocks JOSM start |
---|
comment:3 by , 9 years ago
Cc: | added |
---|---|
Keywords: | mapcss npe added |
comment:4 by , 9 years ago
Keywords: | regression added |
---|
comment:5 by , 9 years ago
Keywords: | javacc added |
---|
follow-up: 8 comment:7 by , 9 years ago
@geofrizz: Could you please attach the map style that is causing the error?
follow-up: 9 comment:8 by , 9 years ago
comment:9 by , 9 years ago
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.
follow-up: 11 comment:10 by , 9 years ago
(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.)
follow-up: 12 comment:11 by , 9 years ago
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)
comment:12 by , 9 years ago
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 by , 9 years ago
I have created a new JavaCC issue: https://java.net/jira/browse/JAVACC-289
comment:16 by , 4 years ago
Our fix was:
-
templates/ParseException.template
diff --git a/templates/ParseException.template b/templates/ParseException.template index a74185c..5877db2 100644
a b public class ParseException extends Exception { 119 119 tok = tok.next; 120 120 } 121 121 #if KEEP_LINE_COLUMN 122 retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; 122 if (currentToken.next != null) { 123 retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; 124 } 123 125 #fi 124 126 retval += "." + EOL; 125 127
Problem not patched in https://github.com/javacc/javacc/blob/713f4b574a1068bb64ed0a8e3589c1aa902fc116/src/main/resources/templates/ParseException.template#L122 and resurfaced as #19685 (due to #16860).
Submitted a pull request: https://github.com/javacc/javacc/pull/182
It looks like JavaCC fails to produce robust code, no?