You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: A locked label can attach to a new feature that reuses a deleted feature's id #1135
I searched the existing issues and did not find a duplicate.
This is a bug report, not a usage question (questions belong in Discussions).
What happened?
With labels locked, a feature added after deleting the feature with the highest id shows its label, although it wasn't placed when the lock was taken.
Dataset::push gives a new feature max(id) + 1 (crates/data/src/lib.rs:340). Since #1134 a lock names each label by its feature's id, so the new feature takes the deleted one's id, matches its lock entry and is drawn there without a collision check. This isn't a regression: with row keys the new feature took the same row, so it had the same key. #1134 fixes the cases where rows move and leaves this one. Found in review of #1134.
Related: LabelKey keeps the feature id as usize, so on wasm32 (the web app) two ids that differ by a multiple of 2^32 share a key. That truncation already applied to streamed layers before #1134.
Steps to reproduce
Load this CSV as XY points and label them by name. Gamma sits apart, so both labels show:
name,x,yAlpha,0,0Gamma,10,10
In the Labeling tab, turn on Lock.
Delete Gamma (the highest id).
Add a new point anywhere with the edit tools and give it a name.
The new point's label shows, at the lock's place for Gamma, although it wasn't placed when the lock was taken.
Expected behavior
While labels are locked, a feature added after locking has no label, as any other new feature does; unlocking and locking again places it.
Ways to get there:
A monotonic next id in Dataset, so a deleted feature's id is never handed out again. This touches serialization and every reader that numbers features.
Or prune the lock entries of removed ids on each path that removes features (delete, cut, merge, geoprocessing updates, reloads). Undo restores the lock with the project, so it stays correct.
For the wasm32 truncation, widen the id in LabelKey to u64.
The deletion/reuse case is fixed by #1271. I am taking the remaining wasm32 truncation: a probe using the current LabelKey type and renderer conversion confirms that feature IDs 1 and 4294967297 become the same key on wasm32. I will keep the full u64 feature ID through label placement, extrusion lookup and lock pruning, without changing Dataset ID allocation or the saved project format.
Activity
Mavrick-F commentedon Nov 2, 2026
The deletion/reuse case is fixed by #1271. I am taking the remaining wasm32 truncation: a probe using the current LabelKey type and renderer conversion confirms that feature IDs 1 and 4294967297 become the same key on wasm32. I will keep the full u64 feature ID through label placement, extrusion lookup and lock pruning, without changing Dataset ID allocation or the saved project format.