Jump to content
Sign in to follow this  
Petraeus

Version 2.1 OOM and possible memory leak.

Recommended Posts

What we all need is a new dial on the instrument panel.  

 

We need a VAS indicator.  Seems like monitoring VAS usage is just as important as altitude, speed, heading, oil pressure, etc. I am kind of joking, but kind of serious too.

 

A while back I wrote a utility (available in the AVSIM library) called QuantumLeap which also includes a stand-alone VAS monitor that runs in a separate window on the FS machine or on a networked PC via WideFS.  Since it uses FSUIPC as the interface, it should work in P3Dv2 as well.

 

Regards


Bob Scott | President and CEO, AVSIM Inc
ATP Gulfstream II-III-IV-V

System1 (P3Dv5/v4): i9-13900KS @ 6.0GHz, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090
Samsung 55" JS8500 4K TV@30Hz,
3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU, 1.2Gbps internet
Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro
PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box

Sys2 (MSFS/XPlane): i9-10900K @ 5.1GHz, 32GB 3600/15, nVidia RTX4090FE, Alienware AW3821DW 38" 21:9 GSync, EVGA 1000P2
Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, 2x TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case

Portable Sys3 (P3Dv4/FSX/DCS): i9-9900K @ 5.0 Ghz, Noctua NH-D15, 32GB 3200/16, EVGA RTX3090, Dell S2417DG 24" GSync
Corsair RM850x PSU, TM TCA Officer Pack, Saitek combat pedals, TM Warthog HOTAS, Coolermaster HAF XB case

Share this post


Link to post

I've been running some non-scientific tests on aircraft that I have. I have sat some aircraft at the gate in Paused mode, while watching FSUIC's remaining VAS numbers. What I have found (hopefully others will try this, too) is that aircraft that have panels based on compiled code do NOT leak memory. These include the default King Air and default Cessna C172, and the BlackBox A319. However, aircraft that have panels based on xml files can lose up to 0.5GB of VAS per hour. My favourite turboprop (also the King Air but with a panel consisting almost entirely of xml files) does this.

 

I forget where I heard this, but I believe someone said that LM has modified the xml interpreter. Perhaps a bug was introduced here.

 

Frans Kes

 

As a side note, I have flown my version of the King Air on several flights from KLAX to CYOW lasting over 7 hours each with P3Dv2.0. No problem at all.

Share this post


Link to post

However, aircraft that have panels based on xml files can lose up to 0.5GB of VAS per hour. My favourite turboprop (also the King Air but with a panel consisting almost entirely of xml files) does this.

 

Thats about exactly what I have found. You dont need to fly which tells you its not scenery/trees loading. It may be any XML file even default GPS. Im no programmer.

Share this post


Link to post

 

 


I forget where I heard this, but I believe someone said that LM has modified the xml interpreter. Perhaps a bug was introduced here.

 

It could also be sloppy XML code where variables keep piling up on the stack.  It's possible that FSX didn't have a problem with this, but the fixed interpreter from LM does.

 

Hook


Larry Hookins

 

Oh! I have slipped the surly bonds of Earth
And danced the skies on laughter-silvered wings;

Share this post


Link to post

Let a flight go from KATL to RJAA overnight.

 

Landed this morning.

 

No OOMs.

 

What am I doing wrong ?


Regards,

Brian Doney

Share this post


Link to post

About the sloppy programming. Xml files can assign variables, sometimes a whole lot of them. But the xml files that I've seen do not assign growing arrays. The growing "stack" is purely at the interpreter's side.

 

Frans Kes

Share this post


Link to post

I just did a flight in the Raptor from Langley to Andrews AFB, Veggie Autogen on Max, default scenery.  Almost an OOM.  Started out with about 2.37GB VAS and ended up with .23GB or 240MB's left.  Here's a modified FSUIPC.log (no figures modified; just removed extraneous lines):

 

