Modify

Opened 6 years ago

Closed 6 years ago

#9703 closed defect (fixed)

Turning on key>value type filter causes unexpected exception

Reported by: randoogle Owned by: team
Priority: normal Milestone: 14.02
Component: Core Version: latest
Keywords: filter, exception Cc:

Description

What steps will reproduce the problem?

  1. click "Add" under Filter window
  2. enter any key>value combination. Example "addr:housenumber">2 or lanes>2
  3. activate filter, and exception error appears every time it is activated

What is the expected result?
I would expect to see objects to be selected or hidden, based on the filter parameters.
For example, if I'm looking for all roads with more than two lanes, I would expect a "lanes>2" filter to show them.

What happens instead?
Unexpected exception error message pops up, and nothing is filtered.

Please provide any additional information below. Attach a screenshot if
possible.

This also seems to occur when I use the greater than ">" in a search rather than a filter.
Also, it doesn't seem to matter what data I download ahead of time. I even grabbed this section that had almost nothing in it, and I still get the error.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-01-29 15:23:51
Last Changed Author: Don-vip
Revision: 6767
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-01-29 16:18:16 +0100 (Wed, 29 Jan 2014)
Last Changed Rev: 6767

Identification: JOSM/1.5 (6767 en) Windows 7 64-Bit
Memory Usage: 60 MB / 247 MB (15 MB allocated, but free)
Java version: 1.7.0_45, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.policy=file:C:\Program Files (x86)\Java\jre7\lib\security\javaws.policy, -DtrustProxy=true, -Xverify:remote, -Djnlpx.home=C:\Program Files (x86)\Java\jre7\bin, -Djnlpx.origFilenameArg=C:\Users\randy\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\21\73111055-5adad566, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Xbootclasspath/a:C:\Program Files (x86)\Java\jre7\lib\javaws.jar;C:\Program Files (x86)\Java\jre7\lib\deploy.jar;C:\Program Files (x86)\Java\jre7\lib\plugin.jar, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=1270, -Djnlp.application.href=http://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=C:\Program Files (x86)\Java\jre7\bin\javaw.exe, -Djnlpx.vmargs=-Djava.util.Arrays.useLegacyMergeSort=true -Djnlp.application.href=http://josm.openstreetmap.de/download/josm.jnlp]
Dataset consistency test: No problems found


java.lang.NullPointerException
	at org.openstreetmap.josm.actions.search.SearchCompiler$ValueComparison.match(SearchCompiler.java:546)
	at org.openstreetmap.josm.data.osm.FilterMatcher.test(FilterMatcher.java:223)
	at org.openstreetmap.josm.data.osm.FilterMatcher.isDisabled(FilterMatcher.java:305)
	at org.openstreetmap.josm.data.osm.FilterWorker.doExecuteFilters(FilterWorker.java:48)
	at org.openstreetmap.josm.data.osm.FilterWorker.executeFilters(FilterWorker.java:32)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.executeFilters(FilterTableModel.java:87)
	at org.openstreetmap.josm.gui.dialogs.FilterDialog.dataChanged(FilterDialog.java:321)
	at org.openstreetmap.josm.data.osm.event.DataChangedEvent.fire(DataChangedEvent.java:26)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.fireConsolidatedEvents(DatasetEventManager.java:125)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager.access$300(DatasetEventManager.java:27)
	at org.openstreetmap.josm.data.osm.event.DatasetEventManager$1.run(DatasetEventManager.java:197)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:172)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Attachments (1)

ScreenClip.png (92.0 KB) - added by randoogle 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by randoogle

Attachment: ScreenClip.png added

comment:1 Changed 6 years ago by akks

I confirm, it is reproducible, Ctrl-F search with "addr:housenumber">2 or lanes>2 gives this exception too.

Looking in the code to fix...

comment:2 Changed 6 years ago by akks

Milestone: 14.02

comment:3 Changed 6 years ago by akks

Resolution: fixed
Status: newclosed

In 6831/josm:

fix #9703: key>value in search or filter gave NPE for non-existing key

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.