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

Unhandled Exception -- Type Initializer for Terrain_Sculptor threw an exception

Messages
272
Country
ca-saskatchewan
I am eager to learn Terrain Sculptor but I cannot get it to open properly. Every time the application is launched this error message appears in a dialogue box:

"System.TypeInitializationException: The type initializer for 'Terrain_Sculptor.Communications' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Terrain_Sculptor.Communications..cctor()"

I intend to use Terrain Sculptor with FS2004. It would appear that the application is looking for simConnect. I have a registered copy of the latest version of FSUIPC for FS2004. It would appear that the version of Terrain Sculptor I downloaded is 1.2.0.5, which was the latest version available on your website.

Obviously something is wrong or I missed a step along the way. Help would be appreciated. Thanks in advance.

Greg
 
Last edited:

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Terrain Sculptor only looks for SimConnect when it can't communicate via FSUIPC. Is FSUIPCClient.dll (included in the TS archive) in your Terrain Sculptor folders? Are you sure you have installed the new version of FSUIPC properly?

I notice Pete Dowsen's site advertises:
Full release of FSUIPC 4 (incorporating WideFS 7) for use with FSX, FSX-SE and Prepar3D November 8th 2016 (3.3 MB)
Note the absence of FS9/FS2004. Is this the version of FSUIPC you have installed?

I have no difficulty connecting to FS9 on my system, which uses FSUIPC.dll datestamped 2013-05-04. Have a look in your FS9\Modules folder to see which version of FSUIPC is installed there.

Don
 
Messages
272
Country
ca-saskatchewan
Don, as far as I know I have the latest version available for FS2004. I do not have FSUIPC 4 installed since it is for FSX. Here is a screen shot of the FSUIPC properties taken from my Modules folder in FS2004. Within FS2004 it shows that I have a registered copy of FSUIPC. I have no other issues utilizing FSUIPC as far as I know. The FSUIPC system log shows activity from yesterday, last time I had the sim open [359942 System time = 12/12/2016 22:13:00, FS2004 time = 12:06:03 (22:06Z)] Pete Dowsen's site shows that version 3.999z9 is the latest version for FS2004. Is this the "new" version you reference?


FSUIPC version.JPG


FSUIPCClient.dll is in the Terrain Sculptor folder.

In my setup, FS9 runs from a non-standard (default) location. Could that be a reason why the application cannot find FSUIPC?

Thanks for your speedy response.

Cheers,

Greg
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
On the surface, it would seem that FSUIPC 3.9.9.9 introduces an incompatibility with Paul Henty's FSUIPCClient.dll. Terrain Sculptor has no role in this. Either it can communicate with FSUIPC (using FSUIPCClient.dll) or it can't - the latter which would seem to be the case.

But, it's also possible that the problem is (otherwise) local to your system. Try reverting to the earlier version of FSUIPC. If that works, then we know it's an incompatibility (about which I can do nothing but advise users). If that doesn't work, then it would seem to be something else local to your system.

Don
 
Messages
272
Country
ca-saskatchewan
The earliest version I have on hand is 3.98 and it throws the same error. I put your application on my other sim computer, and ran FSUIPC 3.99, only to get the same error. I assume that should rule out something local to my system since the application is throwing the same error on two different set ups.

Greg
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I assume that should rule out something local to my system since the application is throwing the same error on two different set ups.
Not quite. Others, including me, are running Terrain Sculptor with FSUIPC Version 3.9.9.9 (Product version 3999z2) vintage 2013 without difficulty.

