Skip to content

fix(index): harden indexing against memory pressure and crashing assets - #123

Open
Hvizeu wants to merge 2 commits into
tumourlove:masterfrom
Hvizeu:codex/harden-index-memory
Open

fix(index): harden indexing against memory pressure and crashing assets#123
Hvizeu wants to merge 2 commits into
tumourlove:masterfrom
Hvizeu:codex/harden-index-memory

Conversation

@Hvizeu

@Hvizeu Hvizeu commented Aug 3, 2026

Copy link
Copy Markdown

Problem

Large projects can make indexing unsafe in two ways: level and sublevel loads can retain packages and deferred rendering resources until RAM or VRAM is exhausted, and one asset that terminates the editor during deep indexing can trap every resume in the same crash.

Fix

  • Process worlds serially and capture packages loaded transitively for linked sublevels.
  • Release only indexer-owned worlds and packages, then drain deferred render and RHI resources before loading the next map.
  • Monitor process RAM, system headroom, and available GPU budget; stop further map loads under sustained critical pressure and expose level_index_state instead of risking an out-of-memory crash.
  • Replace actor rows only for successfully processed worlds so resumed or degraded passes do not duplicate data or erase untouched results.
  • Commit an exact per-asset marker immediately before every full, incremental, or live deep-index load.
  • Quarantine only the asset whose marker survives an interrupted process; healthy neighbours remain eligible.
  • Persist AssetsNeedingReview.log and expose quarantine counts, paths, and report location through project get_stats.
  • Add Retry Fixed Assets to clear only quarantined checkpoints and resume without wiping healthy index data.
  • Load Blueprint-derived assets with LOAD_DisableCompileOnLoad and guard generated-class default access to avoid compilation and reinstancing side effects during read-only indexing.
  • Migrate ambiguous counters created by the former batch-wide marker without blaming any asset.

Checklist

  • UE 5.7 editor build
  • UE 5.8 editor build
  • Focused memory and recovery automation
  • Documentation and changelog updated
  • Public behavior remains project-agnostic
  • Fresh end-to-end stress pass after the exact-asset quarantine commit

Validation

  • Focused recovery tests passed for durable markers, exact-asset attribution, healthy-neighbour isolation, targeted retry, and marker migration.
  • Focused memory tests passed for pressure classification, RAM-tier selection, and per-world row replacement.
  • A visible single-editor stress pass completed metadata, deep indexing, and all post-pass indexers before the final quarantine commit; the final quarantine behavior is automation-tested but does not claim a new full stress pass.
  • SQLite quick_check returned ok.
  • Full plugin packaging reaches and compiles the changed editor targets; a pre-existing MonolithAudioRuntime failure outside this diff still blocks the later packaged-game target.

@Hvizeu Hvizeu changed the title fix(index): bound level indexing resource lifetime fix(index): harden indexing against memory pressure and crashing assets Aug 3, 2026
@Hvizeu
Hvizeu marked this pull request as ready for review August 3, 2026 20:05
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.

1 participant