473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 1203
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark C | last post by:
I have a memory allocation problem in PHP using NuSOAP and the built in XML parser. The code below is called in a loop and executed about 1900 times before it failed. I am using nusoap.php,v 1.76...
2
by: shyamal | last post by:
I want to display memory content using C++ on LINUX. For example, the user may ask to display 256 bytes from 0x1000ff00. The problem is , if any location is invalid, the program will coredump...
4
by: Sameer | last post by:
Hello Group, This is one problem in programming that is troubling me. there is a segmentation fault just before creating memory to a structure ..i.e, just after the "allocating memory "...
10
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some information about adding some lines in a Makefile...
1
by: Marcelo | last post by:
Hello, I am trying to modify some color information from java to C. I have the information given by java in a format ARGB and I would like to convert it as: RRRR...GGGG...BBB.... without the...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
17
by: dtschoepe | last post by:
Hi, I have a homework project I am working on, so be forwarned, I'm new to C programming. But anyway, having some trouble with a memory allocation issue related to a char * that is a variable...
23
by: sam_cit | last post by:
Hi Everyone, I have the following program unit, #include <stdlib.h> int main() { char *p = (char*)malloc(100); if(p==NULL)
9
by: weidongtom | last post by:
Hi, I've written the code that follows, and I use the function add_word(), it seems to work fine *before* increase_arrays() is called that uses realloc() to allocate more memory to words. But...
27
by: George2 | last post by:
Hello everyone, Should I delete memory pointed by pointer a if there is bad_alloc when allocating memory in memory pointed by pointer b? I am not sure whether there will be memory leak if I do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.