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

FS2004 Unhandled exception when trying to Export FS9 bgl

Key

Messages
31
Hi Don,

When trying to export my TDF for FS9, TS Pro throws an Unhandled exception. The popup window mentions "The path is not of a legal form." and the details are attached as a .txt file.
It occurs every time I try to export, usually as soon as I click the submenu item ('Export to FS9'). Sometimes I am able to select the destionation folder and file name after that, upon which the exception gets thrown when trying to save. Haven't been able to put my finger on what circumstances cause that difference. Even if I select Continue, no file gets written.

I'm running TS Pro v.2.1.04 on Win10 Pro-64, with .NET 4.5 through 4.8 installed, as far as I can determine on Win10. I have tried v.2.1.04(a) as well, with the same result.
If I try to export the same project for FSX, the CVX gets written without a problem, after a few message windows describing the proceedings.

As I have two separate installs of FS9 on this computer, I thought that might be a cause. The TS_Pro.ini has all the correct paths though, and the connection between TS Pro and FS9 works fine both ways.

Any ideas?
Many thanks for your continuous development and support for all your Stuff!

Erik
 

Attachments

  • Unhandled exception Export FS9 bgl.TXT
    5.4 KB · Views: 120

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Exception reporting is a Windows function. The Continue button is a standard feature of the Windows exception dialog - presumably for use when an exception is "non-fatal". Virtually any exception you receive in my apps will be fatal. (Non-fatal" exceptions are handled internally and transparently.) So, it's not surprising you were unable to continue successfully.

That the exception occurs immediately upon clicking the menu item (i.e., before TS Pro asks you to specify a destination file path localizes the problem to a few lines of code. But to identify the exact cause, I need your TSPro.ini file.

EDIT: If the files you are using or TSPro are on the C: drive, please ensure you are running as administrator.
 

Key

Messages
31
Thanks for getting back already and the clarifications so far. Unfortunately, I won't have access to the Win10 machine until Wednesday night (Central Euro Time) but I'll send you the .ini file then.

Of the files possibly involved, only FS9 itself is on the C: drive. TS Pro and the scenery library are on other drives. I did test running as administator nonetheless, but that made no difference. Neither did compatibility mode for Win7 or WinXP SP3 by the way (just for completeness).

I'll get back to you the day after tomorrow. Meanwhile, I will try and test the same on the old Win7 computer I have access to now.

Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Thanks for letting me know, Eric. I'll standby.

When you open TS Pro.ini, you'll notice it saves a number of paths - some of which could be weeks or months old. I suspect what has happened is that the particular path TS Pro is looking at is no longer valid.

What you might try, however - before sending me the file - is to open TSPro.ini with Notepad or some other text editor and see if you can spot any suspicious paths. If you do, simply delete that/those lines from the file and try again. But, be sure to save a copy of the .ini file first so that you can send me the original. You can even delete the entire file if necessary.

Don
 

Key

Messages
31
Well, to my surprise, I get the exact same error on a totally different machine, with FS9 on a different drive (not the system drive in this case). The commonality is the presence of two different FS9 installs though, of which TS Pro does find the correct active one. I could try swapping that setting in the registry.

I did some testing with various folders and correcting or deleting the .ini file. I checked all the paths in the .ini files for various situations. Two anomalies I did note, neither of which seemed to cause the problem though:
- At some point, a default FS9 file I had used for background (E:\FS1963\Scenery\Eurw\Scenery\AB949160.bgl) was written as the Last Path to Save Flatten (TDF). Deleting that path from the .ini file made no difference, i.e. the path was not correct but after removing it I still got the exception thrown.
- I noticed, on both the Win10 and Win7 computers, that my FSX SDK had a subfolder 'SDK' which in turn contained the various Kit folders. TSPro did not pick up on that 'SDK' subfolder in the path (E:\FSutils\FSX SDK\SDK\) and so had as Path to FSX shp2vec=E:\FSutils\FSX SDK\Environment Kit\Terrain SDK\shp2vec.exe (in stead of E:\FSutils\FSX SDK\SDK\Environment Kit\Terrain SDK\shp2vec.exe).
I then moved the Kit folders of the SDK up one level, to be in E:\FSutils\FSX SDK, on both computers. The .ini file generated the same path to shp2vec.exe so it is now correct.

All the other paths were correct as well. Attached is the last version of the .ini file, a simple one after testing. Again the same exception gets thrown, for FS9 export only.

Finally, after the error, the display shows chaos in the triangles. Just in case that means anything, I attached two screen shots as well.


Erik
 

Attachments

  • TS_Pro.zip
    975 bytes · Views: 101
  • Before.jpg
    Before.jpg
    81 KB · Views: 104
  • After.jpg
    After.jpg
    111.3 KB · Views: 100

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Can't comment on the SDK paths beyond noting that these invalid paths may be the underlying cause of the firstexception. Easily fixed.

At the point in the program where the exception occurs, I doubt the presence of two FS9 installs is involved. In any case, the registry would only record one of them. So, for most intents and purposed, the other one doesn't exist.

Re After.jpg, what you see is not chaos, but organization. FS9 required that bgl files be broken up into QMV15 segments. The horizont5al and vertical lines in the .jpg are the result of TS Pro's partitioning.

Re the second exception shown in After.jpg, I encountered a similar error this morning while attempting to duplicate your reported exception. I have found and fixed the cause.

I will post and update to TS Pro shortly that should resolve both these issues.
 

Key

Messages
31
Re After.jpg, what you see is not chaos, but organization.
Well stated and pardon my ignorance, I had obviously been staring at it for too long. I didn't even notice it was a different exception...

However, the plot is thickening. I am noticing several things I did not expect. This is all with version 2.1.04(b) on the old Win7 machine.
  1. Any flattens, blend points and sculpt nodes I enter get written twice to the project file. I see it in the interface, and opening the .tsd file with a text editor confirms it. Makes no difference if I use the Hot cursor or not. I saw this on my Win10 machine as well and thought I did something wrong, but it happens every time. I can mostly delete the duplicate from within the program, otherwise with the text editor, and then work normally on the file.
  2. TS_Pro.ini keeps coming up with an invalid path for shp2vec.exe. It still stores it as described above, even after I moved that whole SDK to another disk volume and rebooted. If I keep the FSX SDK where TS Pro thinks it is, I can Export to FSX/P3D. If not, I get the message it's unable to compile due to an unfound file (which is no surprise then). Still a minor issue but I wonder where the .ini file gets that path.
  3. Only after launching TS Pro without an .ini file can I export to FS9. If there was an .ini file when I launched it, I get the 'path is not of a legal form' exception when trying the FS9 export.
  4. When I generate a flatten with all points at the same altitude, the value -9999 is often written with as altitude for several points after the initial one. This can be corrected within TS Pro, or more easily in the .tsd by text edit. Perhaps I am doing something wrong by starting a project with just a flatten?
  5. The tooltip always gives the altitude of nodes in meters, even when feet are selected as units under options. It then says 'nn Feet' but nn is the altitude in meters (which is what FS9 uses internally, AFAIK).
  6. When I have loaded some background, I need to uncheck Background Display under View for it to be visible.
Then, when I succeed in generating a .bgl for FS9, I either get weird results (like huge mountains) if it was only a flatten, or nothing shows in FS9 if it was a flatten with terrain blend around it. Tested in various rather different areas but again, I may doing something wrong there.

Hopefully you will be able to shed some light on these phenomena.

Thanks,
Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Hopefully you will be able to shed some light on these phenomena
. How about the development was never completed.

When TS Pro was introduced a couple years ago, nobody seemed interested in using it with FS9. So, full disclosure, I didn't devote any more effort to the FS9 aspects assuming, incorrectly it seems, that the VTP operations which had at least been tested were OK. (I suspected that some of the LWM functions may not work, but they would be the least used functions.).

I am surprised that shp2Vec is giving you difficulty, especially since it's included in TS Pro. I don't understand the connection to the SDK. As for the .ini file, since I could not duplicate your issue, I fixed what I thought might be the problem. I'll take another look at that.

Anyway, you should be able to do successfully what you are attempting. I'll have another "go" at it tomorrow.
 

Key

Messages
31
Hah, who would have thought I am one of the few using this utility for FS9... All the more thanks for supporting this niche user (group ?) and the feedback so far.
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I have attached an update that will correct the exception on export attempt TS Pro was attempting to load a FSX file which didn't exist, rather than the FS9 equivalent that did.

As I noted in my initial reply above, exceptions generated in my apps are generally fatal. They will only happen when an unexpected error occurs and, when they do, it's most unlikely you can successfully continue - even if it seems you can. So, that may be the cause of several of the issues you noted above.

That being said, re Issue:
  1. i.e., duplicate features - I can duplicate and will address
  2. Why are you concerned about shp2vec. It's not used for FS9. TS Pro generates those paths based on the system registry. You noted you recently moved the SDK. Did you first uninstall it and then re-install. Or did you simple move the files. If the latter, then that's the source of your difficulty.
  3. Should no longer be necessary
  4. I am unable to duplicate. Please check whether or not it is still happening after you install the update. If so, please tell me step-by-step what you did to make this happen.
  5. Unable to duplicate. Perhaps a side effect of continuing after the exception.
  6. There is some sort of issue with the status of the checkmark. I'll investigate
 

Attachments

  • TS Pro_2.1.04(c)_exe.zip
    438.6 KB · Views: 107

Key

Messages
31
That was fast again :)
Thanks for this version, it solves the export problem indeed. I do note I was unclear about continuing after an exception. I just tried that one or two times to make sure no file was written, but other than that I always quit after an exception.
  1. OK, standing by.
  2. Not so much concerned but merely surprised. The funny thing is when I check the registry the search comes up with just one instance of Shp2Vec.exe and that gives the longer path, with extra 'SDK' folder, on this machine - the version not found for/by the .ini file. But enough on that, easily worked around if need be and not even used by me at the moment.
  3. Solved!
  4. Have not really checked yet. I just did a few clicks in a test file. One node that I inserted manually into a loaded profile was given an altitude of -32768.0 Ft (or similar, apparently a limit value anyway), despite me leaving the default value of 0.00 in. Other nodes went OK and I did not note my exact steps and could not replicate it so far, either.
  5. Same here, not even if I go back to the (b) version. Must have been a quirk of this pc. Solved!
  6. Standing by.
  7. Let's add this to the list: although I can now export to FS9 without a problem, the generated file does not seem to alter my FS9 terrain. The size is always 1 kB, even for the ts_FS9 example (which is a very handy reference by the way, together with the manual). I have attached the resulting output so you can test or analyse it.
 

Attachments

  • ts_FS9_TDF.bgl
    312 bytes · Views: 91

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
1. Found and Fixed

2. TS Pro "manufactures" that path based on the registry location of the SDK. TS Pro assumes it will find shp2Vec where Microsoft/LM has placed it

4. -9999 indicates the elevation has not been entered. When you start a flatten, several options are available to you - one of which would generate this result.

6. Found and fixed

7. I'm working on this now.

I'll make a new update ASAP.
 
  • Like
Reactions: Key

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Unfortunately, there's a serious problem with the FS9 compiler in TS Pro. I will fix it, but it will take some time.

I've attached the final release of Terrain Sculptor, TS Pro's predecessor. It's a couple years old, but perhaps will be adequate until I get TS Pro working properly. TS will not read data prepared for TS Pro, so you'll have to re-enter the flatten. But, once TS Pro is fixed, it should read data from TS.

If all else fails, you can use sBuilder. It's a "pain" compared to TS Pro, but it served me well for years.
 

Attachments

  • TS1209.zip
    2 MB · Views: 107

Key

Messages
31
Thanks Don, that is very considerate. I'll see how far I can get with TS 1.2.09 for now. It shows well how much you have refined things in the Pro version, btw!
I am familiar with SBuilder and have been doing my 'grunt work' mostly in Lui's tool. I did some experimenting with TS a few years back but that did not really lift off, so to say. Actually I think SBuilder and TS (Pro) are a great combination so I look forward to using TS Pro to its full potential later on.

Erik
 

Key

Messages
31
Just for info, I'm running into some of the same issues with the final version of Terrain Sculptor as I did with TS Pro. That's probably logical, if TS Pro was partly based on its predecessor. It's also probably te reason I did not get to doing anything substantial with it a few years back, and possibly even why there was so little interest from FS9 users? It can be a bit confusing to see what is not working or why, so I can imagine users giving up for that reason.
I am, of course, happy to wait and see what you can come up with in TS Pro, Don. Do not feel rushed or obliged, of course.
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Version 2.1.04(d) attached. I have found and fixed several errors in the FS9 compiler. It does a reasonable job with one of my own airports (CYYJ) where the .tsd file is much more complex than yours. I say "reasonable", because the handling of closely spaced terrain points in FS9 leaves a lot to be desired. Very often, if two points are close together, you'll get a peaked mound the height of which bears no relationship to the elevation of the points concerned. You can help somewhat by "fiddling" with the terrain options (Options menu) and other terrain parameters in the FS9.cfg file. But, generally, the only effective solution is to separate the points of concern with TS Pro.

I'm running into some of the same issues with the final version of Terrain Sculptor as I did with TS Pro
I presume you don't mean compiler exceptions since that compiler is fine. If you mean the results on the FS9 display, there's little I can do about that other than as noted above.

Please give the attached a try and let me know how you make out.
 

Attachments

  • TS Pro 2104(d).zip
    3.5 MB · Views: 94

Key

Messages
31
Ah splendid, I will test that version when I have time today. And doing some tweaking of certain points seems much more attractive than doing everything manually in SBuilder. It will still be a huge step forward.
I presume you don't mean compiler exceptions since that compiler is fine. If you mean the results on the FS9 display, there's little I can do about that other than as noted above.
To my surprise, I got the 'path not of a legal form' exception upon export with TS as well at some point, and it would also go away when I restarted without an .ini file. Additionally, I got similar effects in FS as with the previous TS Pro compiler: no terrain effects or extreme peaks and pits, depending on the presence of blending. I could retest just to make sure I'm not mixing/messing up things myself there. On the other hand, if TS Pro does what it's supposed to do now that would be rather redunant of course.

Will report back here!
Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I got the 'path not of a legal form' exception upon export with TS as well at some point,
I've just checked. Terrain Sculptor does contain the same coding error. It checks if there's a "last path" for FS9 and if so, attempts to load using the FSX path from the .ini file which, if blank (which it is in your case), triggers an exception. By deleting the .ini file, you are essentially blanking the FS9 "last path", which prevents the exception.

I trust the new TS Pro will serve you better than the last version.
 
Top