Skip to content

Keep annotation map snapshots alive during regex updates - #174

Open
LuuSir wants to merge 1 commit into
Cosys-Lab:5.2.1from
LuuSir:codex/fix-annotation-iterator-lifetime
Open

LuuSir wants to merge 1 commit into
Cosys-Lab:5.2.1from
LuuSir:codex/fix-annotation-iterator-lifetime

Conversation

@LuuSir

@LuuSir LuuSir commented Oct 5, 2026

Copy link
Copy Markdown

Base: Cosys-Lab/Cosys-AirSim:5.2.1 (09d8f992).

Six regex update loops create an iterator from GetNameToComponentMap(), which returns a TMap by value. That temporary is destroyed at the end of the for-loop initializer, leaving the iterator referring to a destroyed container. Keep a local map snapshot for the duration of each loop.

This patch changes lifetime only and preserves matching and update behavior. It covers instance segmentation, RGB index/color, greyscale and texture annotation update paths.

Validation

  • Integrated into an isolated UE 5.2.1 BlocksEditor build with MSVC 14.34; compilation and linking pass.
  • Instance segmentation regex updates exercised through RPC; other annotation modes have compile coverage only.

Copilot AI balanced review requested due to automatic review settings October 5, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants