Hi,
I also got the TargetInvocationException in Multi-Threaded mode. I have lots of data in PostgreSQL database, I wanted to retrieve a subset of it to create a postgreFeatureLayer, after a while, no response, I retrieved again, then I got the error, following is the stacktrace:
System.Reflection.TargetInvocationException was unhandled
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at ThinkGeo.MapSuite.Core.Proj4Projection.x95c4ca6342aad2f1(IntPtr xce536087faba9488, IntPtr x6d3e0b22c9356db3, Int64 x971ce686c8b74ac9, Double[] x31d531fc882737ba, Double[] x272f87fcdd19be88, Double[] xb5f5ca13f19c3e64)
at ThinkGeo.MapSuite.Core.Proj4Projection.ConvertToExternalProjectionCore(Double[] x, Double[] y)
at ThinkGeo.MapSuite.Core.Projection.xfcfa8cfe0cd69ed5(Byte[] x61ddc1291c0e3204)
at ThinkGeo.MapSuite.Core.Projection.x479147ab5a3dca02(Byte[] x61ddc1291c0e3204)
at ThinkGeo.MapSuite.Core.Projection.ConvertToExternalProjection(Feature feature)
at ThinkGeo.MapSuite.Core.FeatureSource.ConvertToExternalProjection(Feature feature)
at ThinkGeo.MapSuite.Core.FeatureSource.ConvertToExternalProjection(IEnumerable`1 features)
at ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesForDrawing(RectangleShape boundingBox, Double screenWidth, Double screenHeight, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas)
at ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x27d0591c2adda8d9(RectangleShape xb35a33b423b17f65, Overlay x99251f66cdabc2ad, Int32 xa209325f5c895f7e, Int32 x7454a0d1965919b1, GeographyUnit xbb704b4400ce6f76)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x27d0591c2adda8d9(Object x9c95f4613bdc3113)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
InnerException: System.AccessViolationException
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="Proj4ExtensionX64"
StackTrace:
at pj_transform(Void* , Void* , Int32 , Int32 , Double* , Double* , Double* )
at Proj4Extension.Proj4ExtensionX64.Transform(IntPtr srcCs, IntPtr destCs, Int32 pointCount, Double[] x, Double[] y, Double[] z)
InnerException: