Issue797

Title pathfinding crash when reducing size of town to 30x30
Priority critical Status open
Assigned To Keywords
Linked issues Watchers

Submitted on 2015-03-13 23h13 by matthiaskrgr, last changed by matthiaskrgr.

Messages
Author: matthiaskrgr Date: 2015-03-13   23h13
launch editor, go to town, reduce map size to 30x30 (yes, it is evil),
playtest, game crashes somewhere in the pathfinder.
The crash also happens without asan, but here's the ASAN trace:





Tux looks stuck...ESCAPING just for this frame...

Found robot that seems really stuck on position: 21.500000/18.500000/0.
More details on this robot:  Type=27.
Short Description=Town Teleporter Guard.
Private Pathway[0]: 21.500000/18.500000.
Private Pathway[1]: -1.000000/-1.000000.
nextwaypoint: 25 at 8.500000/1.500000
nextwaypoint=25. lastwaypoint=40. combat_state:  Turn towards next WP..

Found robot that seems really stuck on position: 6.500000/60.500000/0.
More details on this robot:  Type=42.
Short Description=???.
Private Pathway[0]: 6.500000/60.500000.
Private Pathway[1]: -1.000000/-1.000000.
nextwaypoint: 45 at 6.500000/0.500000
nextwaypoint=45. lastwaypoint=258. combat_state:  Turn towards next WP..

Found robot that seems really stuck on position: 7.500000/33.500000/0.
More details on this robot:  Type=27.
Short Description=Red Guard Member.
Private Pathway[0]: 7.500000/33.500000.
Private Pathway[1]: -1.000000/-1.000000.
nextwaypoint: 25 at 8.500000/1.500000
nextwaypoint=25. lastwaypoint=64. combat_state:  Turn towards next WP..

Found robot that seems really stuck on position: 25.500000/73.500000/0.
More details on this robot:  Type=28.
Short Description=Red Guard Member.
Private Pathway[0]: 25.500000/73.500000.
Private Pathway[1]: -1.000000/-1.000000.
nextwaypoint: 25 at 8.500000/1.500000
nextwaypoint=25. lastwaypoint=96. combat_state:  Turn towards next WP..ASAN:SIGSEGV
=================================================================
==30179==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000438 (pc
0x000000671af1 bp 0x7fff7d911430 sp 0x7fff7d9111a0 T0)
    #0 0x671af0 in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:240:7
    #1 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #2 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #3 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #4 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #5 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #6 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #7 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #8 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #9 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #10 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #11 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #12 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #13 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #14 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #15 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #16 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #17 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #18 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #19 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #20 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #21 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #22 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #23 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #24 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #25 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #26 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #27 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #28 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #29 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #30 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #31 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #32 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #33 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #34 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #35 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #36 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #37 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #38 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #39 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #40 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #41 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #42 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #43 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #44 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #45 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #46 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #47 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #48 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #49 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #50 0x671cbb in recursive_find_walkable_point
/home/matthias/vcs/git/freedroid/src/pathfinder.c:247:8
    #51 0x66bfa5 in set_up_intermediate_course_between_positions
/home/matthias/vcs/git/freedroid/src/pathfinder.c:77:7
    #52 0x5d61a0 in update_enemy /home/matthias/vcs/git/freedroid/src/enemy.c:2090:7
    #53 0x5e85be in move_enemies /home/matthias/vcs/git/freedroid/src/enemy.c:2131:3
    #54 0x5fb6bb in Game /home/matthias/vcs/git/freedroid/src/main.c:109:4
    #55 0x6a60da in TestMap
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit.c:252:2
    #56 0x6c6d9f in DoLevelEditorMainMenu
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit_menu.c:1067:4
    #57 0x6be6a2 in leveleditor_process_input
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit_input.c:193:23
    #58 0x6a61e3 in LevelEditor
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit.c:282:3
    #59 0x5fb979 in main /home/matthias/vcs/git/freedroid/src/main.c:188:4
    #60 0x7f70bc9db7ff in __libc_start_main (/usr/lib/libc.so.6+0x207ff)
    #61 0x4ce8f8 in _start
(/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4ce8f8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/home/matthias/vcs/git/freedroid/src/pathfinder.c:240 recursive_find_walkable_point
==30179==ABORTING
Author: matthiaskrgr Date: 2015-03-14   20h24
I think I just managed to get that one with tux walking (not just enemies),
raising priority.
History
Date User Action Args
2015-03-14 20:24:47matthiaskrgrsetpriority: important -> critical
messages: + msg3094
2015-03-13 23:13:20matthiaskrgrcreate