Git Product home page Git Product logo

Comments (12)

flibitijibibo avatar flibitijibibo commented on June 21, 2024

Wait, Game.Exit() or Game.Dispose()? That's what I see in the trace...

Either way, can you add a Console.WriteLine here for me?

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/SDL2_GameWindow.cs#L391

I'm pretty sure some GL stuff is being called after the GL context has been removed.

Does this work on XNA4? Or the old WindowsGL project?

from fna-mghistory.

xanather avatar xanather commented on June 21, 2024

Yep, I am receiving a WriteLine (Edit: I am also using Game.Exit() ).

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

Right, will try to push the SDL2 Window/GLContext back a bit. One moment!

from fna-mghistory.

xanather avatar xanather commented on June 21, 2024

End users probably didn't report a problem because they didn't notice one. The program still closes (without a dialog box) and eventually stops execution.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

Well, the current system actually works fine on the 7 or so titles I have running on it, so odds are your title's explicitly making a call that it's not happy with.

Also, seems I may not be able to push it back far enough to affect anything. Just at first glance, though.

from fna-mghistory.

xanather avatar xanather commented on June 21, 2024

Discovery actually, when referencing Release versions of (SDL) MonoGame.Framework.dll no exception is thrown, while debug throws.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

Hm, not sure. Not to mention, this seems to be a generic MonoGameGLException. I'm disposing the window as late as I can (the only later time I could possibly do it is on SDL2_GamePlatform.Dispose(), which isn't guaranteed to work), so I'm wondering if there's some general GL silliness that needs to be addressed.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

Actually, found a way to resolve this, nevermind~

Committing once I confirm this with all my games, may take a sec.

from fna-mghistory.

xanather avatar xanather commented on June 21, 2024

Ok, so I traced it all the way through. The exception is not actually thrown on Game.Exit(), I followed it all the way out to the initial creation of the game and then .net tried to clean it up.

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

e6f9ddf

As long as you explicitly call Game.Dispose() (or use using (Game...)) MG-SDL2 should work with UnloadContent.

from fna-mghistory.

xanather avatar xanather commented on June 21, 2024

And.... it works now, amazing 💃 , other than TextInput I'm now ready to develop with MonoGameSDL, thanks for all the help 👍 flibitijibibo!

from fna-mghistory.

flibitijibibo avatar flibitijibibo commented on June 21, 2024

No problem! You've found some pretty shockingly bad flaws in MG-SDL2, glad we could help each other out. :)

from fna-mghistory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.