471,321 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Memory Fault Error

I am getting a memory fault exception that I've traced to a TreeView nodes
clear method. I am not using unsafe mode and am not doing anything outside
normal application programming.

treeview.Nodes.Clear();

Error - "Attempted to read/write protected memory. This is often an
indication that memory is corrupt."

When I comment the Nodes.Clear() line out, program runs fine.

Could this be a TreeView component bug?

Any comments.

Thanks
Jun 27 '08 #1
1 1148
On Wed, 30 Apr 2008 16:12:07 -0700, Peter
<Pe***@discussions.microsoft.comwrote:
[...]
Error - "Attempted to read/write protected memory. This is often an
indication that memory is corrupt."

When I comment the Nodes.Clear() line out, program runs fine.

Could this be a TreeView component bug?
It _could_ be. But without a concise-but-complete code sample that
reliably demonstrates the problem, there's no way to know for sure.

Certainly the TreeNodeCollection.Clear() method normally works. I've used
it myself, and I'm sure that if it generally threw the exception you
describe, there'd be a lot of Google-awareness of the issue. There isn't,
so whatever's going on, it's rare.

My personal bet is that there's something funny going on somewhere else in
your program that's causing the problem. But without the aforementioned
concise-but-complete sample, no one can comment beyond that.

Pete
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by shyamal | last post: by
4 posts views Thread by Sameer | last post: by
10 posts views Thread by eyh5 | last post: by
7 posts views Thread by Salvador | last post: by
17 posts views Thread by dtschoepe | last post: by
9 posts views Thread by weidongtom | last post: by
27 posts views Thread by George2 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.