Page MenuHomeFeedback Tracker

FindPath crashes the server
Closed, ResolvedPublic

Description

For unknown reasons in some cases default FindPath method will lead to server crash

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 11 x64
Category
General
Steps To Reproduce
override void InvokeOnConnect(PlayerBase player, PlayerIdentity identity)
{
    super.InvokeOnConnect(player, identity);

    int includeFlags = PGPolyFlags.UNREACHABLE | PGPolyFlags.DISABLED | PGPolyFlags.WALK | PGPolyFlags.INSIDE;
    int excludeFlags = PGPolyFlags.CRAWL | PGPolyFlags.CROUCH | PGPolyFlags.SWIM_SEA | PGPolyFlags.SWIM | PGPolyFlags.LADDER | PGPolyFlags.DOOR | PGPolyFlags.SPECIAL;
    int exclusiveFlags = PGPolyFlags.NONE;

    PGFilter m_DefaultPGFilter = new PGFilter();
    m_DefaultPGFilter.SetFlags(includeFlags, excludeFlags, exclusiveFlags);

    GetGame().GetWorld().GetAIWorld().FindPath("11665.274414 3.021485 3212.556885", "11652.258789 3.017290 3204.860352", m_DefaultPGFilter, null);
}

It will work fine if I change the destination point to vector.Zero or "1 1 1"
Also, I use InvokeOnConnect method just as an example, it has the same behavior in other circumstances too

Event Timeline

Server map I have is default Cherno

should include mdmp for futher diagnostics by the team @vadymbabii

Geez closed this task as Resolved.Wed, Apr 3, 5:55 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Hello vaymbabii.
The last parameter "out TVectorArray waypoints" of FindPath must be an allocated array, it cannot be null
Regards,
Geez

Hi @Geez I almost sure I've tried with an allocated array, but yeah, it works now. That's cleary my bad. Thanks for helping! Issue is resolved