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

CAT Tool - Runtime Error 9

Messages
10
Country
us-maryland
Arno,

Hanger door animation - 6 doors - three open to the right, three open to the left. Doors are named 'tick18_Door1' through 'tick18_Door6'.

Animation works correctly in FS2004.

Using CAT v1.01

1st Screen - Animation Condition - left blank, Next
2nd Screen - Animation Trigger - NAV2 Frequency, Variable = 07C2h, Minimum Value =1300h, Maximum Value =1300h.
3rd Screen - Secondary Condition - left blank, Next
4th Screen - Source Files - .asm file selected
When Next is pressed, compile(?) runs- progress bar goes about 5/6th of the way, then Run-time Error '9' Subscript out of range. When OK is pressed in error message dialog, CAT closes.

_cat.asm file is created (2KB), _cat_0.asm file is created (3424KB).

Input .asm file is 2KB, Input(?) _0.asm file is 3016KB

Can you help with this please?

Thank you,

Mike White
 
Hi Mike,

Could you please sent me your ASM files? It sounds like you are running out some sort of array and that is solved easiest if I can try to reproduce it here. You can email them to the address given in the manual.
 
Got them. Will let you know once I have tested them.
 
Hi,

I could reproduce the error, it was indeed an array that was too small. But after fixing that, the object created a crash in FS (as I expected). This is because the SCEN section of your file is very long, about 600 entries. And CAT makes that even more, this is too complex for FS.

I have no idea why your SCEN section is that long, it should normally have a maximum of 20 entries or so for a normal hangar. Have you maybe used a lot of linking on other parts as well?
 
I had another look at the ASM file and the structure surprises me. Are you compiling with the optimize option turned on in MakeMDL?
 
Arno,
This is a large hanger with a lot of transparent windows (including the doors). There are a total of eight doors (six of which are animated), each with two windows (16 textured planes) each of which is ATTACHed to the door object so that they move as a group. There are thirty-two additional windows (64 textured planes) in the walls. Each of these windows is GROUPed so that they could be moved into place without separating. The interior contains a lot of details which again are grouped objects to enable positioning.

As to your question on MakeMDL, I can't answer that because GMax controls the process during export. I just drag-and-drop the resulting XML onto BGLComp to get the BGL file.

If the grouping is causing the high incidence of links, now that the objects are in place I can undo the grouping (ungroup) if this will solve, or help to solve the problem.

I will send you a screenshot of the hanger by e-mail attachment so that you can see what I am talking about.

Thank you for your time and trouble on this.

Mike White
 
Hi Mike,

I had a look at the images you mailed me and that is a nice looking hangar :). I can see the structure is rather complex.

I usually design my own objects less complex (with the detail in the texture), so I can't really tell you if this is the reason of your high amount of entries in the SCEN table.

Are you using a cfg file for MakeMDL? In that case you might want to try to add Optimize=1 to see if that makes the code more efficient. I thought this option was turned on by default, but I am not sure after seeing your ASM file :).

If you want I can try to export it here as well, but then you would have to mail me the GMax file (I don't need the textures, etc).
 
Until today I was not familiar with MakeMDL and makemdl.cfg files. I finally located them and found that in the makemdl.cfg Optimize was "0". I changed it to "1" and re-ran Gmax "export". The new .asm worked all the way through CAT to completion producing the "_cat.mdl" file.
Using a different animation's XML as a guide, I then substituted the _cat.mdl filename for the GMax generated .mdl filename in the XML, compiled it with bglcomp.exe and put the resulting .BGL file in the Scenery folder for the hanger. I then started FS9 and when I rotated the scene to see the hanger, FS9 crashed to desktop.

I am not sure that the filename substitution in the XML is the correct way to do this so, if it is not, could you advise me of the correct procedure. This is my first try at animation so I am not sure of the correct steps to follow.

After this, I went back to the GMax program and Ungrouped everything that was "grouped", and removed all of the polygons that I could find that would not be seen or were otherwise unnecessary and created a new GMax file. This reduced the" _0.asm" file by about a third from 3016KB to 2054KB. However I am now getting a warning in GMax when I Export of "the model has an explicit OBED scaling matrix prepended to it. this is unnecessary and should not be done." I have no idea what to to about this. I ignored it and changed the XML lat, long, and heading entries to match the location of the hanger, then processed the .asm file through CAT as above. While all outputs were substantially smaller than before, I still crash to desktop in FS9.

At your suggestion I will send the newer ".asm", "_0.asm", and GMax files to you for your review. If I did this correctly, then I am out of ideas of how to fix the problem.

Thank you for all of your time and interest in this. I have a different version of this hanger with no transparent windows or detailed interior, but with animated doors, that works well. I was hoping to improve on it, but it may be just too much in one model. If that turns out to be the case, then I guess I wil have to start over and make the project as 3 or 4 gmax files placed individually.
 
Hi Mike,

Just to let you know I got your email. I will take a look at the files later this evening.
 
Hi Mike,

I was able to solve that scale error by using the Scale Reset button on the Hierarchy tab. After that it compiled fine and the length of the SCEN table was much better (about 7 entries, as expected).

But unfortunately the object still crashes FS after running CAT on it. We never really found the reason for these crashes, but in general it only happens with very complex objects, so I think there is somewhere a jump that is too big to be made (for example because of a 16bit pointer to it). So I think this object is just to complex to compile at once.

I tried a few extra things. One was to export the hangar with only one animated door. But this did not help, FS still crashed after running CAT on it. So that makes me think it is not the complexity of the animation, but the total complexity of the object that causes the crash.

The second thing I tried was to export the doors (all 6) plus only the roof. In that case everything worked fine, even after running CAT. So maybe you can try to make two MDL files of your hangar? One with the doors and another with the remainder of the hangar.
 
Hi Arno,
There were some things about the textures that I did not like in addition to the complexity of the model, so I'm going to start over.

I would like to know, however, if my procedure of putting _cat.mdl in the XML was correct.

My approach this time is going to be build the basic hanger walls, then insert and animate the doors. From there I will add general structural details until it breaks (if it does). All of the interior details will go in a different model. I'll let you know how it goes.

Thank you very much again. You went beyond the call of duty on this one. It is much appreciated.

Mike
 
Hi Arno,

I need some help on elimination of the "the model has an explicit OBED scaling matrix prepended to it. this is unnecessary and should not be done." I located the Hierarchy tab and the Scale Reset button, but it does not have any effect. Obviously I am not doing something necessary. Could you provide explicit directions on what you did to eliminate this warning?

Thank you,
Mike
 
Hi Mike,

Mike White said:
I would like to know, however, if my procedure of putting _cat.mdl in the XML was correct.

Yes, to load a different MDL file, all you have to do is to change the name in the ModelData command.

Mike White said:
I need some help on elimination of the "the model has an explicit OBED scaling matrix prepended to it. this is unnecessary and should not be done." I located the Hierarchy tab and the Scale Reset button, but it does not have any effect. Obviously I am not doing something necessary. Could you provide explicit directions on what you did to eliminate this warning?

Oops, I must have been clicking something else first :). I tried it again and now it did indeed not solve the error. So looking back at what I tried yesterday, it was the Reset XForm function that solved the problem. You can find it on the Utilities tab.
 
Hi Arno,
Thanks for getting back to me with the answers. "Reset X-Form" did the trick after I selected the whole model.

The hanger is now done and ready for deployment. I didn't have to start over. I selected the eight doors and the trim strip above from the last Gmax and saved them as a separate Gmax model. Then I deleted the selected parts from the first model, saved the result, ran the correction on it and re-exported it.

After animating the door Gmax, I set the Lat, Long, and Heading in the XMLs to exactly the same values for both of the models, recompiled each, dropped the resulting BGLs in the Scenery folder and it put the parts back together in perfect alignment.

Thanks again for all of your help. This project would not have been completed without it.

Mike
 
Back
Top