New error with PathFinding

Recently a change to PathFinding seems to cause issues with my existing PathFinding script. I’ve never seen this error before and I believe it has to do with the pending change in 491. But I’m not entirely sure.

The error I’m getting is this:

Unblocked signal shouldn’t be created when FFlag::FixMultiplePathObstacles == false.

This is happening when I call Path:Destroy(). This script was working a few hours ago, but in its current state, the errors cause my script to stop working properly and the error isn’t really informative enough for me to find a fix. I’ve tried looking at resources on FastFlags (FFlag), but I haven’t found a way to change them. Any help would be appreciated.

Here’s the snippet that it errors at:

Snippet
if Waypoints ~= nil and Reached and WaypointIndex >= #Waypoints then
	Waypoints = nil
	Path:Destroy() -- Specifically here
	Path = nil
	StopAnimation("Run")
	LastMove = tick()
end

I do connect to the Blocked event on path, but calling Destroy on the path should automatically disconnect it regardless.

7 Likes

This bug occurs in online mode!
To recreate this bug, paste this script into a new place:

local PathfindingService = game:GetService("PathfindingService")
local path = PathfindingService:CreatePath()
path:ComputeAsync(Vector3.new(0, 4, 0), Vector3.new(20, 4, 0))
path:Destroy()

Note: This is impactful for my scripts as they do not expect path:Destroy() to potentially error, and the logic continues after the path is destroyed. Any game that relies on pathfinding to work where path:Destroy() is not the final line of a script/thread are likely broken (and others that don’t break might end up with memory leaks if this error interrupts cleanup code!)

I noticed this error after a recent memory leak and I haven’t updated my game.

I remove my AIs from a table after destroying it’s path, but now any logic after path:Destroy() doesnt follow.

Wrapped it in a pcall for now just unexpected. Think this should be under the bugs sections and submitted as one.

I don’t have access to bug reports which is why I submitted it here to see if there’s any other solution. But if any regular happens across this post, maybe consider reporting it?

FFlags, or “fast flags,” are put in by Roblox developers working on features so they can push their code out and then enable/disable it without needing an update. This FFlag failing may cause a roll-back if many games go down due to it.

This one was likely introduced for the development to fix the other bug here:

1 Like

This issue should now be resolved! Can you please confirm whether you are experiencing further issues? Thanks!

3 Likes

I no longer get the error, seems to have been fixed. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.