Skip to content

world_build: continue past malformed placement rows (BUILD-335) - #1272

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
73N1X:fix/world-placement-malformed-rows
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
73N1X:fix/world-placement-malformed-rows

Conversation

@73N1X

@73N1X 73N1X commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: BUILD-335 — original claim.

What and why

A malformed placement row can currently abort the entire --placements build, including valid rows after it: an array/object lod_level raises TypeError, and oversized integer coordinates, rotations or scales raise OverflowError.

  • Count unusable LOD values and overflowing position/rotation components as malformed, then continue loading valid neighboring rows.
  • Preserve the existing unit-scale fallback for invalid optional scales, including integers too large to convert to a finite float.
  • Add synthetic loader and complete-world regressions for row counts, finite/zero/negative scales, LOD/region filtering and resulting geometry bounds.

This is a follow-up to merged #1183. It changes placement input handling only; it is independent of #856 and the buffer-copy follow-up.

Tested

Windows, Python 3.14.0; CPU-only, no GPU required. Base: e7584c52.

  • python -I tests/test_world_place.py: 19 passed.
  • python -I -m unittest discover -s tests -p 'test_world*.py': 178 passed.
  • The new regressions reproduced 9 errors on the unmodified base before the fix.
  • git diff --check: passed.

Checklist

  • No game data, keys or decryption, including in fixtures or quoted output.
  • Translator contract changes: not applicable; no translator code changed.

Count unhashable LOD values and overflowing position/rotation components as malformed rows, then continue loading valid neighbors. Preserve the existing unit fallback for invalid optional scales, including integers too large to convert to finite floats.

Add synthetic loader and complete-world regressions covering row counts, scale defaults, unchanged finite/zero/negative scales, region/LOD filters and resulting geometry bounds. New regressions reproduced nine errors on the unmodified base; all 178 world-related tests now pass.
@kapitche

Copy link
Copy Markdown
Contributor

Tested d2fae50 on Linux (WSL2 Ubuntu), Python 3.12, CPU only: pass. pytest tests/test_world_place.py: 19 passed, 22 subtests. With tools/world_build.py from main, 9 fail. An unhashable or huge lod_level now marks the row malformed instead of raising, and a non-finite scale falls back to 1.0.

@ItsNotRexed
ItsNotRexed merged commit 4831cd7 into ItsNotRexed:main Nov 22, 2026
11 checks passed
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.

3 participants