• 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.

XML Limits Reached...

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Well, I learned something that I never realized before...

...there is a limit to the amount of XML one may have in a single <Update> section!

I just spent a frustrating sixteen hours trying to find what "went wrong" in the logic 'gauge' for my B737-200 project. Script sections that have always worked suddenly stopped working, but curiously it appeared to only be sections towards the bottom.

After examining closely every stinking line of script, testing logical 'blocks of script' individually, I could find no errors at all!

Finally, I noticed this simple XML statement:
Code:
(L:B737_PressCabinAlt, number) 100 / (>L:CabinAltitude,number)
The (L:CabinAltitude,number) variable was never being updated!

Moving this single progressively higher up the chain of logic, it finally began to be updated. That was when I finally understood that FSX simply could not process the entire <Update> section of script in a single cycle!

I guess that having just a bit over 16,000 lines of script was busting some sort of boundary. Once I cut out about 5,000 lines of script for the pressurization logic and pasted it into a new, separate gauge, suddenly everything started working properly again... :banghead:
 
I look forward to pulling you back from the darkside into the world of light and joy that is C++ :p
 
The learning curve not quite....As one of my mentors the legendary N4GIX did teach me a bit about C++ gauge programming in FSX. So he knows it. I just have to bring him up to speed with the latest tech which incidently he has helped in developing in some way or another...
 
Last edited:
My post was meant a bit more in general, but yes, Bill is very knowledgeable in many regards. He just need to come back from the dark side again :)
 
This also happens with XML code used in FS9 models. You need to spread very long controller code over several entries. Kind of like a primitive form of cloud computing. Heh...
 
This was largely an experiment to try using the minimalist approach by including most of the logic into a single <Update> section, and to use local variables and stack registers as much as possible for performance reasons.

What made discovering this "interesting" is that there was not one single "error" in the entire block of XML. When clipped out and run in a separate gauge, the XML proved perfect. By selecting one small "logical block of script" that only drives the windshield wipers, and progressively moving said block of script towards the top of the file, I eventually found the general area where FS simply stopped parsing the script file, a point where the wipers started working again.

I then took note of the number of lines of script that weren't being parsed, and determined that the pressurization logic block was the longest, so by moving it to a separate gauge's <Update> section, all that was left now worked as designed.
 
Last edited:
FS and cloud computing? That's the worst developer's pun this year, Bjorn!

But this has been a valuable project for other devs too: thanks to Bill's efforts we have an idea of how many animations in a single model are possible and where to draw the line in XML coding. Much appreciated!
 
Last edited:
Oh, I didn't miss it; after all I was part of the conversation!

I simply didn't remember it, the which is a result of old age and so forth... :o
 
Back
Top