Task
Investigate and resolve the assertion failures in the QTPFS pathfinding code where areaRelinkedInner dimensions are strictly expected to match QTPFS_MAP_DAMAGE_SIZE. This will prevent crashes on the master branch when the updated area rectangle evaluates to (0,0).
Context
Currently, the engine asserts that threadData.areaRelinkedInner has a width and height exactly equal to QTPFS_MAP_DAMAGE_SIZE (16x16 squares) during map damage updates. However, testing on master has revealed that this rectangle can sometimes be (0,0), which immediately triggers an assertion failure.
This implies one of two things: either the assertions are too strict and fail to account for empty update areas (which might be a valid edge case), or there is an upstream bug passing uninitialized or empty rectangles into the pathfinding update thread. Resolving this is required to maintain stability in debug builds and ensure map damage updates are processed correctly without crashing the engine.
Acceptance Criteria
- Investigate the root cause of
threadData.areaRelinkedInner evaluating to (0,0) during the update cycle.
- Determine if an empty rectangle is a valid state; if so, adjust or remove the assertions and ensure the update logic safely skips or handles empty areas.
- If an empty rectangle is an invalid state, correct the upstream logic to prevent
(0,0) rectangles from being dispatched to the thread.
- Verify that the fix eliminates the assertion failure on
master without causing pathfinding regressions.
Author: ivand
Discord: https://discord.com/channels/549281623154229250/724924957074915358/1488575128148246701
Model: gemini-3-pro-preview
Task
Investigate and resolve the assertion failures in the QTPFS pathfinding code where
areaRelinkedInnerdimensions are strictly expected to matchQTPFS_MAP_DAMAGE_SIZE. This will prevent crashes on themasterbranch when the updated area rectangle evaluates to(0,0).Context
Currently, the engine asserts that
threadData.areaRelinkedInnerhas a width and height exactly equal toQTPFS_MAP_DAMAGE_SIZE(16x16 squares) during map damage updates. However, testing onmasterhas revealed that this rectangle can sometimes be(0,0), which immediately triggers an assertion failure.This implies one of two things: either the assertions are too strict and fail to account for empty update areas (which might be a valid edge case), or there is an upstream bug passing uninitialized or empty rectangles into the pathfinding update thread. Resolving this is required to maintain stability in debug builds and ensure map damage updates are processed correctly without crashing the engine.
Acceptance Criteria
threadData.areaRelinkedInnerevaluating to(0,0)during the update cycle.(0,0)rectangles from being dispatched to the thread.masterwithout causing pathfinding regressions.Author: ivand
Discord: https://discord.com/channels/549281623154229250/724924957074915358/1488575128148246701
Model: gemini-3-pro-preview