Modify

Opened 6 years ago

Last modified 22 months ago

#8449 new defect

NPE at SearchCompiler$InView.getBounds when initially loading data with filter set

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: filter Cc:

Description

I updated some old attributes on nodes when i discovered this error in build 5697.

Here's how i was able to reproduce it:

  • Start JOSM and load a random map piece
  • Create a filter "building=entrance type:node inview" and invert it that it shows only nodes having this attribute. Select "Replace selection" at the radio buttons on the left.
  • Quit JOSM while filter is still active! It gets saved to the default parameters for next start of JOSM
  • Restart JOSM and load a random map piece -> Crash window appears after map data download progress window closes

It doesn't matter if the filter fits on nodes in the loaded map piece or not.

After the crash the "Window" drop-down menu is enabled, but the screen still shows the startup news. When selecting a menu item, another crash occurs. The map is not shown.

Fix: go to the settings menu, select the tab for direct configuration modification, search the entries for "filter", search the enabled filter, set "enabled = false" and restart JOSM.

Identification: JOSM/1.5 (5697 de)
Memory Usage: 45 MB / 494 MB (16 MB allocated, but free)
Java version: 1.7.0_15, Oracle Corporation, Java HotSpot(TM) Client VM
Operating system: Windows 7

Plugin: FixAddresses (29210)
Plugin: HouseNumberTaggingTool (29210)
Plugin: OpeningHoursEditor (29210)
Plugin: buildings_tools (29210)
Plugin: namemanager (29210)
Plugin: openstreetbugs (29210)
Plugin: osmarender (29210)
Plugin: public_transport (29222)
Plugin: restart (29210)
Plugin: reverter (29216)
Plugin: tageditor (29210)
Plugin: terracer (29210)
Plugin: turnrestrictions (29210)

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by Don-vip

Confirmed with r5739:

Identification: JOSM/1.5 (5739 SVN en_GB)
Memory Usage: 127 MB / 1813 MB (100 MB allocated, but free)
Java version: 1.6.0_39, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM
Operating system: Windows 8

java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1086)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1063)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:87)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.actions.search.SearchCompiler$InView.getBounds(SearchCompiler.java:1137)
	at org.openstreetmap.josm.actions.search.SearchCompiler$InArea.<init>(SearchCompiler.java:1091)
	at org.openstreetmap.josm.actions.search.SearchCompiler$InView.<init>(SearchCompiler.java:1132)
	at org.openstreetmap.josm.actions.search.SearchCompiler$CoreSimpleMatchFactory.get(SearchCompiler.java:124)
	at org.openstreetmap.josm.actions.search.SearchCompiler.parseFactor(SearchCompiler.java:1250)
	at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1180)
	at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1189)
	at org.openstreetmap.josm.actions.search.SearchCompiler.parseExpression(SearchCompiler.java:1189)
	at org.openstreetmap.josm.actions.search.SearchCompiler.parse(SearchCompiler.java:1165)
	at org.openstreetmap.josm.actions.search.SearchCompiler.compile(SearchCompiler.java:1155)
	at org.openstreetmap.josm.data.osm.FilterMatcher$FilterInfo.<init>(FilterMatcher.java:86)
	at org.openstreetmap.josm.data.osm.FilterMatcher.update(FilterMatcher.java:105)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.updateFilters(FilterTableModel.java:58)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.loadPrefs(FilterTableModel.java:184)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.<init>(FilterTableModel.java:50)
	at org.openstreetmap.josm.gui.dialogs.FilterDialog.<init>(FilterDialog.java:61)
	at org.openstreetmap.josm.gui.MapFrame.<init>(MapFrame.java:230)
	at org.openstreetmap.josm.Main.createMapFrame(Main.java:422)
	at org.openstreetmap.josm.Main.addLayer(Main.java:412)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.finish(DownloadOsmTask.java:253)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable$2.run(PleaseWaitRunnable.java:89)

comment:2 Changed 6 years ago by Don-vip

In 5740/josm:

see #8449 - fix NPE but filter does not work as expected at JOSM restart (needs to be switched off/on)

comment:3 Changed 22 months ago by Don-vip

Keywords: crash on map load with removed
Summary: Crash when initially loading data with filter setNPE at SearchCompiler$InView.getBounds when initially loading data with filter set

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to anonymous
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.