System.OverflowException when zooming

Topics: WinForms Controls
May 16, 2007 at 9:46 AM
Hi,

I'm getting an overflow exception every once in a while when zooming in or out of the map.
I'm using latest SharpMap 0.9-21021 sources and MssqlSpatial data sources.
Is that a known issue?

Jo


Here's the stack trace:

bei System.Drawing.Graphics.CheckErrorStatus(Int32 status)
bei System.Drawing.Graphics.FillPath(Brush brush, GraphicsPath path)
bei SharpMap.Rendering.VectorRenderer.DrawPolygon(Graphics g, Polygon pol, Brush brush, Pen pen, Boolean clip, Map map)
bei SharpMap.Rendering.VectorRenderer.DrawMultiPolygon(Graphics g, MultiPolygon pols, Brush brush, Pen pen, Boolean clip, Map map)
bei SharpMap.Layers.VectorLayer.RenderGeometry(Graphics g, Map map, Geometry feature, VectorStyle style)
bei SharpMap.Layers.VectorLayer.Render(Graphics g, Map map)
bei SharpMap.Map.GetMap()
bei SharpMap.Forms.MapImage.Refresh()
bei SharpMap.Forms.MapImage.MapImage_MouseUp(Object sender, MouseEventArgs e)
bei System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.Run(Form mainForm)
bei <project>.Program.Main() in <projectpath>\Program.cs:Row 17.
bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
May 16, 2007 at 6:22 PM
You're having such exception even when zooming out?
I reported this issue, but only occurred when zooming in... btw it should be a problem of the FillPath function related to the polygon to fill... maybe because of float precision the path is not considered closed...