We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Divide by zero error

We have an issue that we can not reproduce but it seems to throw an exception within the syncfusion grid code. This is using relase of the grid. ************** Exception Text ************** System.DivideByZeroException: Attempted to divide by zero. at Syncfusion.Windows.Forms.Grid.GridControlBase.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WmMouseDown(Message& msg) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

1 Reply

AD Administrator Syncfusion Team September 20, 2003 04:59 AM UTC

I looked through the GridControlBase.OnMouseDown source, and did not see anything that jumped out as a potential dividebyzero. (There was no explicit diving going on.) Are you using multiple threads? If so, make sure you protect calls into the grid (or UI components) with InvokeRequired checks. Here is a KB link discussing this. http://www.syncfusion.com/KB/Grid/Grid_c34c.asp#q572q If you have the source code for our library, you can use Assembly Manager to build a debug version, and then can get a full callstack with line numbers. At that point, if you set VisStu to break on exception, you could query the variables to see what values they have at the point of the exception. This might give a hint as to what is going wrong.

Live Chat Icon For mobile
Up arrow icon