I'm using VC++ 2010 and Window 7 64-bit.

In my project, I have 2 DLLs and one EXE (all being build 32-bit). They're all using the same runtime library (Multi-Threaded Debug) and I have checked that nothing is being deleted twice. I'm fairly sure that nothing is being allocated in one dll/exe and being de-allocated in another.

When I run my program, I get this error:

Invalid address specified to RtlValidateHeap( 02800000, 05DE00F0 )

I have been trying to fix this error for 3 days, and I can't find a solution that works :(

I can't specify a Data Breakpoint either, that option is greyed out.

When it crashes, it points me to this piece of code:

void __cdecl __crtExitProcess (
        int status
        )
{
        __crtCorExitProcess(status);

        /*
         * Either mscoree.dll isn't loaded,
         * or CorExitProcess isn't exported from mscoree.dll,
         * or CorExitProcess returned (should never happen).
         * Just call ExitProcess.
         */

        ExitProcess(status); // this line
}

And this is what I have in the output window when it crashes:

'launcher.exe': Loaded 'C:\Users\Tom\Programming\game\bin\launcher.exe', Symbols loaded.
'launcher.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Users\Tom\Programming\game\bin\engine.dll', Symbols loaded.
'launcher.exe': Loaded 'C:\Users\Tom\Programming\game\bin\vld_x86.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Users\Tom\Programming\game\bin\dbghelp.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GdiPlus.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\wininet.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\normaliz.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\iertutil.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\urlmon.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\apphelp.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\AppPatch\AcLayers.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\winspool.drv', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\mpr.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\nvoglv32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'launcher.exe': Loaded 'C:\Users\Tom\Programming\game\bin\utilLibrary.dll', Symbols loaded.
'launcher.exe': Unloaded 'C:\Users\Tom\Programming\game\bin\utilLibrary.dll'
HEAP[launcher.exe]: Invalid address specified to RtlValidateHeap( 02800000, 05DE00F0 )
Windows has triggered a breakpoint in launcher.exe.

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

This may also be due to the user pressing F12 while launcher.exe has focus.

The output window may have more diagnostic information.
The program '[6200] launcher.exe: Native' has exited with code 0 (0x0).

If it makes a difference.. launcher.exe and utilLibrary.dll are linking to engine.lib(engine.dll)

anyone? I've tried all the solutions i could think of/could find on the internet. now i'm just taking shots in the dark..

Hi, I have the same problem as well.

I'm sure that I'm not deleting the vector twice. I even can see the content using the Watch window. But the same error occurs.

I found that it is possible to avoid that error using the Runtime Library = /MD. But I'm using GSL library that works only with /MTd option :(

I made a test program like that:

float *f = (float*)malloc(sizeof(float) * 3);
	free(f);
	free(f);

and in mode /MD the second free runs normal while in /MTd the error raises.

I still didn't fix my program, but I hope that information could help you.

I solved my problem. The problem was in my incorrect allocation of a 2D double array.

Incorrect:

double **d = (double**) malloc(sizeof(double*) * 5);
for (i=0; i<10; i++)
    d[i] = (double*) malloc(sizeof(double) * 100);

The only change was:

double **d = (double**) malloc(sizeof(double*) * 10);
for (i=0; i<10; i++)
    d[i] = (double*) malloc(sizeof(double) * 100);

It was difficult to detect that error because the problem was random since my values 10 and 100 are completely variables. If I was in Pascal I will certain got an Index Out of Bound (6) : ).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.