Memory Allocation Error

  • cyberdragon
    12th Jul 2013 Member 0 Permalink

    The reason it crashes from screenshots is because the system has lost the ability to reallocate memory. I have noticed this when pointers started mysteriously carrying over between functions. It is still saying there's an error in malloc.c here:

     

    void * __cdecl _malloc_base (size_t size)
    {
    void *res = NULL;

    // validate size
    if (size <= _HEAP_MAXREQ) {
    for (;;) {

    // allocate memory block < this is what it's failing at
    res = _heap_alloc(size); <THIS

    // if successful allocation, return pointer to memory
    // if new handling turned off altogether, return NULL

    if (res != NULL)
    {
    break;
    }

     

    Compile options problem?

  • cyberdragon
    16th Jul 2013 Member 0 Permalink

    I KNEW IT!

     

    First-chance exception at 0x77423AB3 (ntdll.dll) in Mythical Mod.exe: 0xC0000005: Access violation reading location 0x80010000.
    First-chance exception at 0x768EC41F in Mythical Mod.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0065F390.

     

    This s***:

     

    Snapshot * Simulation::CreateSnapshot()
    {
    Snapshot * snap = new Snapshot(); //DANGER!

Locked by jacob1: there is no problem here ...