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

[core] Assert check failed in TileCache::add #15926

Closed
syershov opened this issue Nov 14, 2019 · 4 comments
Closed

[core] Assert check failed in TileCache::add #15926

syershov opened this issue Nov 14, 2019 · 4 comments

Comments

@syershov
Copy link
Contributor

Platform: linux and macOS

Mapbox SDK version: checkout from master 1d49c23

I'm using sdk for parallel generate some thousand static map images and sometimes i have failed assert check in tiles cache.

assert(orderedKeys.size() <= size);

Workaround for me was correcting condition

if (tiles.emplace(key, std::move(tile)).second) {

if (!tiles.emplace(key, std::move(tile)).second) {

Please check this code.

@pozdnyakov
Copy link
Contributor

@syershov thanks for filing this issue and for the root cause analysis! The proposed fix looks correct, would you like to make a PR or you'd like us to make it?

@syershov
Copy link
Contributor Author

I will do it some later with tests.

@syershov
Copy link
Contributor Author

@pozdnyakov please, can you take a look PR?

@pozdnyakov
Copy link
Contributor

Fixed with #15943

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants