System.AccessViolationException



I am getting the following error message in my WinForms project:

---

An unhandled exception of type 'System.AccessViolationException'
occurred in System.Windows.Forms.dll

Additional information: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.

---

I have narrowed the problem down to a TreeView - if the user is
currently editing the label of a TreeNode (using node.BeginEdit) and I
then add a new node to the TreeView, the exception gets thrown.

However - I cannot seem to programatically end the editing of the
TreeNode first (assuming that will stop the error). Can anyone direct
me to a solution please?

Thanks!

.



Relevant Pages

  • System.AccessViolationException
    ... I am getting the following error message in my WinForms project: ... An unhandled exception of type 'System.AccessViolationException' ... currently editing the label of a TreeNode and I ... TreeNode first. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Editing Boot.ini
    ... get a similar error message. ... Version of WinXP? ... I have changed the boot order to ... One method calls for editing the boot.ini file. ...
    (microsoft.public.windowsxp.general)
  • unhandled exception of type System.Net.WebException occurred in system.web.services.dll
    ... The following error message occurs ... An unhandled exception of type 'System.Net.WebException' occurred in ... Service1 obj = new Service1; ... obj.TimeOut = -1; // infinite time out. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Help with Microsoft.ApplicationBlocks.Data Error Please
    ... you have a decent idea what is happening. ... > The error message tells me that when running the ExecuteReader function> for about the 8th time in my program, that "An unhandled exception of type> 'System.Data.SqlClient.SqlException' occured in ... > Does anyone know what is causing this problem, and more importantly, how to> fix it. ...
    (microsoft.public.dotnet.framework)
  • RE: Unable to check out document - error message checked out or locked for editing by (unknown).
    ... You might be experiencing a situation where someone has a Short Term lock ... other people from editing the doc while you are. ... Unable to check out document - error message checked out or locked ... for editing by (unknown). ...
    (microsoft.public.sharepoint.portalserver)

Loading