1

Closed

Crash when resizing plot area due to uncaught System exception

description

When resizing the plot area to a minimum size by using the current window's border resize handler, the application crashes.
I realize you can catch it yourself but it assumes lots of internal knowledge.

System: Windows 8.

from OxyRect.cs
        public OxyRect(double left, double top, double width, double height)
        {
            if (width < 0)
            {
                throw new ArgumentOutOfRangeException("width", "The width should not be negative.");
            }

            if (height < 0)
            {
                throw new ArgumentOutOfRangeException("height", "The height should not be negative.");
            }

            this.left = left;
            this.top = top;
            this.width = width;
            this.height = height;
        }
Sorry for german stack trace:
System.ArgumentOutOfRangeException wurde nicht behandelt.
  HResult=-2146233086
  Message=The height should not be negative.
Parametername: height
  Source=OxyPlot
  ParamName=height
  StackTrace:
       bei OxyPlot.OxyRect..ctor(Double left, Double top, Double width, Double height)
       bei OxyPlot.PlotModel.UpdatePlotArea(IRenderContext rc)
       bei OxyPlot.PlotModel.Render(IRenderContext rc, Double width, Double height)
       bei OxyPlot.Wpf.Plot.UpdateVisuals()
       bei OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.ContextLayoutManager.UpdateLayout()
       bei System.Windows.UIElement.UpdateLayout()
       bei System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
       bei System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  InnerException: 
Closed May 12 at 4:16 PM by objo
fixed bug related to the Padding property

comments