You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Asynchronism between style and render style causing rendering failures in still mode #9868
With #9689, we're adding an option for recycling the map object when running our render tests. These should be all passing now, except that occasionally you'll get at least one of the geojson/external-* render tests to fail.
When these tests fail, you can see from the rendering results that the test is using geometry data from a previous test run e.g. if the last test run was geojson/external-failure and the current one is geojson/external-invalid, you'll occasionally get the rendering result from external-failure in external-invalid.
Here's my understanding of the GeoJSON source workflow so far:
In still mode, there are multiple calls for Map::Impl::update, and each call creates a new UpdateParameters object which contains, among other things, data from all the style's sources implementations. These calls triggers the renderer frontend to eventually invalidate the renderer and force it to render, using the last-received UpdateParameters. We have safeguards in the renderer implementation that checks whether both the style and render style are loaded before notifying the still image requester that we ended up rendering. For a style to be loaded, we need all its sources to be also in loaded state - and in the case of GeoJSONSource, when its data is set via setUrl, it only goes to loaded state after receiving a reply from the file source request for that given URL (notifying the style via onSourceLoaded).
However, for some unknown reason, we're either not rendering the last-received UpdateParameters or failing to notify the renderer that the render style data needs to be updated.
In case you're curious, so far the way I found for reproducing the rendering failure is to retry these render tests until they fail (remember you need the branch from #9689):
true; while [ $? -eq 0 ]; do node platform/node/test/render.test.js --recycle-map "geojson/external"; done
Activity
brunoabinader commentedon Aug 25, 2017
In case you're curious, so far the way I found for reproducing the rendering failure is to retry these render tests until they fail (remember you need the branch from #9689):
jfirebaugh commentedon Aug 25, 2017
Tricky. My first hunch was that this would fix it:
But it doesn't.
Will probably require some printf instrumentation to track down.
brunoabinader commentedon Aug 30, 2017
Fixed by #9883.