lasyan3's picture

[Closed] .NET Memory error : Free Heap block modified after it was freed

Hello 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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

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.

lasyan3's picture

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.

lasyan3's picture

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...