|  | 
| AccessViolationException | 
| Post Reply   | 
| Author | |
| SteveStraley   Groupie   Joined: 25 November 2005 Status: Offline Points: 46 |  Post Options  Thanks(0)  Quote  Reply  Topic: AccessViolationException Posted: 05 January 2010 at 10:18am | 
| Hi, I have an issue and just need ideas on where to look. I have a report control that off of it the user adds information. When completed, I have the control "refresh" itself with the following basic lines: 
 This is the same routine used throughout; however, in this one location there is a persistent error: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.    at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)    at XtremeReportControl._DReportControl.RemoveRowEx(ReportRow Row)    at AxXtremeReportControl.AxReportControl.RemoveRowEx(ReportRow row)    at TrakkerLIB.reportItems.RemoveAllRows() in C:\Development\TrakkerSoftware\TrakkerLIB\Controls\reportItems.cs:line 91    at TrakkerLIB.reportItems.RemoveAllItems() in C:\Development\TrakkerSoftware\TrakkerLIB\Controls\reportItems.cs:line 102    at TrakkerControls.reportGridItems.RefreshAdminItemStages() in C:\Development\TrakkerSoftware\TrakkerControls\TrakkerControls\Grid Report Items\reportGridItems_ItemStages.cs:line 87    at TrakkerLIB.reportItems.RefreshGrid() in C:\Development\TrakkerSoftware\TrakkerLIB\Controls\reportItems.cs:line 84    at TrakkerControls.reportGridItems.addNewItemStage(Object sender, EventArgs e) in C:\Development\TrakkerSoftware\TrakkerControls\TrakkerControls\Grid Report Items\reportGridItems_ItemStages.cs:line 118    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)    at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)    at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)    at System.Windows.Forms.Control.WndProc(Message& m)    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)    at System.Windows.Forms.ToolStrip.WndProc(Message& m)    at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) So the question is, what should I be looking for as the potential cause? Thanks, Steve | |
|  | |
| mdoubson   Senior Member     Joined: 17 November 2008 Status: Offline Points: 1705 |  Post Options  Thanks(0)  Quote  Reply  Posted: 05 January 2010 at 11:20am | 
| 
   You don't need to call oControl:Records.DeleteAll();
    | |
|  | |
| SteveStraley   Groupie   Joined: 25 November 2005 Status: Offline Points: 46 |  Post Options  Thanks(0)  Quote  Reply  Posted: 06 January 2010 at 11:14am | 
| 
   Thanks... I'll give that a whirl...
    | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |