This may be due to a corruption of the heap

This is a discussion on This may be due to a corruption of the heap within the C++ Programming forums, part of the General Programming Boards category; Hiii..... when my program running this message comes.. Windows has triggered a break-point in mypgm.exe This may be due to ...

  1. #1
    Registered User
    Join Date
    Jun 2009
    Location
    Bangalore,India
    Posts
    24

    This may be due to a corruption of the heap

    Hiii.....


    when my program running


    this message comes..


    Windows has triggered a break-point in mypgm.exe

    This may be due to a corruption of the heap, and indicates a bug in mypgm.exe or any of the DLLs it has loaded


    Actually in my operation I was copying files...

    Memory is deleting here???...what is happening....?




    ----------------
    with regards
    ---------------

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Who knows? Your question is very vague. There are literally thousands of reasons why this could be happening.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,270
    Sounds like the CRT detected heap corruption and reported it. You have probably overflowed a buffer somewhere. Copying file data sounds like a likely place such a bug could be...
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    I'd have to say that it's probably due to a corruption of the heap, and indicates a bug in mypgm.exe or any of the DLLs it has loaded.
    More specifically perhaps some kind of double-free, or buffer overrun, or writing to deleted memory type of bug to name a few causes. It generally involves examining the code for potential sources of the above to find the problem, and eliminating portions of code to isolate the fault.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Why don't you post your code?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Heap corruption with dynamic memory
    By Head In Jar Man in forum C++ Programming
    Replies: 8
    Last Post: 01-14-2009, 02:58 AM
  2. Heap corruption detected. What does it mean?
    By franziss in forum C++ Programming
    Replies: 17
    Last Post: 07-23-2008, 03:50 AM
  3. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 01:43 PM
  4. Heap corruption errors
    By VirtualAce in forum C++ Programming
    Replies: 0
    Last Post: 07-15-2006, 05:46 PM
  5. heap question
    By mackol in forum C Programming
    Replies: 1
    Last Post: 11-30-2002, 05:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21