If FSUIPC (via FSUIPCClient) reports FS9 installed on your system, Terrain Sculptor will either connect to it (which it obviously isn't doing) or simply report that it's not running. TS will not even attempt to use Simconnect unless FSUIPC cannot communicate with any version of FlightSim. So, it appears for whatever reason, FSUIPC is not finding your FS9.


Terrain Scupltor 1.2.06 has been available for over two months. It uses a different version of SimConnect.dll. While I doubt it will make any difference, if you have any other version of FlightSim in addition to FS9, you might try loading it. But, please see the final post in the top thread in this forum first and ensure the proper version of Simconnect.dll is installed.

Don
 
Messages
272
Country
ca-saskatchewan
It appears to my uneducated eye that FSUIPC is installed properly and does run and reports as much in the log file. Attached are the various logs for you to see in case you can spot something I am missing.FSUIPC install log.JPG FSUIPC licence.JPG FSUIPC log.JPG
 
Messages
272
Country
ca-saskatchewan
On the surface, it would seem that FSUIPC 3.9.9.9 introduces an incompatibility with Paul Henty's FSUIPCClient.dll. Terrain Sculptor has no role in this. Either it can communicate with FSUIPC (using FSUIPCClient.dll) or it can't - the latter which would seem to be the case.
Don

Don, I see that Airport Design Editor 9 also uses FSUIPCClient.dll. I have no problems using ADE 9 with FSUIPC3.9. Perhaps this a clue?
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I note that the datestamp of FSUIPCClient in ADE is more recent than the version I am distributing. ( It may just be that is the data I installed it.) I routinely search for updates to my 3rd part software, but have never found one for FSUIPCClient.

Try copying that version and place the copy in your TS folder.

Don
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I didn't really expect there would be. But, it was worth a try.

Since no one else is reporting such difficulty and I can't reproduce it, I am left to conclude that, whatever the underlying issue, it is a problem within your systems' configurations. Perhaps you have some addon that is interfering.

DOn
 
Messages
272
Country
ca-saskatchewan
No doubt you are right. I think finding the culprit would be next to impossible so I will have to throw in the towel!

Thanks for your assistance Don.
 

Key

Messages
34
Country
netherlands
FYI, same problem on my laptop. TS cannot find FS9, resulting in the error message as quoted by gaputz. Acknowledging sends TS into a loop, every action brings back the error et cetera. Only way to exit I have then is to kill the process in Task Manager.

ADE and SBuilder have no problem finding FS9, and I tried the above suggestions of course. No idea yet what causes this, don't have the problem on my main pc where it all works fine. Both run Win7-SP1 64 Pro, pc has way more add-ons than laptop. I checked the laptop registry, path is there:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Flight Simulator\9.0]
"MP9Check"="3"
"Zone"="http://zone.msn.com/asp/fs04redir.asp"
"Version"="9.0"
"Launched"="1"
"PID"="69768-442-7842984-61753"
"DigitalProductID"=hex:
"EXE Path"="C:\\FS9\\"
"CDPath"="D:\\"
"VersionType"="RetailVersion"
"InstalledGroup"="5"
"LangID"=dword:00000009

FS_Registry_Repair reports the key without the 'Wow6432Node' by the way, but from what I understand that is what 32 bit programs (are supposed to) read on 64 bit systems.

Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Terrain Sculptor does not attempt to look for FS9 - nor, to my knowledge does ADE or sBuilder. To the extent the latter applications communicate with FS9, I believe they do so through FSUIPC.

So, perhaps you could provide a little more detail as to what problem you are experiencing.

Don
 

Key

Messages
34
Country
netherlands
Don, certainly. I have version 1.2.06.

When I launch Terrain Sculptor on my laptop I get this message:


The full details are in the attached file.

Clicking Continue or Quit or closing the window makes no difference, this always brings me to the TS window. That almost looks like it should upon launch, except there is no window title, the Poly/Exclude Type selection is empty and the Cursurs Pos'n reads Infinity for both lat and long. Using a control brings up the error message again, and so on. Menu items except Help can be selected but that leads either to the same loop again, or a TS stopped working message, after a few clicks at most. The Help menu works in this situation.

From what I now hopefully understand the exception is likely caused because TS can't communicate via FSUIPC. However, SBuilder and ADE can on the same laptop. I have FSUIPCClient.dll version 2.4.4910.2 in the TS folder. I tried the version ADE uses just to be sure, to no avail.

As said, on my main pc I it all works fine so luckily I am able to work with Terrain Sculptor. Just thought it might be useful info that someone else is experiencing what seems the same problem as described by gaputz.

Edit: just tried Slew Master as a test on the same laptop -> same exception gets thrown, similar 'results' thereafter as with TS.

Erik
 

Attachments

  • details.txt
    4.6 KB · Views: 544
Last edited:

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
I understand what is happening, and why. But, at the moment, it's not clear what I can do about it.

Following is the sequence of events (assuming FS9 is running);
  • TS opens communications with FSUIPC.
  • FSUIPC normally returns a code indicating the active Flightsim is FS9 (code = 7), TS displays a title indicating that FS9 is active and life goes on.
  • But, in this case, FSUIPC raises an exception instead.
  • TS then asks Windows to enumerate the open windows and report their titles (to determine the active Flightsim).
  • If Windows returns the normal title of the FS9 window, TS reports that it can't communicate with FSUIPC an life goes on.
  • But, it seems the window title is not the normal FS9 title, so TS attempts to start Simconnect - which doesn't exist on your system and so causes the unhandled exception you are experiencing.
So, it appears the underlying cause of the difficulty is that FSUIPC is not initially reporting code 7 for FS9.

It';s no surprise that SlewMaster acts the same way; both use the same routine.

I will communicate with Jon Masterson to see how he initiates communications with FSUIPC in ADE. Obviously, he uses a different sequence than TS.

Don
 

Key

Messages
34
Country
netherlands
Thanks for your time and the explanation, Don. If there is anything specific you'd like me to check just say so.

Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Erik, I've modified the FSUIPC code hopefully to avoid the problematic exception. Please give the attached file a try.

Don
 

Attachments

  • Terrain Sculptor 1.2.06(a).zip
    127.9 KB · Views: 211

Key

Messages
34
Country
netherlands
Unfortunately that one gives the same problem, Don. However I notice the .exe says it's version 1.2.0.5. Is it the file you meant to send?

Erik
 

gadgets

Resource contributor
Messages
9,388
Country
ca-britishcolumbia
Eric, so long as the title bar reports 1.2.06(a), it's the file I intended.

I'll send you another file later today or tomorrow that will report some additional diagnostic information.

Don
 
Top