31 System time = 16/02/2014 13:04:05
       31 FLT path = "C:\Users\JimY\Documents\Prepar3D v2 Files\"
       31 Trying C:\Program Files (x86)\Lockheed Martin\Prepar3D v2\Modules\SimConnectP3D2.dll
       31 Found it: trying to connect
       31 FS path = "C:\Program Files (x86)\Lockheed Martin\Prepar3D v2\"
      156 LogOptions=00000000 00000001
      156 SIM1 Frictions access gained
      156 Wind smoothing fix is fully installed
      156 SimConnect_Open succeeded: waiting to check version okay
      156 Trying to use SimConnect Prepar3D
      156 Running in "Lockheed Martin® Prepar3D® v2", Version: 2.1.9936.0 (SimConnect: 2.1.0.0)
      156 Initialising SimConnect data requests now
      156 FSUIPC Menu entry added
      156 C:\Program Files (x86)\Lockheed Martin\Prepar3D v2\FLIGHTS\OTHER\Prepar3D.FXML
      156 C:\Program Files (x86)\Lockheed Martin\Prepar3D v2\SimObjects\Airplanes\IRIS Raptor Driver\Raptor.AIR
   141665 System time = 16/02/2014 13:06:27, Simulator time = 13:04:06 (18:04Z)
   141665 Aircraft="F-22 Raptor - 94th Fighter Squadron"
   146657 Starting everything now ...
   147998 Advanced Weather Interface Enabled
   199790 Sim stopped: average frame rate for last 56 secs = 49.4 fps
   327368 Monitor IPC:024C (S32) = 2488756  = 2.37GB
   387148 Sim stopped: average frame rate for last 59 secs = 49.7 fps
   408723 Weather Mode now = Custom
   554443 Sim stopped: average frame rate for last 143 secs = 49.2 fps

   564131 Monitor IPC:024C (S32) = 2295716
   864932 Sim stopped: average frame rate for last 257 secs = 47.6 fps
   865150 Monitor IPC:024C (S32) = 938152  
  1226417 Monitor IPC:024C (S32) = 327464   =  .320GB
  1236495 **** WARNING! Free memory is very low!
  1236495 Monitor IPC:024C (S32) = 247808
  1246510 Monitor IPC:024C (S32) = 289916
  1256541 **** WARNING! Free memory is very low!
  1256541 Monitor IPC:024C (S32) = 185080
  1266619 **** WARNING! Free memory is very low!
  1266619 Monitor IPC:024C (S32) = 216948
  1276650 **** WARNING! Free memory is very low!
  1276650 Monitor IPC:024C (S32) = 217804
  1286665 **** WARNING! Free memory is very low!
  1286665 Monitor IPC:024C (S32) = 218216
  1296680 **** WARNING! Free memory is very low!
  1296696 Monitor IPC:024C (S32) = 217360
  1306696 **** WARNING! Free memory is very low!
  1306711 Monitor IPC:024C (S32) = 214800
  1316711 **** WARNING! Free memory is very low!
  1326726 **** WARNING! Free memory is very low!
  1326726 Monitor IPC:024C (S32) = 166288
  1336788 **** WARNING! Free memory is very low!
  1336788 Monitor IPC:024C (S32) = 211408
  1346803 **** WARNING! Free memory is very low!
  1346803 Monitor IPC:024C (S32) = 161676
  1356834 **** WARNING! Free memory is very low!
  1356834 Monitor IPC:024C (S32) = 190492
  1366881 Monitor IPC:024C (S32) = 268100
  1376912 **** WARNING! Free memory is very low!
  1376927 Monitor IPC:024C (S32) = 209364
  1386942 **** WARNING! Free memory is very low!
  1386958 Monitor IPC:024C (S32) = 213796
  1396973 **** WARNING! Free memory is very low!
  1396973 Monitor IPC:024C (S32) = 204060
  1406989 **** WARNING! Free memory is very low!
  1407004 Monitor IPC:024C (S32) = 222324
  1417051 **** WARNING! Free memory is very low!
  1417066 Monitor IPC:024C (S32) = 229172
  1427066 **** WARNING! Free memory is very low!
  1427066 Monitor IPC:024C (S32) = 245556         = .23GB; 240MB
  1434726 Sim stopped: average frame rate for last 543 secs = 29.0 fps
  1439234 System time = 16/02/2014 13:28:05, Simulator time = 13:20:47 (18:20Z)
  1439234 *** FSUIPC log file being closed
Average frame rate for running time of 1057 secs = 38.5 fps
Memory managed: 414 Allocs, 414 Freed
********* FSUIPC Log file closed ***********

 

 


Jim Young | AVSIM Online! - Simming's Premier Resource!

Member, AVSIM Board of Directors - Serving AVSIM since 2001

Submit News to AVSIM
Important other links: Basic FSX Configuration Guide | AVSIM CTD Guide | AVSIM Prepar3D Guide | Help with AVSIM Site | Signature Rules | Screen Shot Rule | AVSIM Terms of Service (ToS)

I7 8086K  5.0GHz | GTX 1080 TI OC Edition | Dell 34" and 24" Monitors | ASUS Maximus X Hero MB Z370 | Samsung M.2 NVMe 500GB and 1TB | Samsung SSD 500GB x2 | Toshiba HDD 1TB | WDC HDD 1TB | Corsair H115i Pro | 16GB DDR4 3600C17 | Windows 10 

 

Share this post


Link to post

Larry, the XML parsing engine that MS/ACES coded for FSX was designed to "self-correct" minor imperfections in the syntax. For example, having a extra closing parenthesis would trigger the parsing engine to simply discard it and complete the evaluation anyway:

(A:GENERAL ENG COMBUSTION:1),bool)

In the above, the extra ")" following the ":1" would be discarded, because it didn't match either the FS9 or FSX syntax "rules," so it was obviously a fumble-fingered error.
 
The P3Dv2.1 parsing engine however no longer allows for such untidiness, and is very strictly enforced. I have found several such boo-boos in my own GPS scripts. What is interesting is that whenever the parsing engine encounters any such errors, it doesn't cause the sim to crash. Instead, it simply stops evaluating the script at that point!
 
That's the "Bad News." The "Good News" is that L-M have provided a new entry one may make in the Prepar3D.CFG file that will generate a text file listing all such XML errors, whether in a "gauge" or the embedded XML scripts in a compiled model file!

[MAIN]
ObjectLoadErrors = 1

This entry will silently write a text log of errors that is written immediately upon unloading an aircraft:
x:\Users\YourUserName\Documents\Prepar3D v2 Files\ObjectLoadErrors.txt

 

This file will list which "gauge" generated this error, and list the "script" in which the error exists, along with some hints as to what the precise error might be. It's up to the author to identify and fix the error(s) though. The end goal of course being having a completely blank error file when everything has been sanitized. :yahoo:


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post

Interesting. I checked the Raptor's panel. It is entirely based on xml files!

 

Frans Kes


Regarding Fr. Bill's note about the error log (that will be very useful for debugging), gauges based on xml files with coding errors will not show up on the panel.

 

Frans Kes

Share this post


Link to post

So Fr.Bill. Is at all possible for any of theses errors to cause a memory leak or excessive VAs usage?

Share this post


Link to post

Please help me understand this, setup vas monitoring thru FSUIPC, start up default flight, it showed just under 2G then dropped to 1.8.  I then loaded the ####737 ;)  Flew from Langley to KBFI all the way across the USA, VAS NEVER got above 1G  What the heck???  3+ hours no OOM, no high VAS, perfect smooth flight.  What am I doing wrong??

 

Rob

Share this post


Link to post

Check the panel.cfg file and the files it references. I believe that if the panel files are dll's (and most purchased aircraft would be), then OOM's would not occur.

 

Frans Kes

Share this post


Link to post
Guest

 

 


What am I doing wrong ?

 

 

 


What am I doing wrong??

 

Apparently both of you are doing nothing wrong and everything right :)  ... just too many variables in the OOM equation ... probably why it's extremely different to make progress with it and find harmony.

 

I had a good flight last night, stutters not too bad, no OOMs ... key as always seems to be the Veggie setting ... Normal provides the mojo experience for me at least for flights <3 hours so long as no takeoffs or landings at any FD or FB airports (one but not both in the flight plan, need to avoid them mid flight too).

 

I'm still trying to make V2.1 work, but like I posted, Fraps now reports a different fps than the internal fps counter (this didn't happen in V2.0).  Here is a more positive flight I made last night (if you blink at the correct time you don't see stutters) that I also posted in my stutters thread.

 

Share this post


Link to post

I think it's likely more to do with the fact that I haven't EMT-stuffed my install full of things of questionable compatibility.  :P

 

We have people here reporting issues with addons from companies that have flat out stated they do not/will not support the platform.

 

FTX everything has been incompatible, in one way or another, since day one.

 

In any case I'm not going to rehash all of that, we went over much of it with 2.0 release, and most of what was said then was ignored, and would likely be again. All I will say is that once again, while there are definitely, without a doubt, issues with P3D2 that need some attention, a very large part of what gets reported has more to do with people that just can't be without their $widget, consequences be damned. The real shame is how much those voices tend to overpower those with actual core issues.

 

Yo know what, let me stop myself, as there is little point in going down this road again.


Regards,

Brian Doney

Share this post


Link to post
Guest

 

 


All I will say is that once again, while there are definitely, without a doubt, issues with P3D2 that need some attention, a very large part of what gets reported has more to do with people that just can't be without their $widget, consequences be damned. The real shame is how much those voices tend to overpower those with actual core issues.

 

I don't know ... I'm pretty sure LM are capable to separating fact from fiction.   Program maintenance is extremely different, as a software engineer I much much much prefer NEW projects vs. updating old projects.

 

 

 


We have people here reporting issues with addons from companies that have flat out stated they do not/will not support the platform.

 

That's most likely because the developer(s) have moved on to something else and there is no one willing to take over because they don't see the revenue rewards from doing such.  Now if the rewards are big $$$ then you can bet "will not support" turns into "will support" ... money talks.  But we're a small community and a big part of this community wants something for nothing as if somehow they're "owed" it ... that in itself is a big 3rd party deterrent.

 

But regardless, LM need to find a stable product ... IMHO, that will only come when they either severely restrict graphics options in their existing V2.x line, OR they release a 64bit product (in addition to their 32bit product).  Slowly 3rd party will be "the first" to release a true 64bit add-on and reap the rewards ... then the ball will start rolling.  We can only hope ... and yes, this is moving on a different path for this thread (not like that never happens) ;)

 

Cheers, Rob.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...