Modify ↓
Opened 13 years ago
Closed 13 years ago
#7577 closed defect (fixed)
NPE in Search Window
Reported by: | rickmastfan67 | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | search | Cc: | joshdoe |
Description
Steps to reproduce:
- Download some data from OSM or open an already saved file (doesn't matter, happens either way)
- Once the file/data is open/downloaded, do "Ctrl+F" to open up the Search window.
- Paste the following text in the search box (without the quotes, but keep them around the word "Decliner"): "All nodes that the "Decliner" added to this way have been deleted. He added no new tags, thus, the way is now OdbL-clean."
- JOSM crashes with a NPE.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2012-04-05 01:32:40 Last Changed Author: simon04 Revision: 5164 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2012-04-04 23:35:41 +0200 (Wed, 04 Apr 2012) Last Changed Rev: 5164 Identification: JOSM/1.5 (5164 en) Memory Usage: 149 MB / 2730 MB (80 MB allocated, but free) Java version: 1.6.0_31, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM Operating system: Windows 7 Dataset consistency test: No problems found Plugin: OpeningHoursEditor (27852) Plugin: buildings_tools (27984) Plugin: licensechange (27964) Plugin: mapdust (27884) Plugin: measurement (27957) Plugin: openstreetbugs (27852) Plugin: reverter (28089) Plugin: turnrestrictions (27891) Plugin: undelete (27852) Plugin: utilsplugin2 (28045) java.lang.NullPointerException at org.openstreetmap.josm.actions.search.SearchCompiler$NodeCountRange.<init>(SearchCompiler.java:834) at org.openstreetmap.josm.actions.search.SearchCompiler$CoreSimpleMatchFactory.get(SearchCompiler.java:114) at org.openstreetmap.josm.actions.search.SearchCompiler.parseFactor(SearchCompiler.java:1206) at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1136) at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1145) at org.openstreetmap.josm.actions.search.SearchCompiler.parse(SearchCompiler.java:1121) at org.openstreetmap.josm.actions.search.SearchCompiler.compile(SearchCompiler.java:1108) at org.openstreetmap.josm.actions.search.SearchAction$1.buttonAction(SearchAction.java:282) at org.openstreetmap.josm.gui.ExtendedDialog$1.actionPerformed(ExtendedDialog.java:302) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$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.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) 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.ExtendedDialog.setVisible(ExtendedDialog.java:463) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:269) at org.openstreetmap.josm.actions.search.SearchAction.showSearchDialog(SearchAction.java:299) at org.openstreetmap.josm.actions.search.SearchAction.search(SearchAction.java:453) at org.openstreetmap.josm.actions.search.SearchAction.actionPerformed(SearchAction.java:131) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.KeyboardManager.fireBinding(Unknown Source) at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$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)
Change History (6)
comment:1 by , 13 years ago
Keywords: | search added |
---|
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
Priority: | normal → minor |
---|
by , 13 years ago
Attachment: | fix_7577.patch added |
---|
comment:4 by , 13 years ago
Summary: | NPE in Search Window → [patch] NPE in Search Window |
---|
Fix attached. Since no colon followed nodes or tags, the tokenizer was null, and thus the NPE. The patch treats these as normal keywords if no colon is present.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | [patch] NPE in Search Window → NPE in Search Window |
Fixed in r5184, but does not appear on Trac :(
Note:
See TracTickets
for help on using tickets.
You're using a few special targets in there, nodes and tags, both of which expect a subsequent colon and number. Of course there shouldn't be an NPE, so I can try and see what's causing it; a warning should pop up instead. If you're looking for that exact phrase, you need to enclose it in quotes, and escape the quotes around Decliner: