Skip to content

Thread-safety bug in RobustPredicates workspace arrays under concurrent triangulation #54

Description

@uuiitwp1

RobustPredicates holds instance-level workspace arrays used by InCircleAdapt for adaptive exact arithmetic. RobustPredicates.Default is a singleton, shared by all Mesh instances. When multiple threads concurrently call GenericMesher.Triangulate() → Dwyer.Triangulate() → InCircle → InCircleAdapt, they mutate the same workspace arrays, producing corrupted intermediate values. This manifests non-deterministically as NullReferenceException in TriangleLocator.Locate or "Unable to find a triangle on path" in ConstraintMesher.FindDirection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions