Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

assert(uv_thread_self() == map_thread) #623

Closed
mikemorris opened this issue Nov 21, 2014 · 7 comments · Fixed by #718
Closed

assert(uv_thread_self() == map_thread) #623

mikemorris opened this issue Nov 21, 2014 · 7 comments · Fixed by #718
Labels

Comments

@mikemorris
Copy link
Contributor

These asserts (scattered throughout a few different files) should not be expected to pass when the Map::render is intentionally called in a different thread than where the map object was initially created (such as an async render method in Node.js bindings). I saw some logic around an async_render function, but that seems to be tied into the libuv implementation in mapbox-gl-native a bit too closely. Should this either be refactored for external use, or should these asserts be conditionally disabled some other way?

@ljbade
Copy link
Contributor

ljbade commented Nov 22, 2014

Yeah came across this problem in a few places with other functions.

@mikemorris
Copy link
Contributor Author

In the cli-render branch, the problematic asserts only seem to be present on BUILDTYPE=Debug installs now, fixed by 57e6bc6. Is there a better way to patch this to still be able to get debug symbols in Node.js bindings though @kkaefer? I'm guessing Mode::Static from 21e9e0a might be part of the answer.

@mikemorris
Copy link
Contributor Author

Doh, this is apparently only happening in Debug builds? Just ran against a Release build of master without tripping any asserts.

@ljbade
Copy link
Contributor

ljbade commented Dec 18, 2014

@mikemorris assert() compiles to a noop on Release builds

@mikemorris
Copy link
Contributor Author

Hah, that would do it, was that a recent change or has it always been that way @ljbade?

@incanus
Copy link
Contributor

incanus commented Dec 19, 2014

That's pretty common native behavior.

@kkaefer
Copy link
Contributor

kkaefer commented Dec 19, 2014

asserts are always compiled out on Release builds.

@mikemorris mikemorris mentioned this issue Feb 25, 2015
8 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants