Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11597 closed defect (fixed)

"MapCSSException: Invalid pseudo class specified: closed" if JOSM compiled with dist-optimized

Reported by: jcr83 Owned by: team
Priority: normal Milestone: 15.08
Component: Core Version: latest
Keywords: regression mapcss dist-optimized proguard Cc: bastiK, simon04

Description

Latest JOSM won't start :

Build-Date: 2015-06-23 14:44:53
Revision: 8525
Is-Local-Build: true

Identification: JOSM/1.5 (8525 SVN fr) Linux Gentoo/Linux
Memory Usage: 48 MB / 643 MB (13 MB allocated, but free)
Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: icedtea-bin:6.1.13.7
7.2.5.5

VM arguments: [-Djava.library.path=/lib:/usr/lib]


Last errors/warnings:
- E: org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException: Invalid pseudo class specified: closed
- 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:91)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:451)
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:3586)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.error_skipto(MapCSSParser.java:2071)
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.sheet(MapCSSParser.java:859)
	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 (1)

preferences.xml (20.1 KB ) - added by jcr83 9 years ago.
preferences.xml

Download all attachments as: .zip

Change History (16)

comment:1 by Klumbumbus, 9 years ago

Resolution: duplicate
Status: newclosed

Closed as duplicate of #11579.
It should be enough to just delete the file mirror_https___josm.openstreetmap.de_josmfile_page_Styles_Fixme_style in the cache folder

comment:2 by jcr83, 9 years ago

Sorry, problem not solved .
There is no file named mirror_https_josm.openstreetmap.de_josmfile_page_Styles_Fixme_style in the cache folder:

$ ls -l .josm/cache/
total 1400
-rw-r--r-- 1 jcr jcr 727 23 juin 15:01 capabilities1637351842
-rw-r--r-- 1 jcr jcr 1418080 23 juin 15:28 mirror_https_josm.openstreetmap.de_maps
-rw-r--r-- 1 jcr jcr 4282 23 juin 15:01 motd.html

comment:3 by Klumbumbus, 9 years ago

Can you please add the list of map styles, presets and validator rules you installed?

by jcr83, 9 years ago

Attachment: preferences.xml added

preferences.xml

comment:4 by jcr83, 9 years ago

Before reporting the bug, I have cleaned the .josm directory. So I think I have no styles, presets or rules installed. This is the content of my .josm folder :

$ tree .josm
.josm
├── cache
│ ├── capabilities1637351842
│ ├── mirror_https_josm.openstreetmap.de_maps
│ └── motd.html
├── preferences.xml
├── preferences.xml_backup
└── validator

I have uploaded the prefrences.xml file.

comment:5 by jcr83, 9 years ago

Resolution: duplicate
Status: closedreopened

in reply to:  description comment:6 by Don-vip, 9 years ago

Cc: bastiK simon04 added
Keywords: mapcss added
  • E: org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSException: Invalid pseudo class specified: closed

what the hell?

comment:7 by Don-vip, 9 years ago

Resolution: invalid
Status: reopenedclosed

OK I get it. It's a local build ant you haven't regenerated the JavaCC code. Please run ant clean && ant dist to solve the issue.

Version 0, edited 9 years ago by Don-vip (next)

comment:8 by jcr83, 9 years ago

I have used this Gentoo Linux ebuild :
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-geosciences/josm/josm-9999.ebuild

josm has been built in a clean directory. So there may be another problem.

FYI, I have alrready faced a build problem in Gentoo : see https://josm.openstreetmap.de/ticket/10325

This is the build log:

# emerge josm

>>> Emerging (1 of 1) sci-geosciences/josm-9999::gentoo
 * Using: icedtea-bin-7
>>> Unpacking source...
 * subversion update start -->
 *      repository: http://josm.openstreetmap.de/svn/trunk
Updating '.':

Fetching external item into 'src/org/openstreetmap/gui':
External at revision 31300.


Fetching external item into 'src/org/apache/commons/compress/compressors':
External at revision 1687180.


Fetching external item into 'images/styles/standard':
External at revision 31300.


Fetching external item into 'src/org/apache/commons/jcs':
External at revision 1687180.


Fetching external item into 'src/org/apache/commons/logging':
External at revision 1687180.


Fetching external item into 'windows/plugins/stdutils':
External at revision 91.

At revision 8525.
 *    working copy: /usr/portage/distfiles/svn-src/josm/trunk

