Skip to content

Game Crash when CAvoidanceComponent pool reaches 1300 RedM #3247

Open
@outsider31000

Description

@outsider31000

What happened?

CAvoidanceComponent pool is listed as 1300 max items when limit is reached we get a crash

Image

Image

CfxCrashDump_2025_03_15_15_20_22.zip

Expected result

should not crash and allow the max items allowed

Reproduction steps

spawn 1300 + props with avoidance flag you will get a crash

Importancy

Unknown

Area(s)

RedM

Specific version(s)

1491

Additional information

local props = {}
RegisterCommand("testProp", function()
    RequestModel("p_plank_caster01x", false) -- has avoidance flag
    repeat Wait(0) until HasModelLoaded("p_plank_caster01x")

    local coords = GetEntityCoords(PlayerPedId())
    for i = 1, 1300 do
        local table = CreateObject("p_plank_caster01x", coords.x, coords.y, coords.z, false, false, false, false)
        props[#props + 1] = table
    end
    print("done")
end, false)

--on resource stop
AddEventHandler("onResourceStop", function(resource)
    if resource == GetCurrentResourceName() then
        for _, prop in ipairs(props) do
            DeleteObject(prop)
        end
    end
end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RedMIssues/PRs related to RedMbugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions