Archived

This topic is now archived and is closed to further replies.

martinlest2

What Is The Fault In These Sceneries?

Recommended Posts

Is anyone please able to explain to me exactly where the fault lies with those addon sceneries that cause Out-of-Memory errors in FS9? I just installed a scenery for NWWW (just as an example) and, according to Process Monitor, FS9 is searching for all sorts of bmp files in the NWWW/texture folder, when these files are in the scenery/world/texture folder. Is the fault with the NWWW bgl files?I am watching the amount of memory drain away on my FS PC as I write this on another: in 10 minutes or less, FS9 will crash, OoM. I can stop this by copying all the 'missing' bmp files from the scenery/world/texture folder into the NWWW/texture folder - but exactly why should this be necessary? And is there another way around the problem?Thanks,Martin

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I found the culprit - a bgl file which when I disassemble to an sca file simply shows that it is 'elevation data': no objects in it. But with it in the scenery folder FS9.exe looks for a large number of bmp files in the NWWW/texture folder (they are in scenbery/world/texture, as I say). With it deleted, all runs fine.So I'd really like to know what would be going on with that file, if any guru is able to explain to me.Thanks again. And a Happy New Year ...M.

Share this post


Link to post
Share on other sites

Hi Martin,I assume the file is fairly small? If so it's most likely a land class file that places default ground textures. There's a known issue with FS9 that a land class file that sits in a scenery folder with a parallel texture folder will always look in that texture folder first (instead of in Scenery\World\texture). For some reason, each file search operation for those textures makes the sim allocate memory space but it never lets go of that space, which leads to memory overflow and thus OOM crashes. The solution is to place the land class bgl file in an active add-on directory that does not have a parallel texture folder. While in the case of NWWW it's obviously an error by the author there are add-ons where land class files include custom textures in which case the parallel texture folder is OK. I'm just pointing this out because there's been a number of posts in the forums that state that a land class file should never have a parallel texture folder. If in doubt check with the author of the add-on.Cheers, Holger

Share this post


Link to post
Share on other sites

Hi Holger,No, it wasn't an LC file in fact (it was a terrain elevation mesh data file) - I am always careful with landclass files: if I understand correctly, so long as the texture file that a landclass bgl file is searching for is found in the accompanying texture folder, there is no problem. But if the bitmap is not there, then serious problems.. I have lots of addons (payware too) with LC files in the scenery folder of the scenery/texture folder pair, but as the texture is there to be found, I never have any problems.I just installed another airport scenery and yet again I see my RAM (there's a very handy CPU/RAM used LCD on my PC) dwindling away to virtually nothing before I even get to the runway. Sure enough, in Process Monitor endless searches in the scenery's own texture folder for bmp files (of the 010b2m10.bmp variety, for instance) that are in the scenery/world/texture folder. How come addon sceneries so often (or am I just unlucky) look for generic FS textures in their own texture folders rather than in the FS global folders? Where is the fault? It's not a small thing as, with my PMDG a/c, I don't even get off the ground before there's an OoM crash.The solution (I've been on this TWO DAYS now - got no flying done at all) is either to copy all the bmp files that the scenery is looking for from the scenery/world/scenery folder into the airport's own texture folder (but this can be a silly number of files) or by trial and error (just what I am doing now) move out suspicious bgl files from the airport scenery folder and find the one (or more!) that is/are causing the problems. One just hopes it's not a bgl that defines the runways or something vital..The real question, as far as my post was concerned, is why do these erros exist in the first place? Why is FS9.exe looking for the bmps it wants in the wrong place?And a happy new year to you Holger.Martin... and if the fault is really scenery designers (payware!!) putting LC or other 'problem' bgls in the scenery folder along with all the other files instead of into their own scenery folder without an accompanying texture folder, why is this still happening after so many years of FS9? :-)

Share this post


Link to post
Share on other sites

Hello Martin,I am not convinced that this is the source of your memory problems (although, of course, I could be very wrong.)Flight Simulator, all versions, first looks for required textures in the local texture folder (the one accompanying the local scenery folder.) This should not consume any memory at all while the queries are executed, and not even a lot of clock cycles, so it is all pretty trivial as far as resources are concerned.If textures are not found there, then FS looks in the fallback folders, such as the FS\Texture folder, the various Generic and other folders, and the World folder.None of these queries will occupy memory of any kind and so they should not be creating problems for you.The most indicated culprit is what Holger said, and perhaps you could try dis-activating all you add-on or third-party scenery first, and then see if you still have memory problems. If not, then you will have to look, as you already have, through all the individual scenery packages to find the cause.Best regards.Luis

Share this post


Link to post
Share on other sites

Hi,A case in point might be of interest: I loaded up a flight at WSSS yesterday. Within 10 minutes the PC was Out of Memory. I could see, using Process Monitor, that a number of bmp files were 'missing' from the WSSS/texture folder. By selectively removing bgl files and noting what was happening in PM, I found the one bgl file that was causing the problem: remove it, and no memory drain at all. Put it back and the problem returns.So I decompiled the file to an sca file and looked at all the objects (nearly 400 of them) until I came to one which wanted to access a bitmap that was not in the WSSS/texture folder. There was just one entry for one bmp file - a file that is in scenery/world/texture. I copied the file from there to the WSSS/texture folder and end of problem: memory stays constant at the airport.I was really asking why this problem occurs. I can understand it when people like me, who make airport sceneries at the lower end of the competence scale, might do something to cause this, but for payware from 'respected' companies, it's a bit odd (for want of a better word!).Martin :(

Share this post


Link to post
Share on other sites

Well, Martin, we would really need a lot more information in order to de-bug the problem. As far as I can remember, this is the first time, in many years, that I have ever heard of a memory problem caused by a texture being in a fallback folder instead of the local folder.To give you an idea, in all my projects, literally dozens of them, I create objects using both custom textures in local folders and default FS textures that stay in default folders. I have never had a memory problem, ever.If you are really curious, then please indicate exactly the SCASM code of the problematic object and show the texture and indicate its format and dimensions.Best regards.Luis

Share this post


Link to post
Share on other sites

Luis,This is the object entry in the bgl in question. As I say, copying the bmp file into the local texture folder from the scenery/world/texture folder stopped the memory leak - I tried several times moving the file in and out of the scenery's texture folder just to make sure that this is what is happening, and it most definitely is.. is a default FS9 file of course, so its format & dimensions you can easily find out. Odd, isn't it? But I am a bit mystified as to why you say this is so unusual: it's not the first time by any means that my moving a bmp file (copying it, I mean) from an FS9 default folder, usually scenery/world/texture, into a local texture folder has cured a memory leak problem.Regards,M.-----------; Object # 223, offset: 0x765E size: 266 bytes (0x010A) ;; Lat: 000024A6Bh Lon: 049EF6281h; ----------------------------------------Area( 5 N01:21:03.13 E103:58:16.43 31 ) LayerCall( :L007674 6 ) Jump( : ):L007674 RefPoint( rel :L007766 4.00 N01:21:03.16 E103:58:16.43 V1= 31000 V2= 3557 ) Points( 1 0 0 0 ; 1 -3 0 -50 ; 2 -62 0 -168 ; 3 -112 0 -276 ; 4 -118 0 -360 ; 5 -143 0 -410 ; 6 -178 0 -427 ; 7 -170 0 -502 ; 8 125 0 -650 ; 9 223 0 -572 ; 10 210 0 -565 ; 11 206 0 -552 ; 12 280 0 -373 ; 13 365 0 -177 ; 14 55 0 -50 ; 15 52 0 -30 ; 16 ) Smoothing( 1 ) SurfaceColor( 04 F0 ) LoadBitmap( 0 5 EF 127 127 127 015F2SU1.BMP ) Concave StartSurface ; use only for polygons flat on the ground MoveToPt( 1 ) ; use for line drawing only DrawToPt( 2 ) ; use for line drawing only DrawToPt( 3 ) ; use for line drawing only DrawToPt( 4 ) ; use for line drawing only DrawToPt( 5 ) ; use for line drawing only DrawToPt( 6 ) ; use for line drawing only DrawToPt( 7 ) ; use for line drawing only DrawToPt( 8 ) ; use for line drawing only DrawToPt( 9 ) ; use for line drawing only DrawToPt( 10 ) ; use for line drawing only DrawToPt( 11 ) ; use for line drawing only DrawToPt( 12 ) ; use for line drawing only DrawToPt( 13 ) ; use for line drawing only DrawToPt( 14 ) ; use for line drawing only DrawToPt( 15 ) ; use for line drawing only DrawToPt( 16 ) ; use for line drawing only EndSurface Smoothing( 0 ):L007766 ReturnEndA

Share this post


Link to post
Share on other sites

Then I am most likely wrong, Martin. It would not be the first time. What really matters is that you have found the solution to your problem.Best regards.Luis

Share this post


Link to post
Share on other sites

Indeed Luis. But thanks again. Your help in this forum is always much appreciated.Martin

Share this post


Link to post
Share on other sites

The file is a groundpoly created by a very old technique... I'm actually surprised it works at all.This is not terrain... so the terrain texture rules do not apply. In this case, the sim simply cannot find the texture, and goes into a loop looking for it.I wonder if copying the texture to:C:\Program Files\Microsoft Games\Flight Simulator 9\Texture...instead of the local folder will also allow the file to work?Dick

Share this post


Link to post
Share on other sites