News:

Status: CAVOK

Main Menu

P3D v4.1 and Plan-G 3.2.0.144 on a network PC

Started by HR2, October 18, 2017, 03:57:13 PM

Previous topic - Next topic

HR2

I am a programmer and a real life pilot.
I do know how hard is to build a program like Plan-G and also maintain it through all the changes of the flight sims.

So first a big "Thank you Tim!", your work is much appreciated. I am ready to donate once this problem is cleared:

Plan-G 3.2.0.144 on a network PC does not connect, this is the error in the log:

10:44:04.6 Initiating SimConnect P3D connection.
10:44:04.6 SetFSConnected: System.IO.FileNotFoundException: Could not load file or assembly 'LockheedMartin.Prepar3D.SimConnect.dll' or one of its dependencies. The specified module could not be found.
File name: 'LockheedMartin.Prepar3D.SimConnect.dll'
   at Plan_G3.Model.lm_SimConnect.Connect(IntPtr myWindow)
   at Plan_G3.ViewModel.MainViewModel.SetFSConnected(Boolean value)

I have checked and the LockheedMartin.Prepar3D.SimConnect.dll file is in the Plan-G program folder.
Also removed and reinstalled Plan-G.
The client PC is Windows 7 x64.

Plan-G works well on the P3D machine but I need it on a network computer.

tim arnot

Is this P3Dv3 or v4?

Do you have a sim connect.cfg file in the Plan-G program folder on the client PC? (it can almost certainly be the same as the one on your P3D pc). If you don't have one, there are some examples in the manual.

There's nothing inherently problematic about your setup - it's exactly the same as I use here, so we should be able to get it working. :)

Tim. @TimArnot

HR2

Thank you Tim for your quick response!

The server runs P3D 4.1 and I can connect to it in FSX mode, network client Plan-G works fine except when I click on any action button in the radios: crashes instantly.
So I thought that those commands from the client to the server may require P3D mode.

Yes, I have this simconnect.cfg in the program's folder on the client PC:

[SimConnect]
Protocol=IPv4
Address=10.11.12.21
Port=4444
MaxReceiveSize=4096
DisableNagle=0

To me this is a problem with loading the LockheedMartin.Prepar3D.SimConnect.dll.
I have checked the DLL and it is x86 as it should be (must match the Plan-G.exe).

I have even installed the P3D v4 SDK on the client, in the event that some dependent DLLs may be required. Did not help.

tim arnot

Ok, so now we check possible blocking by antivirus software, and permissions (run as Administrator)

Tim. @TimArnot

HR2

I have checked those.

Also I have checked that the DLL LockheedMartin.Prepar3D.SimConnect.dll is loaded when Plan-G is connected in FSX mode.
So the program loads it at startup, even if it is not needed.
But when I click for example the GPS button in the radios the program crashes, this is the XML built by Windows Error Reporting:

<?xml version="1.0" encoding="UTF-16"?>
<WERReportMetadata>
   <OSVersionInformation>
      <WindowsNTVersion>6.1</WindowsNTVersion>
      <Build>7601 Service Pack 1</Build>
      <Product>(0x3): Windows 7 Home Premium</Product>
      <Edition>HomePremium</Edition>
      <BuildString>7601.23572.amd64fre.win7sp1_ldr.161011-0600</BuildString>
      <Revision>1130</Revision>
      <Flavor>Multiprocessor Free</Flavor>
      <Architecture>X64</Architecture>
      <LCID>1033</LCID>
   </OSVersionInformation>
   <ProblemSignatures>
      <EventType>CLR20r3</EventType>
      <Parameter0>Plan-G3.exe</Parameter0>
      <Parameter1>3.2.0.144</Parameter1>
      <Parameter2>59db80b6</Parameter2>
      <Parameter3>Plan-G3</Parameter3>
      <Parameter4>3.2.0.144</Parameter4>
      <Parameter5>59db80b6</Parameter5>
      <Parameter6>d10</Parameter6>
      <Parameter7>0</Parameter7>
      <Parameter8>System.IO.FileNotFoundException</Parameter8>
   </ProblemSignatures>
   <DynamicSignatures>
      <Parameter1>6.1.7601.2.1.0.768.3</Parameter1>
      <Parameter2>4105</Parameter2>
      <Parameter22>0a9e</Parameter22>
      <Parameter23>0a9e372d3b4ad19135b953a78882e789</Parameter23>
      <Parameter24>0a9e</Parameter24>
      <Parameter25>0a9e372d3b4ad19135b953a78882e789</Parameter25>
   </DynamicSignatures>
   <SystemInformation>
      <MID>0CFF4BA9-702D-4502-B907-C5CA063BCD8E</MID>
      <MarkerFile>1025_ACER_ACER_AR3610</MarkerFile>
      <SystemManufacturer>Acer</SystemManufacturer>
      <SystemProductName>Aspire R3610</SystemProductName>
      <BIOSVersion>P01-A4</BIOSVersion>
   </SystemInformation>
</WERReportMetadata>

This is quite a big mystery.
At this point I start to believe that there is something wrong with my computer's software.
It may be missing some C++ runtime or something similar that is required.
I would appreciate if you point me to any prerequisite package that has to be installed.

I have even tried the latest LockheedMartin.Prepar3D.SimConnect.dll that comes with P3D SDK v4 but that is x64 so it does not work.
Would it be reasonable to build Plan-G.exe as x64? I know it is not that easy as it sounds.
In that way we can use the latest P3D SimConnect.

tim arnot

The 4.0 simconnect library should still connect to 4.1. But it doesn't sound like it's getting that far. An x.64 build wouldn't make a difference here, since the library works with both 32 and 64 bit apps. (the fact that it shows as loaded confirms this).

The main dependency -- and it's Simconnect that requires it -- is DotNet 4.6.2. You can download it from http://www.microsoft.com/Net/Download.aspx  The installer should check that what you have is up to date. The File Not found error could apply to one of its dependencies rather than the Simconnect dll itself.

Tim. @TimArnot

HR2

I have installed .NET 4.6.2 before installing Plan-G.

The LockheedMartin.Prepar3D.SimConnect.dll must be x86 to work with the current x86 Plan-G.
Lockheed Martin has switched to x64 in the SDK v4 and that DLL definitely does not work with the x86 Plan-G, try it.

Yes, I agree, my computer seems to be missing something that is required by LockheedMartin.Prepar3D.SimConnect.dll.
I have also used ngen to install the library, hoping that it is going to complain about missing dependencies but it didn't, it just installed it.

Thank you for your time on this matter, let's leave it. Has to be something with my computer because nobody else is reporting problems with P3D mode over the network.