Exception when CurrentLineHighlighting enabled and Window Resize

SyntaxEditor for WPF Forum

Posted 11 years ago by Tom P.
Version: 12.2.0570
Platform: .NET 4.0
Environment: Windows 8 (64-bit)
Avatar

I've reproduced this bug with the SDI Code Editor Example included with the release.

To reproduce, open any document. Focus the FIRST line with the cursor. Then, resize the application window from the bottom until the status bar covers the highlighted line and you will get the following:

System.ArgumentException was unhandled
HResult=-2147024809
Message=Width and Height must be non-negative.
Source=WindowsBase
StackTrace:
at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height)
at #32b.#fuf.#Whc(Boolean #BCf)
at #32b.#fuf.#kgc(Object #xhb, TextViewTextAreaLayoutEventArgs #yhb)
at System.EventHandler'1.Invoke(Object sender, TEventArgs e)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.TextView.#Dkc(TextViewTextAreaLayoutEventArgs #yhb)
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.#Ukc()
at ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.Interop.HwndSource.Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Interop.HwndSource.LayoutFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
InnerException:

There may be other ways to reproduce this, but this is the only thing I've found so far.

Thoughts?

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tom,

That sounds like something we may have fixed already. I can't repro it in our latest code.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.