Print Page | Close Window

AccessViolationException

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=15955
Printed Date: 15 November 2024 at 8:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: AccessViolationException
Posted By: SteveStraley
Subject: AccessViolationException
Date 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:

oControl:Records.DeleteAll();

while (oControl.Rows.Count > 0)

{

  oControl.RemoveRowEx(oControl.Rows[0]);

}

// Re-use original data loading into control

oControl.Populate();

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



Replies:
Posted By: mdoubson
Date Posted: 05 January 2010 at 11:20am
You don't need to call oControl:Records.DeleteAll();

-------------
Mark Doubson, Ph.D.


Posted By: SteveStraley
Date Posted: 06 January 2010 at 11:14am
Thanks... I'll give that a whirl...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net