Jump to content
Sign in to follow this  
Guest bones

SCASM bgl problems?

Recommended Posts

The above tutorial warns that SCASM-compiled bgls can be unreliable in FS9.I have been getting a few CTDs flying in the vicinity of objects created with SCASM (roads, bridges, dams, etc). Not always and never before adding the SCASM scenery. I may well have messed something up, but now am wondering if there is a serious issue here. So, two questions.1) I'm sure the authors put that caution in the tutorial for a good reason. What sort of problems have users typically been finding with SCASM objects?2) Would it help to take a SCASM-compiled bgl, decompile it with BGLAnalyze or LWMViewer, and then recompile using BGLC? This "laundering" seems to work and changes the code to the newer VTP/LWM Poly2 structure. But does it accomplish anything in the way of creating a more FS9-friendly bgl?John

Share this post


Link to post
Share on other sites

Hello John,I believe that the Beginner's Guide simply warns that some techniques used in the past may no longer be supported by Microsoft in future versions of the game.In any case, Manfred has, fortunately for us, decided to continue developing SCASM and incorporate many of the new techniques.SCASM-created scenery, therefore, should not be the cause of your problem at all, unless, of course, it has been created incorrectly.Perhaps you could provide us with more details as to the nature of the problem. That would help in determining the problem.Best regards.Luis

Share this post


Link to post
Share on other sites
Guest luissa

Hi John,I use SCASM and I get many crashes when I am designing scenery. But on 100% of the occasions there was no error in SCASM. Also, in my experience, 90% of crashes in scenery are textures that are called by BGLs and that are not present where the BGL thinks they should be.Regards, Luis

Share this post


Link to post
Share on other sites

Hi John,SCASM itself is certainly not the fault. If you would decompile the code, translate it to BGLC and recompile you would get exactly the same BGL file. So which tool you use to compile it does not matter. It is about the code written inside the BGL, as already mentioned in the other replies.So the warning in the tutorial is more to say, try to use the Fs2004 techniques (XML, etc) and not the old Fs98/Fs2000 techniques Airport for Windows, FSSC, etc still use. As these are likely to give trouble in the future (although they are still supported at the moment due to the backwards compatibility). You will see that the default scenery no longer uses these old commands.So, to come back to your problem. How did you create the BGL that causes the crash? And what does it exactly contain?


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Thanks, guys -- I really appreciate the help.All of my new and modified bgls were created with the latest version of SBuilder (2.05) and SCASM 2.96.Unfortunately, I cannot yet isolate the problem. The crashes are intermittent, so far not repeatable from any pattern of location, commands, aircraft, etc. Also, I have created or edited a dozen or so bgls in the same general region, so cannot pin down that cause either.The only common thread is it always happens in slew mode, when outracing the ability of the sim to update the scenery.I'm certain that no non-existant textures or library objects are being called. Everything shows up as expected.The only system change recently has been switching to AVG antivirus.Guess the next step is to systematically remove the mods one-by-one and retest. Maybe also let it rebuild scenery.cfg from scratch.Any other advice would be most welcome.John

Share this post


Link to post
Share on other sites

Hi John,Have you added textures you made yourself to the mesh? In that case it could also be that the format is wrong. So even if they are there, FS could crash if the format is wrong. DXT with mipmap works best in general.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno,No -- all my textures so far have come from the default Land Classes or pre-assembled VTP textures.John

Share this post


Link to post
Share on other sites
Guest luissa

>textures come from ... pre-assembled VTP textures.Hi John,Those "pre-assembled" VTP textures can either be default terrain.cfg textures or "named textures" that you can add to a list of references. The list of references that I am talking about is POLYS.TXT or LINES.TXT. I remember to add some entries to these files with the simple purpose of illustration. Is that the case that you are using a "pre-assembled" texture that does not exist?Regards, LuisONE TIP that was extremely useful for me in discovering crashing and "not loading" errors was to examine the SCASM VTP files that are created at the ../tools/work/ folder. At the end of the file there is a command that lists the textures used. Here is an example for VTP lines where I am using 8 textures (one is a custom texture and the remaining 7 are default textures):VTPTextureList( 8 "rivers25.bmp" 2 0 0 4 1097 0 0 0 4 1126 0 0 0 4 1128 0 0 0 4 1132 0 0 0 4 1133 0 0 0 4 1096 0 0 0 4 1136 0 0 0 4 )VTPEndIf rivers25.txt does not exist, FS will crash when I get near the line or lines that use that texture.

Share this post


Link to post
Share on other sites

Hi Luis,All of my textures have come from the default numbered list of objects like roads, bridges and land classes. No custom textures of any kind.All appear in the scm file just as you show, with a 3 or 4 digit number that I can identify in the default texture lists.John

Share this post


Link to post
Share on other sites
Guest bones

When I ported my FS98 scenery into FS2002 I was getting a lot of lockups. Most of the scenery had been designed with ASD and used many of the default macros from that program. I eventually removed macros for the glidepath aerial, a mast and some of the ships and that sorted it out. Two of those macros didn't use bitmaps so I guess it was a code problem that caused the lockups. A pity I no longer have them to check but I think one line FS2002 didn't like was a light call - something like:IfVarAnd( :night 28C 6 )Again I think the IfVarRange call gave problems too.boneshttp://fsaviation.nethttp://www.precisionmanuals.com/images/forum/ng_driver.jpg

Share this post


Link to post
Share on other sites

Hi Bones,The IfVarRange command will certainly not be the problem. But if you call the wrong label (: means EndA) you should very well get a crash. If you for example jump to EndA, while you are inside a ShadowCall, you can get a crash, because you should first Return from that call.Things like this can certainly give errors. But as far as I read the poster is making mesh scenery at the moment.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

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