• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA A mysterious XML issue

Messages
371
Country
france
Hello,

My panel use many xml gauge with only script (no bitmap), to simulate FMC.

So, since 3 months, I have a mysterious bug that occurs randomely.

I have a "descent" gauge, which controls aircraft pitch (FMC managed descent). So, sometimes when I engage descent, a part of the gauge code doesn't work, and aircraft pitch freeze.

I checked many time my code, and there is no synthax or logical error inside.

The most mysterious is that some users who help me to debug aircraft haven't this bug on their computer (same panel, same aircraft).

Other mysterious, panel include a save data gauge, when you save a flight (all FMC data are saved in CSV file and the flight can be reloaded where you were.
So, when problem occurs, if I save my flight, quit the flight and reload it, all works fine !
I wrote a debug gauge that displays all A: or L: vars on the 2D cockpit to know system status and I don't see any wrong value in my Variables.

I read on the forum that there is a limit at 50ko to an XML script. But all my script gauge have size between 15 and 40 ko.

My questions :

- Is there a limit to the total xml script of all the gauge cumulated ?
- do you think that the windows version (XML parser version) can cause this issue ?
- All my scipt gauge are in the VCcockpit01 section. I have 37 gauge in this section. Is there a limit to the number of gauge in VCCockpit section ?

This moornig, I tried to move my descent gauge in the VCCockpit02 section, and I did a flight with no problem (I had not enough time to do other test..)

I have to do other test with this solution, but do you think that is possible that the issue comes from too much gauge or script in the VCcockpit01 section ?

Thanks for your help, because I am desesperate.


François
 
Hi,

I doubt if your panel is overly complicated - I've seen some that are amazing.

If you are using autopilot variables to control the pitch, make sure that the plane has electrical power - if it doesn't they won't work. Accidentally leaving the generators turned off will cause this to happen after a while.
 
Hello,

Thanks for your help. Electric power is ok. The thing that I don't understand is that panel works on some computers, and not on others.....
I did a second flight without problem with gauge placed on VCocpit02 section. I will do other tests...
 
A thing you can try to debug it: place several Lvar counters in your gauge (that increment each schedule) and read out their values in another 2D testgauge.
At least this gives you information if the whole gauge stops, or just a specific part (for whatever reason).
So you can narrow it down ...

Rob
 
Ps.
I just remembered another odd thing I once experianced myself: if the gaugenumbering of the gauges in a section isn't consecutive (like one number was skipped) all gauges after skipped gauge number didn't load.
But this was in a 2D window, and only with a large number of gauges in it (like 40 or so).
So probably not related, since these gauges didn't load at all in that situation.
 
Hello Rob,

I have already did that. I have a debug gauge which display all my L:Vars and some A:vars value, and as my panel use dsd_xml_sound3.dll, I place in my code where I want to check, sounds instruction (as 1 (>L:CA_Sound12).

If code is executed, I must here a "dong"; I move the instruction, and when I don't hear "dong", I know that this part of code is not performed. So, I know now the part of the gauge that doesn't run but I don't find error and Code has been checked again and again and again...

the mysterious is gauge fail only on some computers and not on other....(but all with the same FSX version).


Francois
 
Which FSX version, Francois?

P.S: I've looked at your gauge. See yourFMC thread in the PA forum.
 
Francois,

Let's try to focus on a debug line:

1) Does the sim freezes, or CTD when the problem rises?
2) if 1) is negative, is a complete section of code that quits working, or only some FS commands (events) are not executed?
3) Does the failing script reside in an <Update> or <Element> section?
4) Have you checked your VAS in every working/failing case? (needs FSUIPC)

Tom
 
Hello Tom,

1) Sim doesn't freeze. I can fly
2) and 3) It is a part of an <Update> section that doesn't work. THis gauge has no <element> (no bitmap, only script).
4) I don't know where to check VAS in FSUIPC, but I am going take a look

After 3 flights, the solution to move the Descent gauge in the VCockpit02 section seems to solve the problem; bug has not appear again); but I want to do more tests and I don't undestand why problem is only when I place my gauge in VCockpit01 section...

I check FSUIPC
 
Here is my Descent gauge with strange issue : http://freenavdbgroup.com/Temp/A32x_FMS_DES.xml


This gauge is activated when aircraft managed descent is engaged.

- Code from line 1 to 114 works (edited with notepad++). After, code is ignored on some computers, and not on others.

