I really do not know what to do about this. Often, when I run Forms programs with Visual Studio the application crashes with an exception like this "AccessViolationException". I never exerienced any problems with other standard applications like e.g. Word, Excel, Outlook, only self written programs in C# seem to suffer from this. Most of these applications then contain either something like a ToolStrip or a DataGrid which then after an exception like this are only represented by a white rectangle with a red X. The controls itself are standard out of the box.I ran the Microsoft Memory Diagnostic today, but it did not find anything wrong with my memory. Does anybody has an idea what may cause this exception?
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.ÃÂ ÃÂ at System.Drawing.SafeNativeMethods.Gdip.GdipDrawLineI(HandleRef graphics, HandleRef pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)ÃÂ ÃÂ at System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)ÃÂ ÃÂ at System.Windows.Forms.DataGridViewCell.PaintBorder(Graphics graphics, Rectangle clipBounds, Rectangle bounds, DataGridViewCellStyle cellStyle, DataGridViewAdv
View Complete Post