ThinkGeo.com    |     Documentation    |     Premium Support

Weird Exception

Hi, I got this exception with the latest version of MapSuite Desktop Edition:


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.x5e1f8125aa040824(Object x2680f14bfcc5c488)

       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: 

 


Thanks


Rose



Rose, 
  
 From the exception message I know you are using x64 system, but we can not recreate it in both x64 Vista and x64 Windows XP.  
  
 As we updated some Dlls in system32, so the first thing I propose you to do is overwrite the Dlls in system32 using C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Developer Reference\System32.  
  
 If that still can not fix your issue could you please give us more information on how this issue happened, and it will be very helpful if you can create a demo to recreate it. 
  
 Thanks, 
 ThinkGeo Support 


Lee:


I am using Windows Vista x64 system.


I don't get the exception everytime, only got it once yesterday, hard to reproduce it, isn't it a threaded related issue? I used the default thread mode yesterday, and I changed to MultiThread mode today, haven't got it.


If I use the C:\Programs Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Developter Reference\System32\System32 to overwrite the dlls in my Windows\System32 directory, when I deploy my product, should I also deploy these Dlls?


Rose



Rose,


I am afraid this exception is related with multi-thread, here’s a presentation talked about new features, changes and enhancements in the RC1, I think that will be very helpful to understand what’s going on in the new version. gis.thinkgeo.com/Support/Dis...fault.aspx


The Dlls in system32 deal with ECW, SID and projection stuff; if your product is using one of these modules you have to deploy the Dlls with your product.


BTW, we have Merge Module in C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Developer Reference\Merge Module to help you deploy the Dlls in system32.


Thanks,

ThinkGeo Support