News:

Thou shalt confirm thine airspeed on final, lest the earth rise up and smite thee. (pre-landing checklist, v1)

Main Menu

Failed to Build Database - EntryPointNotFoundException - P3D 4.2 - Possible Fix

Started by franco-1-1, February 24, 2018, 01:04:22 PM

Previous topic - Next topic

franco-1-1

Hello,

The build of the P3D database would fail on my system with the error dialog "Failed to build database (The type initializer for 'ExtentPlaceholderCreator' threw an exception.) See log file for more details."

The Plan-G_Log.txt log file showed the following repeating exceptions:

    3:17:44.2 Route: System.TypeInitializationException: The type initializer for 'ExtentPlaceholderCreator' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target   
    of an invocation. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'SetClrFeatureSwitchMap' in DLL 'SqlServerSpatial110.dll'.
       at Microsoft.SqlServer.Types.GLNativeMethods.SetClrFeatureSwitchMap(Int32 clrFeatureSwitchMap)
       at Microsoft.SqlServer.Types.SqlGeometry.IsValidExpensive()
       at Microsoft.SqlServer.Types.SqlGeometry.Construct(GeoData g, Int32 srid)
       at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid)
       at Microsoft.SqlServer.Types.SqlGeometry.STGeomFromText(SqlChars geometryTaggedText, Int32 srid)
       at Microsoft.SqlServer.Types.SqlGeometry.Parse(SqlString s)
       --- End of inner exception stack trace ---

I am not sure if PLan-G only uses the version of SqlServerSpatial110.dll that is included with the program and updated SQL Server Express 2012 to SP4 which did not help. After some searching on the Internet it appeared that this error is related to a known issue with SQL Server 2012 / the SqlServerSpatial110.dll. A workaround was suggested and I added the following assembly redirection to the assemblyBinding element in the Plan-G3.exe.config file (Default path: C:\Program Files (x86)\Plan-G v3.2.0\Plan-G3.exe.config):

    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
      <bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />
    </dependentAssembly>

After this change the database build completed without errors and i have not seen any other issues.
I am posting it here because i couldn't find any similar information on the the forum and it might help someone else.

System Specifications:
P3D 4.2.21.24048
Plan-G 3.2.0.144
Windows 10 Pro 64Bit - Build 16299.248
Microsoft SQL Server 2012 Express LocalDB (11.4.7001.0)


tim arnot


Tim. @TimArnot

GeorgL

Great, that works!

Thanks a  lot tim
Georg

next thing is g-plan for FlightGear :)