Memory Fault Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGV0ZXI=?=

    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
  • Peter Duniho

    #2
    Re: Memory Fault Error

    On Wed, 30 Apr 2008 16:12:07 -0700, Peter
    <Peter@discussi ons.microsoft.c omwrote:
    [...]
    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 TreeNodeCollect ion.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

    Comment

    Working...