Skip to content

group: add an explicit assertion for too many entities#1586

Merged
phkahler merged 1 commit intosolvespace:masterfrom
iscgar:iscgar/avoid-overflowing-handle-values
Aug 10, 2025
Merged

group: add an explicit assertion for too many entities#1586
phkahler merged 1 commit intosolvespace:masterfrom
iscgar:iscgar/avoid-overflowing-handle-values

Conversation

@iscgar
Copy link
Contributor

@iscgar iscgar commented May 10, 2025

This makes it clearer to users who are faced with a SolveSpace crash, instead of getting the "handle isn't unique" error from IdList much later in a different code-path (prompted by the discussion in #1569).

Note that I added it to the code path that adds a new entity into the remap, rather than to hGroup::entity(), in order to avoid breaking existing models which already go over the limit, like the one in #1569.

While at it, add a minor fix to the documentation of EntityMap, which wrongly stated that entities are remapped from requests instead of from groups.

This makes it clearer to users who are faced with a SolveSpace crash,
instead of getting the "handle isn't unique" error from `IdList` much
later in a different code-path.

While at it, add a minor fix to the documentation of `EntityMap`, which
wrongly stated that entities are remapped from requests instead of from
groups.
@iscgar
Copy link
Contributor Author

iscgar commented Jun 20, 2025

@ruevs @phkahler, I don't know what the timeline for the 3.2 release is, and even if I'll be able to finish and submit my 64-bit handle works before then, I'm not sure it would be wise to rush its inclusion right before a release. So can we at least merge this in the mean time, in order to make it easier for people to understand what the actual error is instead of crashing later with the IdList uniqueness error?

@phkahler phkahler merged commit de634d9 into solvespace:master Aug 10, 2025
4 checks passed
@iscgar iscgar deleted the iscgar/avoid-overflowing-handle-values branch August 18, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failure in Remap: Too many entities in group (latest master) Crash with/without "Handle isn't unique" error message

2 participants