Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 12, 2024

Conversation

SergeyShorokhov
Copy link
Member

@SergeyShorokhov SergeyShorokhov 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.

@SergeyShorokhov SergeyShorokhov 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
@SergeyShorokhov SergeyShorokhov self-assigned this Jan 4, 2024
@SergeyShorokhov SergeyShorokhov merged commit c08e6d0 into master May 12, 2024
4 checks passed
@SergeyShorokhov SergeyShorokhov deleted the fix/nav_area-fix-approach-areas branch May 12, 2024 14:17
@SergeyShorokhov SergeyShorokhov changed the title CNavArea::ComputeApproachAreas(): fix hang on *.nav generating FIX: NavArea::ComputeApproachAreas() hang during *.nav file generation Dec 12, 2024
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