Modify

Opened 13 years ago

Closed 13 years ago

#7498 closed defect (fixed)

NPE when using filter

Reported by: Cobra Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: template_report Cc: bastiK

Description

What steps will reproduce the problem?

  1. set a filter (e.g. "highway:", inverted, do not hide the filtered elements)
  2. move the cursor over a node of a non-filtered way (e.g. highway=residential), causing it to be highlighted
  3. trigger a redraw (either by the initial highlight or by doing anything else including switching windows)

What is the expected result?
obviously nothing except for the highlighting

What happens instead?
Tthis error. again and again. josm is rather unusable.

Please provide any additional information below. Attach a screenshot if
possible.
This seems to depend on freshly downloaded/opened data. Deactivating and reactiving the filter after this error occurred won't trigger it again.

I'm rating this as major, since it makes josm quite unusable but saving and uploading is still possible when suppressing further errors of this type.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-03-11 02:32:23
Last Changed Author: Don-vip
Revision: 5068
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-03-11 02:01:33 +0100 (Sun, 11 Mar 2012)
Last Changed Rev: 5068

Identification: JOSM/1.5 (5068 en)
Memory Usage: 275 MB / 910 MB (68 MB allocated, but free)
Java version: 1.6.0_30, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: FastDraw (27981)
Plugin: FixAddresses (27907)
Plugin: ImportImagePlugin (27906)
Plugin: InfoMode (27981)
Plugin: PicLayer (27883)
Plugin: alignways (27852)
Plugin: buildings_tools (27984)
Plugin: licensechange (27964)
Plugin: measurement (27957)
Plugin: openstreetbugs (27852)
Plugin: openvisible (27852)
Plugin: pdfimport (27867)
Plugin: proj4j (27902)
Plugin: restart (27852)
Plugin: reverter (27865)
Plugin: terracer (27852)
Plugin: undelete (27852)
Plugin: utilsplugin2 (28028)

java.lang.NullPointerException
	at javax.swing.GrayFilter.createDisabledImage(GrayFilter.java:32)
	at org.openstreetmap.josm.gui.mappaint.MapImage.getDisabled(MapImage.java:46)
	at org.openstreetmap.josm.gui.mappaint.NodeElemStyle.paintPrimitive(NodeElemStyle.java:237)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer$StyleCollector.drawAll(StyledMapRenderer.java:140)
	at org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.render(StyledMapRenderer.java:233)
	at org.openstreetmap.josm.gui.layer.OsmDataLayer.paint(OsmDataLayer.java:280)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:455)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:509)
	at javax.swing.JComponent.paintChildren(JComponent.java:862)
	at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1030)
	at javax.swing.JComponent.paint(JComponent.java:1038)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1491)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1422)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:294)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1225)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:786)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:694)
	at javax.swing.RepaintManager.access$700(RepaintManager.java:41)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1636)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
	at java.awt.EventQueue.access$000(EventQueue.java:84)
	at java.awt.EventQueue$1.run(EventQueue.java:607)
	at java.awt.EventQueue$1.run(EventQueue.java:605)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Change History (4)

comment:1 by akks, 13 years ago

I was able to reproduce it only when using Ctrl-Alt-E to turn filter on/off.

comment:2 by akks, 13 years ago

In 5074/josm:

Fix NPE for disabled image loading, see #7498, #7491 (please check!)

comment:3 by akks, 13 years ago

Cc: bastiK added

comment:4 by akks, 13 years ago

Resolution: fixed
Status: newclosed

seem to be fixed.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.