News:

Plan-G has over 1700 followers on FACEBOOK! Click HERE and add your support

Main Menu

Plan-G alpha v4 228 does not connect to the FS2020

Started by rollerfahrer, September 26, 2020, 01:32:46 PM

Previous topic - Next topic

rollerfahrer

Hello Tim Arnot, first congratulations and thanks for your work at Plan-G, which works with my FSX over many years very fine.
Now I had jumped to the MSFS2020 and found your Plan-G alpha v4 xxx. My first installation (v4 221 64 bit) had worked fine directly I had installed it. Now I had seen the new version v 228. After downloading this, I deleted the v 221 completely from C:\Program Files and I copied the v 228 (32 bit) to C:\Program Files (x86) and also installed NET Core 3.1 Runtime 32 bit and generated the new FS2020-databank. Plan G runs, but it does not connect to the flightsim. Okay, I had read about the SimConnect.dll and copied this from your download to the Plan-G-folder. Now PC reboot. Plan G runs, but it does not connect to the flightsim . Now I set the path to the FightSim-exe in the Plan-G-Options to FSX Prog.". Plan G runs, but it does not connect to the flightsim. I had not found any other helpfull idea in the Forum. What is wrong with my installation? I hope you can help me to find a solution of my problem.

tim arnot

228 comes with the correct dll already installed. If you copied the MSFS SDK one over the top, that definitely won't work (cos it's 64bit).

All you need to do is unzip the download to the folder of your choice, run it and connect. Do not change anything, do not copy anything else. If it still does not connect, come back here and attach the log file, and we'll find out why.

Tim. @TimArnot

rollerfahrer

#2
I have now cleard and next pur copied the v4 228, no lock to the Sim. How to send you the logfile? e last entry was this:

17:32:40.0 Starting Plan-Gv4 build 4.0.0.228
17:32:40.0 OS is Microsoft Windows NT 6.2.9200.0
17:32:40.0 Plan-G Files folder is: C:\Users\diete\Documents\Plan-G Files
17:32:40.7 Map tiles cache: C:\Users\diete\AppData\Local\GMap.NET\
17:32:40.7 Map provider: OpenStreetMap © OpenStreetMap contributors, CC-BY-SA.
17:32:40.7 Map cache mode: ServerAndCache
17:32:41.0 Program in: C:\Program Files (x86)\Plan-G v4
17:32:41.0 Data in: C:\Users\diete\Documents\Plan-G Files
17:32:41.1 Starting timer
17:32:41.1 DownloadCurrentMetars thread started
17:32:41.1 Metar14Z.TXT started
17:32:41.1 Metar15Z.TXT started
17:32:43.6 Stopping timer
17:32:43.6 StartMap
17:32:44.1 Metar15Z.TXT done
17:32:44.9 Metar14Z.TXT done
17:32:44.9 DownloadCurrentMetars done
17:32:45.2 NdbsInBounds 8
17:32:45.3 VorsInBounds 11
17:32:45.6 AirportsInBounds 72
17:32:45.7 ProcessMetars done
17:32:46.0 AirspaceInBounds 199
17:32:46.1 NdbsInBounds 8
17:32:46.1 VorsInBounds 11
17:32:46.2 AirportsInBounds 72
17:32:46.2 AirspaceInBounds 199
17:33:45.2 OpenFlightPlan_Executed: Plan_G
17:33:45.3 OpenFlightPlan 1
17:33:45.3 Dialog created
17:33:45.3 Filter = Flugplandatei (*.plg *.pln *.fms)|*.plg;*.pln;*.fms|Plan-G Flugplandatei (*.plg)|*.plg|FS2020 / P3D / FSX / FS9 Flugplandateien (*.pln)|*.pln|X-Plane FMS Flugpläne (*.fms)|*.fms|V3 Flugpfad Dateien  (*.IGC)|*.IGC|V2 Flugpfad Dateien (*.txt)|*.txt
17:33:45.3 fullpath = C:\Users\diete\Documents\Plan-G Files
17:33:45.3 path exists
17:33:45.3 Calling ShowDialog() C:\Users\diete\Documents\Plan-G Files
17:33:51.1 ShowDialog() returned false
17:39:57.1 Initiating SimConnect FSX connection.
17:39:57.3 SetFSConnected: System.BadImageFormatException: Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.61259.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
File name: 'Microsoft.FlightSimulator.SimConnect, Version=10.0.61259.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Plan_G.Model.SimConnect_FSX.Connect(IntPtr myWindow)
   at Plan_G.ViewModel.MainViewModel.SetFSConnected(Boolean value) in C:\Users\Tim\source\repos\Plan-G\ViewModel\MainViewModel.cs:line 5415


17:40:04.1 NdbsInBounds 8
17:40:04.1 VorsInBounds 11
17:40:04.1 AirportsInBounds 72
17:40:04.2 AirspaceInBounds 201
17:40:20.4 _Backstage_IsOpenChanged: True
17:47:41.1 DownloadCurrentMetars thread started
17:47:41.1 Metar14Z.TXT started
17:47:41.1 Metar15Z.TXT started
17:47:45.2 Metar15Z.TXT done
17:47:46.7 Metar14Z.TXT done
17:47:46.7 DownloadCurrentMetars done
17:47:47.8 ProcessMetars done
17:49:29.5 _Backstage_IsOpenChanged: False
17:52:06.1 Cleanup

