Modify

Opened 5 years ago

Closed 5 years ago

#12965 closed defect (fixed)

NPE in AbstractTileSourceLayer.estimateMemoryUsage

Reported by: Don-vip Owned by: wiktorn
Priority: blocker Milestone: 16.06
Component: Core imagery Version:
Keywords: template_report regression Cc: wiktorn, michael2402

Description

What steps will reproduce the problem?

  1. Start JOSM
  2. Select menu entry Imagery => Bing to create new TMS layer. No result
  3. Try again, no result
  4. Download OSM data => NPE
Build-Date:2016-06-15 09:12:29
Revision:10377
Is-Local-Build:true

Identification: JOSM/1.5 (10377 SVN en) Windows 10 64-Bit
Memory Usage: 605 MB / 3634 MB (113 MB allocated, but free)
Java version: 1.8.0_91-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Dfile.encoding=UTF-8]
Program arguments: [--debug]

Plugins:
- cadastre-fr (32212)
- ejml (32158)
- geotools (31895)
- jts (31906)
- log4j (32158)
- measurement (32158)
- utilsplugin2 (32158)

Last errors/warnings:
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.download.DownloadDialog$DownloadAction@120a9902
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.download.DownloadDialog$CancelAction@4d9fda66
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.measurement.MeasurementDialog$1@6eaa549f
- E: org.openstreetmap.josm.tools.bugreport.ReportedException: java.lang.NullPointerException. Cause: java.lang.NullPointerException
- E: java.lang.reflect.InvocationTargetException. Cause: java.lang.NullPointerException

java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1321)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:98)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:159)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.estimateMemoryUsage(AbstractTileSourceLayer.java:682)
	at org.openstreetmap.josm.gui.layer.Layer.hookUpMapView(Layer.java:175)
	at org.openstreetmap.josm.Main.addLayer(Main.java:800)
	at org.openstreetmap.josm.Main.addLayer(Main.java:783)
	at org.openstreetmap.josm.Main.addLayer(Main.java:770)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.addNewLayerIfRequired(DownloadOsmTask.java:261)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$AbstractInternalTask.loadData(DownloadOsmTask.java:268)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.finish(DownloadOsmTask.java:350)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable$2.run(PleaseWaitRunnable.java:101)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1673)
	at java.awt.Component.setVisible(Component.java:1625)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor$4.run(PleaseWaitProgressMonitor.java:197)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by wiktorn

Owner: changed from team to wiktorn
Status: newassigned

comment:2 Changed 5 years ago by wiktorn

Resolution: fixed
Status: assignedclosed

In 10391/josm:

Fixes for LayerManager.

  • LayerManager: invoke hookupMapView at the end of addLayer so layer's initialization code depending on presence of MapView will be executed
  • Main: moved creation of mapFrame from addLayer(...) to anonymous LayerManager listener, so hookupMapView can depend on the fact, that mapFrame exists
  • AbstractTileSourceLayer: forced generation of the event for this layer, so MouseAdapter listeners will be properly registered

Closes: #12964, #12965

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain wiktorn.
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.