Page MenuHomeFeedback Tracker

deleteVehicle on super-simple objects causes the game to freeze for several seconds
Confirmed, NormalPublic

Description

It seems like deleteVehicle can't handle super-simple objects properly.
Not only does it cause abnormal freezes, it seems there are also some "side-effects".
For example, deleting a super-simple pond object never deletes its "water", so you will end up hitting invisible water.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

To test, just use the "code performance" button in debug console to run the code many times:
Simple object: No freeze; returns ~0.3 ms

deleteVehicle(createSimpleObject ["Land_Axe_F", [0,0,10]]);

Super simple object: returns 0.017 ms, but the game freezes for several seconds during the execution.

deleteVehicle(createSimpleObject ["A3\Structures_F\Items\Tools\Axe_F.p3d", [0,0,10]]);

Event Timeline

Leopard20 updated the task description. (Show Details)Jul 29 2021, 3:00 PM
Leopard20 edited Steps To Reproduce. (Show Details)
dedmen claimed this task.Aug 2 2021, 12:23 PM
dedmen changed the task status from New to Assigned.
dedmen set Ref Ticket to AIII-54479.
dedmen added a comment.EditedAug 2 2021, 1:57 PM

Do you actually have a valid situation where this is a problem?
outside of running it in diag_codePerformance?

Freeze happens when you delete hundreds/thousands of objects in a single frame and you have thousands of objects in the same position.
When does that legitimately happen in normal gameplay outside of performance testing?

dedmen added a comment.EditedAug 2 2021, 2:19 PM

Normal objects have the exact same issue.
Spawn thousands of them in the same spot, and delete tons of them within a single frame -> Game freezes.

Its just more pronounced with simple objects, because your test spawns way more simple objects before codePerformance timelimit runs out. Normal objects are more expensive and gets fewer objects done before the timelimit runs out.

Considering that this basically never happens in normal gameplay, I think its not worth the time investment

The pond is special case it is broken left right and center hence not officially supported in A3

This comment was removed by Leopard20.
LouMontana closed this task as Resolved.Aug 2 2021, 10:33 PM
LouMontana changed Resolution from Open to Not A Bug.

LouMontana closed this task as Resolved.Mon,
LouMontana changed Resolution from Open to Not A Bug.

It is a valid bug. We have a big inefficiency in object deletion.
I just think its not worth fixing this.

LouMontana reopened this task as Confirmed.Aug 3 2021, 1:23 PM
LouMontana changed Resolution from Not A Bug to Open.