Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11494 closed defect (fixed)

NPE: Error while loading object from cache: null

Reported by: naoliv Owned by: team
Priority: normal Milestone: 15.05
Component: Core imagery Version:
Keywords: Cc: wiktorn

Description

I was trying to use https://d2munx5tg0hw47.cloudfront.net/tiles/{z}/{x}/{y}.mapbox in a TMS layer and saw this:

AVISO: JCS - Exception during download https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox
AVISO: java.io.IOException: Server returned HTTP response code: 403 for URL: https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox. Causa: java.io.IOException: Server returned HTTP response code: 403 for URL: https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox
java.io.IOException: Server returned HTTP response code: 403 for URL: https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox
	at sun.reflect.GeneratedConstructorAccessor68.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1676)
	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1672)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.read(JCSCachedTileLoaderJob.java:449)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.loadObject(JCSCachedTileLoaderJob.java:362)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.run(JCSCachedTileLoaderJob.java:245)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1627)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.loadObject(JCSCachedTileLoaderJob.java:335)
	... 4 more
AVISO: JCS - Silent failure during download: https://d2munx5tg0hw47.cloudfront.net/tiles/5/10/18.mapbox
AVISO: JCS - Error while loading object from cache: null; https://d2munx5tg0hw47.cloudfront.net/tiles/5/11/17.mapbox
AVISO: java.lang.NullPointerException
java.lang.NullPointerException
	at org.openstreetmap.josm.gui.layer.ImageryLayer.sharpenImage(ImageryLayer.java:230)
	at org.openstreetmap.josm.gui.layer.TMSLayer.tileLoadingFinished(TMSLayer.java:197)
	at org.openstreetmap.josm.data.imagery.TMSCachedTileLoaderJob.loadingFinished(TMSCachedTileLoaderJob.java:209)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.finishLoading(JCSCachedTileLoaderJob.java:276)
	at org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.submit(JCSCachedTileLoaderJob.java:190)
	at org.openstreetmap.josm.data.imagery.TMSCachedTileLoaderJob.submit(TMSCachedTileLoaderJob.java:163)
	at org.openstreetmap.josm.gui.layer.TMSLayer.loadTile(TMSLayer.java:849)
	at org.openstreetmap.josm.gui.layer.TMSLayer.access$300(TMSLayer.java:104)
	at org.openstreetmap.josm.gui.layer.TMSLayer$TileSet.loadAllTiles(TMSLayer.java:1262)
	at org.openstreetmap.josm.gui.layer.TMSLayer$TileSet.access$1300(TMSLayer.java:1127)
	at org.openstreetmap.josm.gui.layer.TMSLayer.paint(TMSLayer.java:1411)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:535)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:635)
	at javax.swing.JComponent.paintChildren(JComponent.java:879)
	at javax.swing.JComponent.paint(JComponent.java:1055)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5212)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5160)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4971)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
	at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
	at java.awt.EventQueue.access$300(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:699)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

It seems to be inoffensive, but maybe the NPE should be handled more gracefully?

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by wiktorn

Resolution: fixed
Status: newclosed

In 8433/josm:

Clean up handling of various error situations. Closes #11494

comment:2 Changed 6 years ago by Don-vip

Milestone: 15.05

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.