This project is read-only.

Mouse Wheel Scrolling causes Overflow


When I quickly scroll a DataGrid which is virtualizing rows I get the following:
System.OverflowException: Arithmetic operation resulted in an overflow.
at System.IntPtr.op_Explicit(IntPtr value)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
I'm running on Vista x64.
If I don't scroll quickly, it doesn't happen.
If I don't use virtualization, it doesn't happen.
It is not dependant on what is happening to the grid at the time (i.e. if it is being updated)
I've attached a project that reproduces the issue.
Just build/run and quickly move mouse scroll wheel down.

file attachments


VamseeP wrote Aug 28, 2009 at 9:57 PM

Unfortunately I could not repro this. Can you provide us with more details which you think would be relevant.

wrote Dec 31, 2009 at 4:26 PM

pbrumblay wrote Dec 31, 2009 at 4:32 PM

I can reproduce this on Windows 7 x64 [Version 6.1.7600] using WPFToolkit.dll version 3.5.40128.1 and the attached solution. We are also seeing this in our application ...

wrote Mar 14, 2011 at 1:46 PM

serhhio wrote Mar 14, 2011 at 1:48 PM

we can reproduce this on Windows 7 x64. Please tell us if there are a workaround. Apparently the problem appears only with the scoll DOWN....

lil3p wrote Aug 29, 2011 at 1:16 PM

I am having exactly the same error the only difference is that am using a win forms, both the .net datagridview and developer express datagrid give an “Arithmetic operation resulted in an overflow” exception when I use the mouse wheel to scroll quickly on windows 7 64 bit. Was this issue ever resolved if so what’s the fix.

wrote Feb 22, 2013 at 2:41 AM