>>> Source unpacked in /var/tmp/portage/sci-geosciences/josm-9999/work
>>> Preparing source in /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999 ...
cElementTree rewriter
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999 ...
 * Disabling all optional ANT_TASKS
Buildfile: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build.xml

init:
    [mkdir] Created dir: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
    [mkdir] Created dir: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/dist

javacc:
    [mkdir] Created dir: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen
     [exec] Java Compiler Compiler Version 6.1_2 (Parser Generator)
     [exec] (type "javacc" with no arguments for help)
     [exec] Reading from file /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj . . .
     [exec] Warning: Line 4, Column 3: Command line setting of "OUTPUT_DIRECTORY" modifies option value in file.
     [exec] Warning: Line 156, Column 5: Non-ASCII characters used in regular expression.
     [exec] Please make sure you use the correct Reader when you create the parser, one that can handle your character set.
     [exec] File "TokenMgrError.java" does not exist.  Will create one.
     [exec] File "ParseException.java" does not exist.  Will create one.
     [exec] File "Token.java" does not exist.  Will create one.
     [exec] File "SimpleCharStream.java" does not exist.  Will create one.
     [exec] Parser generated with 0 errors and 2 warnings.

-jaxb_win:

-jaxb_nix:

jaxb:
     [exec] parsing a schema...
     [exec] compiling a schema...
     [exec] org/openstreetmap/josm/data/imagery/types/EntryType.java
     [exec] org/openstreetmap/josm/data/imagery/types/ObjectFactory.java
     [exec] org/openstreetmap/josm/data/imagery/types/ProjectionType.java
     [exec] org/openstreetmap/josm/data/imagery/types/WmsCacheType.java
     [exec] org/openstreetmap/josm/data/imagery/types/package-info.java
     [exec] org/w3/_2001/xmlschema/Adapter1.java

compile:
    [javac] Compiling 433 source files to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
    [javac] Note: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/src/oauth/signpost/AbstractOAuthProvider.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] Compiling 1263 source files to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
    [javac] /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen/TokenMgrError.java:110: warning: [cast] redundant cast to int
    [javac]           (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + (int)curChar + "), ") +
    [javac]                                                                                               ^
    [javac] 1 warning
     [copy] Copying 1 file to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build

init-svn-revision-xml:

init-git-revision-xml:

create-revision:
   [delete] Deleting: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/REVISION.XML

check-schemas:

dist:
     [echo] Revision 8525
     [copy] Copying 1 file to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
     [copy] Copying 1 file to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
     [copy] Copying 1 file to /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/build
      [jar] Building jar: /var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/dist/josm-custom.jar

dist-optimized:
 [proguard] ProGuard, version 5.2
 [proguard] Reading program jar [/var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/dist/josm-custom.jar]
 [proguard] Reading library jar [/opt/icedtea-bin-7.2.5.5/jre/lib/rt.jar]
 [proguard] Reading library jar [/opt/icedtea-bin-7.2.5.5/jre/lib/jce.jar]
 [proguard] Preparing output jar [/var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/dist/josm-custom-optimized.jar]
 [proguard]   Copying resources from program jar [/var/tmp/portage/sci-geosciences/josm-9999/work/josm-9999/dist/josm-custom.jar]

BUILD SUCCESSFUL
Total time: 47 seconds
>>> Source compiled.
>>> Test phase [not enabled]: sci-geosciences/josm-9999

>>> Install josm-9999 into /var/tmp/portage/sci-geosciences/josm-9999/image/ category sci-geosciences
>>> Completed installing josm-9999 into /var/tmp/portage/sci-geosciences/josm-9999/image/


>>> Installing (1 of 1) sci-geosciences/josm-9999::gentoo

comment:9 by jcr83, 9 years ago

I was right : The josm-custom.jar works, but not the josm-custom-optimized.jar !
There is probably a problem in the build process of the optimized version.

comment:10 by jcr83, 9 years ago

Resolution: invalid
Status: closedreopened

comment:11 by jcr83, 9 years ago

Summary: MapCSSException: Invalid pseudo class specified: closed"MapCSSException: Invalid pseudo class specified: closed" if JOSM compiled with dist-optimized

comment:12 by jcr83, 9 years ago

Keywords: dist-optimized added

comment:13 by Don-vip, 9 years ago

Keywords: proguard added
Milestone: 15.07

comment:14 by Don-vip, 9 years ago

Resolution: fixed
Status: reopenedclosed

In 8532/josm:

fix #11597 - update Proguard rules

comment:15 by Don-vip, 9 years ago

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. 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.