Opened 7 years ago

Closed 5 years ago

#7701 closed defect (fixed)

Warning in styles pref dialog for changing "Enable built-in icon defaults" (was: NPE)

Reported by: stoecker Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:


When attached prefs are used and data is downloaded an NPE is the result

Repository Root:
Build-Date: 2012-05-02 01:31:00
Last Changed Author: stoecker
Revision: 5210
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2012-05-01 16:42:42 +0200 (Tue, 01 May 2012)
Last Changed Rev: 5210

Identification: JOSM/1.5 (5210 de)
Memory Usage: 109 MB / 910 MB (36 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: buildings_tools (27984)
Plugin: touchscreenhelper (27354)
Plugin: turnlanes (27927)

	at org.openstreetmap.josm.gui.mappaint.MapImage$1.finished(
	at org.openstreetmap.josm.gui.mappaint.MapImage.getImage(
	at org.openstreetmap.josm.gui.mappaint.NodeElemStyle.paintPrimitive(
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(
	at org.openstreetmap.josm.gui.MapView.paintLayer(
	at org.openstreetmap.josm.gui.MapView.paint(
	at javax.swing.JComponent.paintChildren(
	at javax.swing.JComponent.paint(
	at javax.swing.JComponent.paintToOffscreen(
	at javax.swing.BufferStrategyPaintManager.paint(
	at javax.swing.RepaintManager.paint(
	at javax.swing.JComponent._paintImmediately(
	at javax.swing.JComponent.paintImmediately(
	at javax.swing.RepaintManager.paintDirtyRegions(
	at javax.swing.RepaintManager.paintDirtyRegions(
	at javax.swing.RepaintManager.prePaintDirtyRegions(
	at javax.swing.RepaintManager.access$700(
	at javax.swing.RepaintManager$
	at java.awt.event.InvocationEvent.dispatch(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$000(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

Attachments (2)

preferences.xml (3.3 KB) - added by stoecker 7 years ago.
7701.patch (1.7 KB) - added by simon04 7 years ago.

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by stoecker

Attachment: preferences.xml added

comment:1 Changed 7 years ago by simon04

NPE is relatively easy to avoid, but I do not understand the problem:

Failed to locate image 'misc/landmark/power/tower_small.png' from dirs [], subdir '', zip 'null'
Failed to locate image 'misc/no_icon.png' from dirs [], subdir '', zip 'null'

Changed 7 years ago by simon04

Attachment: 7701.patch added

comment:2 Changed 7 years ago by simon04

Summary: NPE[Patch] NPE

comment:3 Changed 7 years ago by stoecker

Is mappaint.icon.enable-defaults=false the reason? In this case maybe we should at least print a warning, when a user disables that in preferences (and fix the NPE).

comment:4 Changed 7 years ago by simon04

With mappaint.icon.enable-defaults=true, it works nicely and loads tower_small.png as expected. What is the idea of disabling the default icons?

comment:5 Changed 7 years ago by stoecker

When you want to replace icons or completely choose another style this is necessary.

I think fix should be checked in and we should add a warning in prefs when this option is changed to false (must be somewhere in styles prefs tab).

comment:6 Changed 7 years ago by simon04

In 5257/josm:

see #7701 - NPE in MapImage

comment:7 Changed 7 years ago by bastiK

Summary: [Patch] NPENPE

Why not closed?

comment:8 in reply to:  7 Changed 7 years ago by simon04

Replying to bastiK:

Why not closed?

The warning message in the pref dialog is not yet implemented.

comment:9 Changed 7 years ago by simon04

Summary: NPEWarning in styles pref dialog for changing "Enable built-in icon defaults" (was: NPE)

comment:10 Changed 6 years ago by Don-vip

This option should also only be displayed in Expert mode.

comment:11 Changed 5 years ago by stoecker

Resolution: fixed
Status: newclosed

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.

Add Comment

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

Note: See TracTickets for help on using tickets.