Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3] OpenTK crashes if you exit on windows without calling dispose on textures #3749

Closed
Thraka opened this issue Apr 21, 2015 · 6 comments
Closed
Labels
OpenGL OpenGL graphics backend Windows

Comments

@Thraka
Copy link

Thraka commented Apr 21, 2015

I don't use the content pipeline and I just load textures by hand using Texture2D.FromStream or new Texture2D. With 3.2 I had no problems. When I upgraded to 3.3 I suddenly get this exception from OpenTK when I close the game window:

An unhandled exception of type 'OpenTK.Graphics.GraphicsContextException' occurred in OpenTK.dll

Additional information: Failed to make context 131072 current. Error: 6
@totallyeviljake
Copy link
Contributor

+1 this happens every time I close an OpenGL project with MonoGame. It's in the finalizer of the GrahpicsResource class. The MainWindow is not valid when the finalizer is invoked, so the RunOnUIThread calls fail because they use the window context for thread management.

This happened last year and @thefiddler was going to look at it. I believe a change was made to address this issue, so this may be a regression problem.

@tomspilman tomspilman added OpenGL OpenGL graphics backend Windows labels Apr 23, 2015
@paewie
Copy link

paewie commented Apr 24, 2015

+1 and exactly the same problem on other platforms (at least Linux) as I already stated in addition to #3540. So this is (sadly) not Windows-only, even if Linux seems to be much more stable (very, very rare).

@WardBenjamin
Copy link
Contributor

This is definitely still a problem. I create a single pixel texture for drawing lines, and this error seems to be happening still. @tomspilman @thefiddler do we have any news on this?

@ghost
Copy link

ghost commented Jul 16, 2015

This happens in a project using 3.4 that I contribute too. According to the developer...,

Garbage collector causes random crashes when trying to release textures...

@ghost
Copy link

ghost commented Aug 15, 2015

Same here Windows OpenGL

Windows 10
MonoGame 3.4

@harry-cpp
Copy link
Member

@tomspilman This got fixed with the SDL switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenGL OpenGL graphics backend Windows
Projects
None yet
Development

No branches or pull requests

6 participants