tim arnot

Hmm, 228 was supposed to specifically stop that error, and for most people, it has. Why you should still get it, I don't know. It needs more investigation. :(

Tim. @TimArnot

tim arnot

Going to suggest you try installing Simconnect the old fashioned way. This link http://www.fspassengers.com/?action=simconnect will take you to a download page. There will be three Simconnect msi files, you should install all three.

Tim. @TimArnot

PeterFS

Unfortunately I had the same problem. Tried the same solutions. Can't get Plan-G to establish contact with MSFS2020. Tim is doing a good job, I love this program and will wait for the next build.

PeterFS

I lost all my connections, even from the previous alpha builds.
Is it possible you have to install version 3.x before v4 to work?

tim arnot

No, v3 uses a completely different method. I switched because this way was supposed to be more reliable. Oh the irony!

(it was working until my experiments with 64-bit, but even rolling back the project files doesn't fix it for some people)

Tim. @TimArnot

rollerfahrer

I am so sory. Yesterday I had installed the new V4 231. It did not connect like the like the v228. The tree var. of simconnect are installed. Only the v4 221 64 bit works with MSFS2020 well. What happens? Kind regards, Dieter

tim arnot

No solution has been found, so nothing has changed. I've tried 3 different computers here, none of them can replicate the problem...

Tim. @TimArnot

geloxo

Hi. I have exactly the same problem. I tried 228 and also 231, today even with game v1.9.5. They don´t connect to sim. I also tried installing the Simconnect files.

Other apps like Little Nav Map and Pushback helper connect properly, so the simconnect interface works in my game. When they release the official FSUIPC I will try that connection method to check it.

Cheers

geloxo

#11
Ok, I did some tests I can confirm the same behaviour that rollerfahrer has reported: the 64bit version (build 221) works and any other version drops the same error on the log:

SetFSConnected: System.BadImageFormatException: Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.61259.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. An attempt was made to load a program with an incorrect format.
File name: 'Microsoft.FlightSimulator.SimConnect, Version=10.0.61259.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Plan_G.Model.SimConnect_FSX.Connect(IntPtr myWindow)
   at Plan_G.ViewModel.MainViewModel.SetFSConnected(Boolean value) in C:\Users\Tim\source\repos\Plan-G\ViewModel\MainViewModel.cs:line 3618


What changes from one version to the other is the line number in the error seen at the last line. Also notice that I don´t have such a directory at my computer (C:\Users\Tim\source\), and I guess only you will have it as it seems to be the one storing your source code.

On the other hand the simconnect.dll packaged with the different builds are clearly different, what could be the reason for the problem: the build 231 includes a 45kb file with version v10.0.61637.0 (which seems to be the native FS2020 version) and the build 221 includes a 57kb file with version not specified. As the build 221 is not dropping any error I presume that one is the one including the simconnect v10.0.61259.0 (the native FSX SP2 one) that is called by your application according to the error in the log.

I hope this helps.

Cheers

tim arnot

The problem is, why does the FSX SP2 Simconnect fail to load on SOME computers but not on others. If I could make it fail, it would be a lot easier to solve the problem!!

Build 221 was 64-bit, and used the MSFS Simconnect. But that also fails to load on some computers. There is overlap between those that can't run 64 bit and those that can't run 32 bit, but it's not 100%. nor is it 0%.

There is also no consistency between failures on the main sim PC and failures on a networked PC.
On a networked PC, if the FSX simconnect fails, P3D Simconnect often works. but this is not true for a single-PC system.

You can't use the MSFS (64bit) simconnect in a 32bit app.

Tim. @TimArnot

geloxo

What I can share about the failures on different computers is what I saw on mine, in case it helps: I installed FS2020 for the first time with patch 1.8.3, so quite recently indeed. At that point I had my P3D5 setup also installed, including all simconnects required by P3D (FSX to FSX SP2) and the P3D5 SKD. Then I installed build 228 and it worked. This is important as at that time I had the two games installed and all versions of simconnect too.

Last weekend I did a fresh install, formatting, new windows 10 setup and only installed FS2020, no P3D stuff nor other tools. Just windows, FS2020 and your tool. I didn´t install the FS2020 SDK either. Then build 228 does not work. I tried installing the old simconnects as you recommended also to some users but as they didn´t solve the issue I removed them. Now, with this conditions, only the 64bit version works (I had to install the x64 .NET obviously). I don´t have any other simconnects than the one that comes with FS2020 and the one you packaged in your builds in my system. I don´t have your source code files installed either, in case the code is accidentally loading anything from your existing directories and you missed to remove that from the code, so you could consider my PC quite free from any other sources of errors.

In this situation the only variable that changed is the simconnect.dll that was different from one build to the other, and it also appears on the error log as failing to load, so that line or any other instances where you try to load the dll are the key.

Cheers

tim arnot

Thanks, that's a very useful piece of information.

The source file and line number in the error messages is just diagnostic information. It comes from the .pdb file, a database whose purpose is to provide just that information for error messages. The actual source code isn't involved.

Tim. @TimArnot