Page MenuHomeFeedback Tracker

Arma 3 [2.10] - selectionPosition logging error to .rpt even when selection exists
Feedback, NormalPublic

Description

the script command "selectionPosition" will report "No point in selection (selection name)" in the .rpt file every time that it is run, even if the named selection exists in the chosen LOD, and the command returns its position.

Details

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

Example selection is "", found via selectionNames.
run the following code:
_sel = (player selectionNames 1) #28;
player selectionPosition [_sel,1];

It should return a position array, but this seems to have no effect on whether it reports an error.

Check the .rpt file for the current session. There will be an entry:
"[time] No point in selection proxy:\a3\characters_f\proxies\weapon.001."

Additional Information

I discovered this issue while working on a mod that would create visible lasers using the new drawLaser command from 2.0.8. Because the lasers are positioned each frame using, in part, selectionPosition, this command is called a lot. I had observed a ~5-8 fps loss while the lasers were drawn, but assumed it was due to the drawing. However, the drop may be related to this excessive logging.

Event Timeline

GhostJB created this task.Aug 25 2022, 12:28 PM

In case it helps, I was also encountering this issue back in 2.0.8, but I didn't get around to looking into its cause until after 2.10 dropped, so this bug is older than just this last patch.

POLPOX added a subscriber: POLPOX.Nov 21 2022, 3:22 PM
Tenshi changed the task status from New to Acknowledged.Nov 29 2022, 12:46 PM
Tenshi set Ref Ticket to Internal Ref. AIII-55424.
Tenshi added a subscriber: Tenshi.

Thank you for reporting this issue.
We will see what we can do to resolve it.

dedmen added a subscriber: dedmen.Jan 12 2023, 3:30 PM

The selection does exist, it just doesn't have any points in it.
It's a selection in the model that has no vertices assigned to it, its empty, its invalid.
Thats what the error says, no points, and the error is correct, there are no points and the returned position is also 0,0,0

BUT, in your case you used a proxy.
Proxy has special case after this error is printed that will resolve the position.. uff

Leopard20 added a comment.EditedJan 12 2023, 5:43 PM

Thats what the error says, no points, and the error is correct

Well you don't have to log everything. That's more important. When a command takes a few or even less than a microsecond you shouldn't log anything at all, because then suddenly that command takes hundreds of microseconds.

That's because you don't know how frequently something is gonna happen. It could be every frame. It could several times every frame.

Leopard20 added a comment.EditedJan 12 2023, 5:45 PM

In my opinion, don't log anything for any command at all, and instead add a new command line arg for that, so only if someone's interested in debugging would get them in log.

Late to the party, but it is really obvious that the selection doesn't exist when the return value is simply [0,0,0]. As Leopard20 said, it is really hard to justify this log spam in my opinion.

dedmen changed the task status from Acknowledged to Feedback.Feb 13 2023, 9:35 AM