ThinkGeo.com    |     Documentation    |     Premium Support

FYI - Beta Error

Just to let you all know:

We are using beta versions instead of latest stable builds. When branching off to a new version build of our app, I updated our ThinkGeo references/dependencies. After the updates, whenever I tried to show a polygon on our map, the app would crash. I checked the ThinkGeo version differences, and rolled them back one by one until everything worked as expected. I ended up rolling back 3 dependencies, in this order:

MapSuiteDesktopForWinforms-BareBone from beta 48 to 47
MapSuiteDesktopForWinforms-Standard from beta 48 to 47
ThinkGeo.MapSuite from beta 66 to 65

After rolling back ThinkGeo.MapSuite, the app ran as expected. We are running fine now.

Here is the exception info we encountered. Hope it helps:

System.Runtime.InteropServices.ExternalException
HResult=0x80004005
Message=A generic error occurred in GDI+.
Source=System.Drawing
StackTrace:
at System.Drawing.Bitmap.SetResolution(Single xDpi, Single yDpi)
at ThinkGeo.MapSuite.Drawing.PlatformGeoCanvas.DrawScreenImageWithoutScalingCore(GeoImage image, Single centerXInScreen, Single centerYInScreen, DrawingLevel drawingLevel, Single xOffset, Single yOffset, Single rotateAngle)
at ThinkGeo.MapSuite.Drawing.GeoCanvas.DrawWorldImageWithoutScaling(GeoImage image, Double centerXInWorld, Double centerYInWorld, DrawingLevel drawingLevel, Single xOffset, Single yOffset, Single rotateAngle)
at ThinkGeo.MapSuite.Styles.PointStyle.Hxw=(PointShape point, GeoCanvas canvas)
at ThinkGeo.MapSuite.Styles.PointStyle.Hhw=(Feature feature, GeoCanvas canvas)
at ThinkGeo.MapSuite.Styles.PointStyle.DrawCore(IEnumerable1 features, GeoCanvas canvas, Collection1 labelsInThisLayer, Collection1 labelsInAllLayers) at ThinkGeo.MapSuite.Styles.Style.Draw(IEnumerable1 features, GeoCanvas canvas, Collection1 labelsInThisLayer, Collection1 labelsInAllLayers)
at ThinkGeo.MapSuite.Styles.PointStyle.DrawSampleCore(GeoCanvas canvas, DrawingRectangleF drawingExtent)
at ThinkGeo.MapSuite.Styles.Style.DrawSample(GeoCanvas canvas, DrawingRectangleF drawingExtent)
at ThinkGeo.MapSuite.Layers.LegendItem.DrawCore(GeoCanvas adornmentGeoCanvas, Collection1 labelsInAllLayers, LegendDrawingParameters legendDrawingParameters) at ThinkGeo.MapSuite.Layers.LegendItem.Draw(GeoCanvas adornmentGeoCanvas, Collection1 labelsInAllLayers, LegendDrawingParameters legendDrawingParameters)
at ThinkGeo.MapSuite.Layers.LegendAdornmentLayer.DrawCore(GeoCanvas canvas, Collection1 labelsInAllLayers) at ThinkGeo.MapSuite.Layers.Layer.cyU=(GeoCanvas canvas, Collection1 labelsInAllLayers)
at ThinkGeo.MapSuite.Layers.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.WinForms.AdornmentOverlay.DrawCore(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.Overlay.VFM=(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.Overlay.Draw(GeoCanvas canvas)
at ThinkGeo.MapSuite.WinForms.WinformsMap.E1M=(Graphics graphics, RectangleShape extent, Overlay overlay)
at ThinkGeo.MapSuite.WinForms.WinformsMap.H1M=()
at ThinkGeo.MapSuite.WinForms.WinformsMap.HlM=(InteractionArguments interactionArguments)
at ThinkGeo.MapSuite.WinForms.WinformsMap.GVM=(Object sender, SlM= e)
at ThinkGeo.MapSuite.WinForms.MouseEventAnalyzer.OnMouseEvent(SlM= e)
at ThinkGeo.MapSuite.WinForms.MouseEventAnalyzer.RlM=(Double screenX, Double screenY, Double worldX, Double worldY)
at ThinkGeo.MapSuite.WinForms.WinformsMap.HFM=(Object sender, MouseEventArgs e)
at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.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 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at Hurrevac2010.My.MyApplication.Main(String[] Args) in :line 81

Hi Dib,

Thanks to let us know this problem.

We double check the change between 47 to 48 for winforms and 65 to 66 for MapSuite, but hadn’t found it will cause the issue related with Legend. Because it looks your exception is thrown from Legend.

Could you please provide us a simple sample which remove unnecessary overlays? It should be very helpful.

Regards,

Ethan

Ethan,

Sorry I didn’t get code to you.

I updated again today, moving all of the beta version we were using back to the latest stable versions. I got the same error as above. I then rolled back:

MapSuiteDesktopForWinforms-BareBone from latest stable to 10.2.8
MapSuiteDesktopForWinforms-Standard from latest stable to 10.2.8
ThinkGeo.MapSuite from latest stable to 10.2.1

This corrected the error. Hope this helps.

Hi Dib,

Thanks for your update.

Our developer will double check all the changes.

But if we hadn’t found anything, could you please help us build a simple sample to reproduce it? So we can research based on it.

Regards,

Ethan