Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - AccessViolationException
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AccessViolationException

 Post Reply Post Reply
Author
Message
SteveStraley View Drop Down
Groupie
Groupie


Joined: 25 November 2005
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveStraley Quote  Post ReplyReply Direct Link To This Post 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:

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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2010 at 11:20am
You don't need to call oControl:Records.DeleteAll();
Back to Top
SteveStraley View Drop Down
Groupie
Groupie


Joined: 25 November 2005
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveStraley Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2010 at 11:14am
Thanks... I'll give that a whirl...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.201 seconds.