Hi Stoyan,
Our users have managed to create a diagram that is very quickly throwing an out of memory exception as soon as it is zoomed out using the mouse wheel.
Here's the call stack:
************** Exception Text **************
System.OutOfMemoryException: Out of memory.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawPath(Pen pen, GraphicsPath path)
at MindFusion.Drawing.GdiGraphics.DrawPath(Pen pen, GraphicsPath path)
at MindFusion.Diagramming.ShapeNode.DrawOutline(DrawParams dp)
at MindFusion.Diagramming.ShapeNode.DrawShape(IGraphics graphics, RectangleF rc, Boolean shadow, Brush mfBrush, Pen mfPen, RenderOptions options)
at MindFusion.Diagramming.ShapeNode.DrawShadow(IGraphics graphics, RenderOptions options)
at MindFusion.Diagramming.Diagram.DrawItemWithShadow(IGraphics graphics, DiagramItem item, Boolean relatedItems)
at MindFusion.Diagramming.Diagram.DrawItems(IGraphics graphics, RectangleF clipRect, Boolean modfBackBuf)
at MindFusion.Diagramming.Diagram.Draw(IGraphics graphics, RenderOptions options, RectangleF clipRect, Boolean noModifiedItems)
at MindFusion.Diagramming.WinForms.DiagramView.DrawDiagram(IGraphics graphics, RectangleF clip, Boolean noModifiedItems)
at MindFusion.Diagramming.WinForms.DiagramView.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I know that I'm not providing a lot of info but any idea what can cause this and/or what to look for?
EDIT: Actually I can zoom without the exception as long as i want between 200% and 50% but as soon as I try to set the zoom level to 40% i get the out of memory exception.
EDIT2: Setting the zoom level to 39% or to 41% works but setting it to 40% immediately generates the exception!!