- if bug appears, by save the flights and reload it solves the problem ! (FMC saves all L/vars state in a file). That mean that the gauge has no synthax error.

- Seems to work since that I placed the gauge in the VCockpit02 section

All conditions of the conditionnal block which start at line 114 have been checked with a debug gauge during flight and all value are ok when descent is engaged, so code should run...

Francois
 
Hi Francois,

I don't use Notepad++ so the code is almost impossible to read for me without a complete reformat with indentation ...
But I have two other suggestions to look at, since this problem suddenly occurs .... with you, and not on other PCs ..

- Does the framerate drop below 15 fps or so ??
Meaning that the effect of an issued AP event might not be visible in the next gauge schedule yet (if it runs at 55 msec schedule)

- Is it possible in some situations, that you induce "continuous AP-events" ??
I mean, situations where you give the same event at every schedule again without checking the current state of the function or protection with Lvar states ?

Code like:
Code:
(A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 0 >
(A:GENERAL ENG2 THROTTLE LEVER POSITION,percent) 0 > and
(P:Absolute time,seconds) 1 % 0.03 1 * > ! and
if{
  0 (>K:AP_N1_REF_SET)
}

followed by

(A:Autopilot Airspeed Hold,bool) 0 ==
(A:Autopilot Mach Hold,bool) 0 == and
(A:GENERAL ENG2 THROTTLE LEVER POSITION,percent) 0 > and
(A:GENERAL ENG2 THROTTLE LEVER POSITION,percent) 0 > and
if{
  1 (>K:AP_N1_HOLD)
  0 (>K:AP_N1_REF_SET)
}

makes me think of such a possibility. But again, just guessing here ...
So, make sure this problem isn't induced by event flooding .
You could use Doug Dawson's event logger gauge (or other ways) to check this.
Or, in a situation where the problem occurs: try to open the 2nd exit with (default) "Shift-E 2" key sequence; if exit 1 opens instead, it's surely a case of event flooding (maybe even in mdl or other gauge code)

Rob
 
Last edited:
no event flooding. I tested with Doug's event logger (throttles are at idle during descent and this code is to prevent if joystick thottles have some "noise") but you found a part of code wrote with my feet and doubled ! I fix it; thanks !

No framerate issue. Nothing abnormal except gauge fail....

Thanks for you help.

5th fly test this moorning, and no bug (with the gauge in the VCockpit02 section).
 
Hello,

After many flight test to validate, the problem is definitibely solved by moving the Descent gauge in the [VCockpit02] section. I don't understand why, but that works. :wizard: :scratchch

FSX is very mysterious......

Francois
 
Keep in mind if some gauges are in different sub panels, they will load (and execute) ONLY if that subpanel is loaded before that. The only sub panels that load ALL the time are the VCockpit sections. I always put my "housekeeping" and "background" gauges in those sections to be sure they are loaded and executed no matter what view the user starts with.
 
Keep in mind if some gauges are in different sub panels, they will load (and execute) ONLY if that subpanel is loaded before that. The only sub panels that load ALL the time are the VCockpit sections. I always put my "housekeeping" and "background" gauges in those sections to be sure they are loaded and executed no matter what view the user starts with.
Hi Tom,

Yes, your remark (by itself) is very true.
But Francois' problem wasn't about loading/executing a gauge, but why part of the XML gauge code suddenly stops working when this gauge is placed in his Vcockpit01 section and never fails when placed in his Vcockpit02 section.
I still am very curious to know (but I'm a sucker for such detail ..LoL) what could be the cause of this odd behavior ..

Best, Rob
 
Hello,

the fact to move the gauge in the VCockpit02 section has solved for my A320 model, but bug is come back when I update my A318 model.

After 4 weeks of search and test, it seems that the gauge works now with all models. Problem came from the remarks that I wrote in my code.

When since I removed all my remarks, gauge works perfectly (I hope !! ).

Very curious, because I used only standard characters ( I have been in the past problems with remarks which include french characters like : é à è ç ' ........

May be too much remarks or placed at a wrong place. I write all my remarks with this syntax : (* my remark *). In first I replaced by <!-- my remark --> , but no change in the bug.

Finally, I removed all remarks, and bug is gone.


In all other gauges, I have many remarks in my scripts and they works. I think that this bug will stay a mysterious for me.

Thanks

Francois
 
Back
Top