
[Closed] .NET Memory error : Free Heap block modified after it was freed
Posted Sunday, 20 November, 2011 - 14:57 by lasyan3 inHello everyone,
I created a simple C# Windows project to test OpenTK. I have a simple form with only a GLControl on it. When I enable the "unmanaged code debugging" option in the projet properties, and run it in debug mode, I got this error :
"HEAP: Free Heap block 219fa8 modified at 21a128 after it was freed."
I use a laptop with Intel graphic chipset, I have the lastest OpenGL & OpenAL drivers.
Is there anything I'm doing wrong ?
Thanks.
Edit : the same error occurs when the OpenTK's sample "GLControlSimple".
Edit 2 :
Ok, I found out that this error occurs only on my laptop, and neither on my desktop computer, neither on my pro computer.
So it seems it's not a problem with OpenTK but with some software configuration or something like that.
No need for that post anymore, sorry to waste your time guys...


Comments
Re: .NET Memory error : Free Heap block modified after it ...
Try calling GLControl.Dispose() explicitly when shutting down your WinForms application, and make sure you are not calling any OpenGL functions after the GLControl has been destroyed.
Re: .NET Memory error : Free Heap block modified after it ...
Thanks, but the error occurs at the beginning of the execution...
In fact, I can put a breakpoint on the constructor of the main form, but right after, it crash (it doesn't even execute the Load event of the form!).
When the error occurs, the EDI set the cursor on the line "Application.Run( new Form1() );" of the Program.cs file.
Re: .NET Memory error : Free Heap block modified after it ...
Ok, I found out that this error occurs only on my laptop, and neither on my desktop computer, neither on my pro computer.
So it seems it's not a problem with OpenTK but with some software configuration or something like that.
No need for that post anymore, sorry to waste your time guys...