Skip to content

Calling calcShortestPath() twice leads to infinite loop #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?

aStarMap = new AreaMap(mapWidth, mapHeight, obstacleMap);
aStarHeuristic = new ClosestHeuristic(this);
aStarSearch = new AStar(aStarMap, aStarHeuristic);
...
aStarSearch.calcShortestPath(...)
aStarSearch.calcShortestPath(...)


What is the expected output? What do you see instead?

At the second call to aStarSearch.calcShortestPath(...) the method 
AStar.reconstructPath() hangs in an infinite loop.


Please provide any additional information below.

I could easily solve this problem by adding the following as first line to 
AStar.reconstructPath():

map.clear();

Original issue reported on code.google.com by hai...@gmail.com on 2 Feb 2013 at 11:52

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions