Repository navigation
Notify renderStill() of request failures - #1588
Conversation
|
Definitely agree with the approach here. I started on something similar in 667dc1f, except I was going to change the signature of the existing callback to accept a |
73f1310 to
91c07d0
Compare
|
Alright, had a chance to test this out and while it does target the hanging tests seen in cutting-room-floor/tilelive-gl#25, I'm not sure if the solution is ideal.
|
|
@jfirebaugh @mikemorris thanks for the feedback. I rewrote the patch using |
91c07d0 to
e44afec
Compare
e44afec to
0e85f49
Compare
|
👍 to merge this |
There was a problem hiding this comment.
Should we use the single callback convention here too?
There was a problem hiding this comment.
Should we use the single callback convention here too?
Yes, I will refactor this one in another branch. I've to find a nice way of replacing this one because the Worker expects a std::function<void()> as callback and I want to report errors during the tile parsing.
|
👍 |
The callback will be called when any of the resources requested from the network failed to load. There is not recovery implemented yet, so the closest thing to reseting the Map object and reloading all the resources would be setting a new style.
- MockFileSource Will load pre-defined resources from the filesystem. It supports passing a string, that when it matches an URL, will simulate a failure. - MockView It is just a no-op to not get in the way when testing resource loading. Few more additions: - style.json Specially crafted style that will look always for the same tile, glyph range, etc at the "test/fixtures/resources/" path. No matter where you look (or at what zoom), you always get the same stuff. - vector.pbf This taken from a part of Taipei that will request several glyph ranges.
This first test will simulate a request failure on every resource directly or indirectly loaded by the ResourceLoader. The idea is to verify whenever we are failing gracefully or not.
0e85f49 to
6624dbb
Compare
Notify renderStill() of request failures
|
Testing changes for https://github.com/mapbox/node-mapbox-gl-native/issues/122, I noticed that when a Replicated this with Node.js v0.12.0 on commit https://github.com/mapbox/node-mapbox-gl-native/commit/8d35b678ede00e51b12dd3fed95d92eed7b08ba6 by running |
|
Welp, replicating this on Travis now... https://travis-ci.org/mapbox/node-mapbox-gl-native/builds/64294991 This hang seems to happen inconsistently, sometimes it exits cleanly... First time I saw this failure was with https://github.com/mapbox/node-mapbox-gl-native/commit/a4f90b2d388fd6359a09bde9d9d6c91e834f3816 |
That is correct. I managed to isolate the problem in a unit test and I'm cooking a fix for this. I don't think we should call I will elaborate the problem better in a new issue and will cc you. @mikemorris thanks for reporting! |
Propagates the failure all the way from the object making the requests to the failureCallback that has to be passed to renderStill() in addition to the usual successCallback.
The branch also adds unit tests simulating request failures on all resources we request.
Fixes #1565.