Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10219 closed defect (fixed)

NPE in CachedFile.getInputStream during start

Reported by: Hedaja Owned by: team
Priority: blocker Milestone: 14.06
Component: Core Version: latest
Keywords: Cc: bastiK

Description (last modified by Don-vip)

I have had problems stating the latest JOSM version for a while now. Whe stating it says that there was a problem and ask if I want to report it. The loading splash screen gets stuck at "Hintergrundeinstellung laden ("loaing backgroundsettings").
Here is the crash report:

Repository Root:
Build-Date: 2014-07-02 01:34:24
Last Changed Author: Don-vip
Revision: 7281
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2014-07-01 20:31:49 +0200 (Tue, 01 Jul 2014)
Last Changed Rev: 7281

Identification: JOSM/1.5 (7281 de) Linux Ubuntu 14.04 LTS
Memory Usage: 107 MB / 878 MB (52 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u55-2.4.7-1ubuntu1

Plugin: FixAddresses
Plugin: HouseNumberTaggingTool
Plugin: OpeningHoursEditor
Plugin: RoadSigns
Plugin: buildings_tools
Plugin: contourmerge
Plugin: geochat
Plugin: gpsblam
Plugin: graphview
Plugin: imagery_offset_db
Plugin: kendzi3d
Plugin: kendzi3d-jogl
Plugin: log4j (30416)
Plugin: notes
Plugin: turnlanes
Plugin: turnrestrictions
Plugin: utilsplugin2

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at org.openstreetmap.josm.Main.<init>(
	at org.openstreetmap.josm.gui.MainApplication.<init>(
	at org.openstreetmap.josm.gui.MainApplication.main(
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.get(
	at org.openstreetmap.josm.Main.<init>(
	... 2 more
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.gui.tagging.TaggingPresetReader.readAll(
	at org.openstreetmap.josm.gui.tagging.TaggingPresetReader.readAll(
	at org.openstreetmap.josm.gui.tagging.TaggingPresetReader.readFromPreferences(
	at org.openstreetmap.josm.gui.tagging.TaggingPresets.readFromPreferences(
	at org.openstreetmap.josm.gui.tagging.TaggingPresets.initialize(
	at org.openstreetmap.josm.Main$3.initialize(
	at org.openstreetmap.josm.Main$
	at org.openstreetmap.josm.Main$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

running: Ubuntu 14.04 64bit

Attachments (0)

Change History (7)

comment:1 by Klumbumbus, 10 years ago

I don't know if this is the reason, but your Java version seems not up to date (atleast for windows the latest version is 1.7.0_60).

comment:2 by Don-vip, 10 years ago

Description: modified (diff)

comment:3 by Don-vip, 10 years ago

Cc: bastiK added
Keywords: error start removed
Milestone: 14.06

Regression of r7248?
What should we do if file is null for an URL not starting by resource ? Definitively not throwing an NPE at least :)

     * Get InputStream to the requested resource.
     * @return the InputStream
     * @throws IOException when the resource with the given name could not be retrieved
    public InputStream getInputStream() throws IOException {
        File file = getFile();
        if (file == null) {
            if (name.startsWith("resource://")) {
                InputStream is = getClass().getResourceAsStream(
                if (is == null)
                    throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
                return is;
        return new FileInputStream(file);

comment:4 by Don-vip, 10 years ago

Summary: JOSM starting errorNPE in CachedFile.getInputStream during start

in reply to:  1 comment:5 by anonymous, 10 years ago

Replying to Klumbumbus:

I don't know if this is the reason, but your Java version seems not up to date (atleast for windows the latest version is 1.7.0_60).

My system is updated. Java 1.70_55 is the latest version that's offered by the ubuntu main repostitory.
Im running the same system on my netbook and don't have any problems there.

comment:6 by bastiK, 10 years ago

Resolution: fixed
Status: newclosed

In 7282/josm:

fixed #10219 - NPE in CachedFile.getInputStream during start

comment:7 by Hedaja, 10 years ago

Your patch works fine
Thanks for the quick response and keep up the good work

Modify Ticket

Change Properties
Set your email in Preferences
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.