luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
567 stars 107 forks source link

Any way to get more info from System.ExecutionEngineException? #169

Closed brendankeesing closed 1 week ago

brendankeesing commented 2 months ago

I keep running into issues where System.ExecutionEngineException is thrown. The error message is super vague and is rarely triggered in the area where the problem actually is. In the past, I've debugged it through a painful process of commenting out code until I can narrow down what the issue is exactly, but it's extremely time consuming. Is there a way to get more info from exception? Is there something that commonly triggers this exception?

My previous encounters are usually from not unbinding something. My current case is triggering it on Gl.Clear() and Gl.ClearBuffer(), even though nothing new has happened with these buffers.

Any insight is greatly appreciated!

brendankeesing commented 1 week ago

I'm a bit of an idiot. For anyone else having this issue, the problem was that my .NET version was too low. I upgraded from .NET 6 to .NET 7 and now I'm getting actually comprehensible error messages!