ml_pathfind icon indicating copy to clipboard operation
ml_pathfind copied to clipboard

Providing callback function to findShortestPathBetween crashes the server

Open TracerDS opened this issue 3 years ago • 7 comments

As in the title. Providing callback to findShortestPathBetween function crashes the server without any errors.

local id = loadPathGraph('nodes.json')

if isGraphLoaded(id) then
    iprint('Loaded graph with id: ',id)

    findShortestPathBetween(id,0,0,0,100,100,100,function(nodes)
        iprint('callback')
    end)
end

unloadPathGraph(id)

TracerDS avatar Feb 03 '22 18:02 TracerDS

Correction: findShortestPathBetween itself crashes the server

TracerDS avatar Feb 03 '22 18:02 TracerDS

The last build was 3 years ago, I haven't touched that library since. I guess if you would try to compile it with the latest SDK it could just work (even though i am not 100% sure).

Currently I have not really time to investigate the issue further, sorry.

StiviiK avatar Feb 03 '22 18:02 StiviiK

Understood. Though I hope you'd come back to this.

TracerDS avatar Feb 04 '22 15:02 TracerDS

I‘ll reopen the issue, as it is not fixed.

StiviiK avatar Feb 04 '22 16:02 StiviiK

ml_pathfind.zip Here is a fresh build of the module (untested). Also could you please provide me the nodes.json file you are using?

StiviiK avatar Feb 10 '22 10:02 StiviiK

I guess I found your issue, you are trying to unload the graph while your are running the path search.

StiviiK avatar Feb 10 '22 10:02 StiviiK

I guess I found your issue, you are trying to unload the graph while your are running the path search.

both sa_nodes.json and testnodes1.json from test directory

TracerDS avatar Feb 15 '22 09:02 TracerDS