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

Crash in while pathfinding in goto #1315

Closed
psampathkumar opened this issue Aug 24, 2022 · 1 comment · Fixed by #1317
Closed

Crash in while pathfinding in goto #1315

psampathkumar opened this issue Aug 24, 2022 · 1 comment · Fixed by #1317
Labels
bug Something isn't working gui This issue requires changes to the user interface

Comments

@psampathkumar
Copy link
Contributor

Describe the bug
A random crash appeared in the wild and cast confusion on the devs. Devs hurt themselves in confusion.

To Reproduce
A clear way to reproduce the crash hasnt been found yet. Some discussions on discord, point towards the possibility of the source tile being nullptr in pathfinder_private::attempt_move. It was postulated that having an unknown tile in between the path caused the crash. We were unable to reproduce it. The crash was possibly introduced #1312.

Expected behavior
No crashes, and possibly no pokemon references in the future.

Screenshots
I managed to grab a bt before losing the condition for the crash forever by trying to move another unit.
image

Platform and version (please complete the following information):

@psampathkumar psampathkumar added bug Something isn't working gui This issue requires changes to the user interface labels Aug 24, 2022
@lmoureaux
Copy link
Contributor

towards the possibility of the source tile being nullptr

Not the source tile, but its terrain. Tiles that were never seen have null terrain.

lmoureaux added a commit to lmoureaux/freeciv21 that referenced this issue Aug 24, 2022
Using can_step_taken_wrt_to_zoc in the path finding code (through
unit_can_move_to_tile) makes it possible that unseen tiles are passed to it. We
should therefore not assume that the terrain of the tile is known.

Closes longturn#1315.
psampathkumar pushed a commit that referenced this issue Aug 26, 2022
Using can_step_taken_wrt_to_zoc in the path finding code (through
unit_can_move_to_tile) makes it possible that unseen tiles are passed to it. We
should therefore not assume that the terrain of the tile is known.

Closes #1315.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gui This issue requires changes to the user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants