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

[core] Fix issue #11538 (race condition crash for heavily modified annotations) #11551

Merged
merged 2 commits into from
Mar 29, 2018

Commits on Mar 28, 2018

  1. [core] Fix potential race condition crash in symbol querying..

    First half of fix for issue #11538.
    
    Testing `if (pendingData)` didn't work if there _was_ a data update, but the update was "the data for this tile is now null". In that case, the tile's FeatureIndex would be updated, but the tile's data member would remain unchanged.
    
    In the case of a tile's data being deleted, the matching FeatureIndex would have an empty set of bucketLayerIDs, but the _old_ data would still be in place for querying, and the symbolBuckets might not be updated yet (pending onPlacement). In this case `bucketLayerIDs.at(indexedFeature.bucketName)` could throw an out-of-range exception.
    ChrisLoer committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    26edac0 View commit details
    Browse the repository at this point in the history
  2. [core] Fix potential race condition crash in symbol querying..

    Second half of fix for issue #11538.
    
    If a global placement took place between the time a tile's non-symbol layout updated and the time new symbol buckets arrived, the tile's new FeatureIndex would be committed, but the global CollisionIndex would be generated against the old symbolBuckets. The mismatch could cause the CollisionIndex to contain indices that didn't exist in the new FeatureIndex, and attempting to access them would generate an out-of-bounds exception.
    ChrisLoer committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    1717e11 View commit details
    Browse the repository at this point in the history