Issue with fsVarsAircraftVarSet

Version: 1.3.23.0

Frequency: Consistently

Severity: High

Marketplace package name: if applicable

Context:
FBW A380 in community folder

Bug description:

I’ve been working to convert some of our WASM gauges to the new approach (wasm system) and using the new vars API.

There seems to be an issue that is (from my research) caused when calling fsVarAircraftSet too often, which seems to launch the plane into the ground. I’ve attached a video showing the symptom.

To reproduce, I have modified one gauge to repeatedly call fsVarAircraftSet (this is not realisitc, but we do write quite some simvars in the actual system):

  for (int i = 1; i <= 18; i++) {
      auto unit = fsVarsGetUnitId("POUNDS");
      auto var = fsVarsGetAircraftVarId("PAYLOAD STATION WEIGHT");
      auto params = FsCreateParamArray("i", i);

      auto result = fsVarsAircraftVarSet(var, unit, params, 500.0);

      free(params.array);
    }

This block was added multiple times to simulate a lot of writes.

I believe it’s an issue related to this api, as I couldn’t see it with the public version (where we use simconnect to write to aircraft variables)+ it also disappears when I remove the calls mentioned above.

Repro steps:

  1. Put the provided package into the community folder, load the plane and wait for a few minutes after clicking “Ready to fly”. It looks like the plane is being launched into the ground (see video)

Attachments:

Package: https://drive.google.com/file/d/1OLo1Gkxu4gJh7T7GIwUi_VfwNphEmeRr/view?usp=sharing

Hello @saschl

We don’t have a repro yet.
Is this something you have 5% of the time? 25%? 100%?

Regards,
Sylvain

Hi @FlyingRaccoon,

with the provided package I was able to reproduce the issue reliably (the time until it appeared varied, but it appeared eventually).

However, I just tried with the current SU2 Beta (1.4.9.0) and it seems like the issue does not appear there! :slight_smile:

Best,
Sascha

2 Likes

There has been changes with the way the WASM work is scheduled with SU2 so it could explain the change of behavior.
Let us know if you ever see it occur on SU2.

Regards,
Sylvain

2 Likes

Hello @saschl

Can you confirm this is no longer an issue?

Regards,
Sylvain

Just ran another test with 1.5.4.0 and could not observe the issue anymore :slight_smile:

Best,
Sascha

2 Likes