Hi,
I recently converted all my references from Proj4Projection to UnmanagedProj4Projection to support gdal projection methods; however, I now am having problems with hard crashes. Here’s the stack trace. Switching back to Proj4Projection prevents the crash.
System.Reflection.TargetInvocationException
HResult=0x80131604
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Dhg=.tlQ=.7U4=(Object[] objArray, Type[] typeArray, s1Q=[] modePassArray, Type returnType, IntPtr farProc)
at Dhg=.tlQ=.vkM=(IntPtr srcProjPtr, IntPtr dstProjPtr, Int32 pointCount, Int32 pointOffset, Double[] xArray, Double[] yArray, Double[] zArray)
at ThinkGeo.MapSuite.Shapes.UnmanagedProj4Projection.vkM=(IntPtr srcCs, IntPtr destCs, Int64 pointCount, Double[] x, Double[] y, Double[] z)
at ThinkGeo.MapSuite.Shapes.UnmanagedProj4Projection.ConvertToExternalProjectionCore(Double[] x, Double[] y)
at ThinkGeo.MapSuite.Shapes.Projection.8iQ=(Byte[] wellKnownBinary)
at ThinkGeo.MapSuite.Shapes.Projection.6yQ=(Byte[] wellKnownBinary)
at ThinkGeo.MapSuite.Shapes.Projection.ConvertToExternalProjection(Feature feature)
at lRc=.GRQ=.6yQ=(Projection projection, Feature feature)
at ThinkGeo.MapSuite.Layers.FeatureSource.ConvertToExternalProjection(IEnumerable1 features) at ThinkGeo.MapSuite.Layers.FeatureSource.sic=(Collection
1 returnFeatures)
at ThinkGeo.MapSuite.Layers.FeatureSource.GetFeaturesForDrawing(RectangleShape boundingBox, Double screenWidth, Double screenHeight, IEnumerable1 returningColumnNames) at ThinkGeo.MapSuite.Layers.FeatureLayer.DrawCore(GeoCanvas canvas, Collection
1 labelsInAllLayers)
at ThinkGeo.MapSuite.Layers.Layer.lic=(GeoCanvas canvas, Collection1 labelsInAllLayers) at ThinkGeo.MapSuite.Layers.Layer.Draw(GeoCanvas canvas, Collection
1 labelsInAllLayers)
at ThinkGeo.MapSuite.WinForms.LayerOverlay.DrawCore(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.Overlay.yFU=(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.Overlay.Draw(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.WinformsMap.gVU=(IEnumerable1 drawingOverlays, RectangleShape extent) at ThinkGeo.MapSuite.WinForms.WinformsMap.gFU=(RectangleShape drawingExtent, RectangleShape extent) at ThinkGeo.MapSuite.WinForms.WinformsMap.n1U=(RectangleShape extent) at ThinkGeo.MapSuite.WinForms.WinformsMap.Refresh(RectangleShape extent, IEnumerable
1 overlays)
at SurveyDesign.Map.HiResBinning() in C:\Users\damian\OneDrive - acteq.net\Visual Studio Projects\Projects\TesserACT\SurveyDesign\Map.cs:line 4840
at SurveyDesign.Map.WinformsMap1_CurrentExtentChanged(Object sender, CurrentExtentChangedWinformsMapEventArgs e) in C:\Users\damian\OneDrive - acteq.net\Visual Studio Projects\Projects\TesserACT\SurveyDesign\Map.cs:line 13260
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at ThinkGeo.MapSuite.WinForms.WinformsMap.OnCurrentExtentChanged(CurrentExtentChangedWinformsMapEventArgs e)
at ThinkGeo.MapSuite.WinForms.WinformsMap.eFU=(RectangleShape value, Double candidateScale)
at ThinkGeo.MapSuite.WinForms.WinformsMap.set_CurrentExtent(RectangleShape value)
at ThinkGeo.MapSuite.WinForms.WinformsMap.m1U=(InteractionArguments interactionArguments)
at ThinkGeo.MapSuite.WinForms.WinformsMap.jVU=(Object sender, vlU= e)
at ThinkGeo.MapSuite.WinForms.MouseEventAnalyzer.OnMouseEvent(vlU= e)
at ThinkGeo.MapSuite.WinForms.WinformsMap.mlU=(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseWheel(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseWheel(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at TesserACT.Program.Main() in C:\Users\damian\OneDrive - acteq.net\Visual Studio Projects\Projects\TesserACT\TesserACT\Program.cs:line 19
This exception was originally thrown at this call stack:
.InvokeFunc(System.IntPtr, System.IntPtr, int, int, System.IntPtr, System.IntPtr, System.IntPtr)
Inner Exception 1:
AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Thanks,
Damian