Repository navigation
wc3: size destructable pool separately, fix null missile model crash - #573
Merged
Merged
Conversation
Prologue01 (3852 destructables) and many campaign maps exhausted the 2047-slot lifecycle pools. Measured peak usage on all 97 campaign maps: destructable 4917, every other pool <= 300. Give destructables an 8192-slot pool and keep 2048 for the rest instead of sizing all 27 pools to MAX_ENTITIES (52 MB -> 26 MB static). Log per-pool peaks at shutdown. Make G_RegisterModel return 0 for a null or empty name: TFT X-campaign units with a missile weapon but no art crashed in SV_ModelIndex. Raise the save-load pool count bound accordingly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #570, which sized every lifecycle pool to
MAX_ENTITIES(16000 slots × 27 pools ≈ 52 MB static, all memset on reset).Verification
WC3 pool destructable exhausted(also HumanX01 and other TFT maps), so that was the issue.G_PoolsReportPeaks(logged at shutdown) and ran all 97 campaign maps. Peak destructables: 4917 (NightElf04), 4864 (UndeadX01), 4412 (Orc04), 3852 (Prologue01). Every other pool peaks at ≤ 300.Changes
G_RegisterModel(NULL/"")returns 0. 34 TFT X-campaign maps segfaulted inSV_ModelIndexonce past the pool limit (missile attack with no art).Validation
make test-wc3-engine: 46354 assertions passed. Campaign audit: 97/97 maps completed, 0 crashes, 0 pool exhaustion.🤖 Generated with Claude Code