Closed skazemi closed 4 years ago
found the cause of issue: sometimes stream.data
is empty and accessing first index raises the exception.
You are right. It seems to be caused by corrupted data. I can add more checks for data corruption. But unfortunately data can be corrupted in endless ways. Do you have URL of corrupted metatile?
Thank you for your response. I cant find the URL following the call stack in the debugger.
You may try debug (unminified) version of the library
Library file is stored in build directory.
URL value should in stored in MapMetatile object as .mapLoaderUrl or at least send me .id of the metatile.
As call stack is started by map.update event, URL is not present in current call stack, (only data related to the URL is passed through this call sequence)
In that case I have no way how to replicate this error. Can you send mapConfig URL and map position (or at least lat,lon) where error occur?
While zooming in/out with mouse I get
Uncaught RangeError: Offset is outside the bounds of the DataView
on the following line of code: https://github.com/melowntech/vts-browser-js/blob/1f3c4235c5ae4aefbbb64188e93867e89da834c9/src/core/map/metatile.js#L238 after this exception the map freezes.here is the stack trace: vts-browser.min.js:formatted:20137 Uncaught RangeError: Offset is outside the bounds of the DataView at DataView.getUint8 ()
at n.parseMetatatile (vts-browser.min.js:formatted:20137)
at n.onLoaded (vts-browser.min.js:formatted:20120)
at j.processProcessingTasks (vts-browser.min.js:formatted:18504)
at j.update (vts-browser.min.js:formatted:18542)
at A.onUpdate (vts-browser.min.js:formatted:2423)
n.parseMetatatile @ vts-browser.min.js:formatted:20137
n.onLoaded @ vts-browser.min.js:formatted:20120
j.processProcessingTasks @ vts-browser.min.js:formatted:18504
j.update @ vts-browser.min.js:formatted:18542
A.onUpdate @ vts-browser.min.js:formatted:2423
requestAnimationFrame (async)
A.onUpdate @ vts-browser.min.js:formatted:2425