Thanks a lot!

if length(astack) = 0 then begin patherror:= true; exit; end;

I added this line to your bugfix position before,
now I just took your new astar.pas and test it, thanks a lot!

firle