Skip to content

FIX: NavArea::ComputeApproachAreas() hang during *.nav file generation#913

Merged
wopox1337 merged 1 commit intomasterfrom
fix/nav_area-fix-approach-areas
May 12, 2024
Merged

FIX: NavArea::ComputeApproachAreas() hang during *.nav file generation#913
wopox1337 merged 1 commit intomasterfrom
fix/nav_area-fix-approach-areas

Conversation

@wopox1337
Copy link
Member

@wopox1337 wopox1337 commented Jan 4, 2024

Thanks to @CH3L74 for finding the bug on zm_flood map

video: https://youtu.be/Lu0yzVpQoAE

P.S: Very Sleepy software helps to find where is a bug http://www.codersnotes.com/sleepy/

Fix Hang on *.nav Generating in CNavArea::ComputeApproachAreas()

Description

This PR fixes a hanging issue encountered during the generation of *.nav files in the CNavArea::ComputeApproachAreas() function. The problem occurred when the approach areas were being computed, causing the process to freeze under certain conditions.

Changes:

  • Optimized the approach area computation by handling edge cases where areas could not be reached or were blocked.
  • Added additional checks to prevent infinite loops and overflow while building paths to distant areas.
  • Refactored pathfinding logic to ensure smooth enumeration of approach areas without causing performance issues or hangs.

Issue:

  • Hang during approach area computation: The function would enter an infinite loop or block during pathfinding when certain areas were not reachable.

Fixes:

  • Improved pathfinding efficiency and added safety checks to prevent pathfinding failures from affecting subsequent computations.

This fix should resolve the hang issue and improve the reliability of the navigation area generation process.

@wopox1337 wopox1337 added Type: 🧬 bug in original GameDLL An error that could not be fixed by GameDLL. Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Status: ✅ done The issue done and closed. labels Jan 4, 2024
@wopox1337 wopox1337 requested a review from s1lentq January 4, 2024 09:58
@wopox1337 wopox1337 self-assigned this Jan 4, 2024
@wopox1337 wopox1337 merged commit c08e6d0 into master May 12, 2024
@wopox1337 wopox1337 deleted the fix/nav_area-fix-approach-areas branch May 12, 2024 14:17
@wopox1337 wopox1337 changed the title CNavArea::ComputeApproachAreas(): fix hang on *.nav generating FIX: NavArea::ComputeApproachAreas() hang during *.nav file generation Dec 12, 2024
yohimik pushed a commit to yohimik/ReGameDLL_CS that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Status: ✅ done The issue done and closed. Type: 🧬 bug in original GameDLL An error that could not be fixed by GameDLL.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant