giawa / opengl4csharp

OpenGL 4 Bindings (partially based on OpenTK) for C#
Other
232 stars 61 forks source link

Unhandled Exception #13

Closed jchand99 closed 6 years ago

jchand99 commented 6 years ago

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at OpenGL.Gl.DeleteTextures(Int32 n, UInt32[] textures) at OpenGL.Texture.Dispose(Boolean disposing) at OpenGL.Texture.Finalize()

That is the error message recieved.

giawa commented 6 years ago

Hey there,

Did you end up resolving this issue? For posterity, do you mind including your solution in this issue?

Thanks!

hellbender3069 commented 4 years ago

Hello Giawa, I seem to have run into the same problem using Visual Studio 2019 and the example code in a console application. It happens when the application is closed and i am not sure but when I try to step into the Delegates.glDeleteVertexArray(n, arrays) function I get the System.AccessViolationException. Since Delegates is a class of internal delegates I have no idea where they are pointing to. Since jchand99 has not published any solution I am a bit in the dark here about what is happening.

Could you please be of any assistance?

With regards, Michel

Program.txt

P.S. it seems to start acting up when I add the line for the new ShaderProgram. If I don't attach those and not paint the cube nothing is wrong. If I add the line for the ShaderProgram it gives this exception. I don't need to draw the cube to trigger it.