News:

Status: CAVOK

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PilotWim

#1
Thanks for the new version.
I can confirm that the Windows-1252 encoding problem is solved. The log file also shows the name of the xml file.

However, I found another problem in the log file: when a scenery path has a comma in the name as in "C:\FlightSimulator\Lockheed Martin\MyScenery\LICC - Catania, Sicily", that comma is replaced by "," and then it gets a DirectoryNotFoundException:
18:49:50.0 Scanning folder C:\FlightSimulator\Lockheed Martin\MyScenery\LICC - Catania, Sicily
18:49:50.0 Directory error: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\FlightSimulator\Lockheed Martin\MyScenery\LICC - Catania, Sicily\Scenery'.
  at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
  at System.IO.Enumeration.FileSystemEnumerator`1.Init()
  at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
  at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
  at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
  at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
  at Plan_G.Model.BGLSCAN.Scan() in C:\Users\Tim\source\repos\Plan-G\Model\BGLScan.cs:line 235

Quote from: tim arnot on July 15, 2022, 12:44:11 PM* The Build P3Dv5 button on the Build dialog is active if either a path for P3dv5 has been specified in Build Options or one of the P3dv5 registry locations is set (either AppPath or SetupPath)
I'm afraid that's not the case.
I installed a new W10 Pro 21H2 Virtual Machine and downloaded Plan-G v4.0.1.262 into it. I started the program and clicked "Build Navigation Database" on the the Data tab. The dialog box shows enabled check boxes for "Build P3D Database" as wel as "Build P3D v5 Database"! Then I clicked "Settings..." and saw that every entry was empty, except for the "Plan-G Files Folder".
#2
With our little online flight group, we do a weekly flight. We start where we landed last week and after landing, we decide on the destination airport for the next week. Some members look for (and test) freeware sceneries for the next destination. More often than not they find a good one and share it with us. That's why I install new scenery almost weekly and need to rebuild the database.

2. All the locations in the Build Options are empty. In the registry I found P3D entries in HKCU and HKLM:
[HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v3]
"AppPath"="C:\\FlightSimulator\\Lockheed Martin\\Prepar3D v3\\"
"SimConnect_Port_IPv6"="0"
"SimConnect_Port_IPv4"="0"
"Installed"=dword:00000001

[HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v3 SDK]
"InstalledProgramMenuSubDir"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Lockheed Martin\Prepar3D v3]
"License"="Academic"
"SetupPath"="C:\\FlightSimulator\\Lockheed Martin\\Prepar3D v3\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Lockheed Martin\Prepar3D v3 Content]
"SetupPath"="C:\\FlightSimulator\\Lockheed Martin\\Prepar3D v3\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Lockheed Martin\Prepar3D v3 Scenery]
"SetupPath"="C:\\FlightSimulator\\Lockheed Martin\\Prepar3D v3\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Lockheed Martin\Prepar3D v3 SDK]
"SetupPath"="C:\\FlightSimulator\\Lockheed Martin\\Prepar3D v3 SDK 3.3.5.17625\\"
What is Plan-G exactly checking in the registry or in config files?

3. I just tried to rebuild and this is from the log file:
22:37:23.2 Building database for P3D
22:37:23.2 FS directory is: C:\FlightSimulator\Lockheed Martin\Prepar3D v3\
22:37:23.2 P3v3D cfg path: C:\ProgramData\Lockheed Martin\Prepar3D v3\Scenery.cfg
22:37:23.2 Processing P3D XML addons
22:37:23.3 StartBuild_Executed: System.Xml.XmlException: System does not support 'Windows-1252' encoding. Line 1, position 31.
 ---> System.ArgumentException: 'Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
   at System.Text.EncodingTable.InternalGetCodePageFromName(String name)
   at System.Text.EncodingTable.GetCodePageFromName(String name)
   at System.Text.Encoding.GetEncoding(String name)
   at System.Xml.XmlTextReaderImpl.CheckEncoding(String newEncodingName)
   --- End of inner exception stack trace ---
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args, Exception innerException)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg, Exception innerException)
   at System.Xml.XmlTextReaderImpl.CheckEncoding(String newEncodingName)
   at System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(Boolean isTextDecl)
   at System.Xml.XmlTextReaderImpl.Read()
   at Plan_G.Model.BGLSCAN.Scan() in C:\Users\Tim\source\repos\Plan-G\Model\BGLScan.cs:line 208
   at Plan_G.ViewModel.BuildDatabaseViewModel.StartBuild_Executed() in C:\Users\Tim\source\repos\Plan-G\ViewModel\BuildDatabaseViewModel.cs:line 143
22:37:25.2 Build-DB cleanup lambda
22:37:25.4 NdbsInBounds 1
22:37:25.4 VorsInBounds 3
22:37:25.4 AirportsInBounds 4
22:37:25.6 AirspaceInBounds N:39,44 S:38,67 W:21,94 E:24,14  10
22:37:28.5 Cleanup
It only says "Processing P3D XML addons"
but maybe "Processing P3D XML addons: C:\ProgramData\Lockheed Martin\Prepar3D v3\scenery_add-ons.xml"
would be more informative?
Thanks for considering to add the log file location to the error message.

Regards,
-=Wim=-
#3
Hello,

I installed v4.0.0.259 (next to v3) but when trying to build the database, I received the above error.

I searched the forum and this topic recommends to edit "C:\ProgramData\Lockheed Martin\Prepar3D v3\scenery_add-ons.xml" and replace the first line <?xml version="1.0" encoding="Windows-1252"?> with <?xml version="1.0" encoding="UTF-8"?> as a workaround. This indeed allowed me to build the database.

However, every time P3D launches, the scenery_add-ons.xml file is re-created when scenery changes have happened, and P3Dv3.4 insists on using "Windows-1252". I use Lorby-SI's excellent P3D Addon Organiser to manage my sceneries, but even if you manage the addons from within P3D (Options, Add-ons), P3D needs to restart and hence re-creates the xml with the "wrong" encoding.

I can't imagine having to modify the xml after each scenery modification, just to be able to build the database.

Regards,
-=Wim=-

PS 1: In the "Build Navigation Database" window the option "Build P3D v5 Database" is enabled but I don't have P3Dv5. Why does Plan-G think that v5 is installed?
PS 2: The "Build Database" error message gives a line and position where the error occurred and points you to the log file for more details. Would it be possible to also show the name of the file that caused the error? It doesn't appear in the log file either. Also, pointing to the log file is good, but showing the actual path of the logfile would be really helpful :-)
#4
Plan-G / Re: P3D scenery_add-ons.xml method
November 04, 2020, 03:21:32 PM
Thanks for the quick reply. I'm already looking forward to the next update!

Regards,
-=Wim=-
#5
Plan-G / Re: P3D scenery_add-ons.xml method
November 04, 2020, 01:33:49 PM
Hello,

Yes, absolutely sure it's P3Dv3.4 (see attachment).

The add-on.xml functionality definitely came with P3Dv3. See http://www.prepar3d.com/SDKv3/LearningCenter/LearningCenter.php (or directly http://www.prepar3d.com/SDKv3/LearningCenter/add-ons/add-ons_overview.html).

I couldn't find the line "processing P3D XML addons" in the log file.
I did however find this line: "OS is Microsoft Windows NT 6.2.9200.0", which seems very strange to me because I have Windows 10:

PS C:\> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19041  0


PS C:\> (Get-WmiObject -class Win32_OperatingSystem).Caption
Microsoft Windows 10 Pro
PS C:\>


Regards,
-=Wim=-
#6
Plan-G / P3D scenery_add-ons.xml method
November 03, 2020, 10:59:24 PM
Hello,

I'm using P3Dv3.4 and PlanGv3 (v 3.2.2.167).
When building the P3D database, I noticed that it has processed only the sceneries that were present in scenery.cfg.

I do have a "C:\ProgramData\Lockheed Martin\Prepar3D v3\scenery_add-ons.xml" containing a few <AddOn.SceneryComponent> tags and <Path>s, but their navaids don't appear in PlanG. In P3D however, they do.
If I manually add the path to the "Additional Scenery Locations" and rebuild the database, the navaids do appear in PlanG.

The manual that's included with PlanG describes an older version that didn't have support for the scenery_add-ons.xml method yet.
So how is this "P3D scenery_add-ons.xml method" supposed to work? Manually adding every location seems to defeat the purpose of the xml.

Maybe I'm overlooking something. What can I do to troubleshoot?

Regards,
-=Wim=-