App "has stopped working" on windows 7 on exiting

MG application pop up windows message “has stopped working” on Windows 7 upon exiting, but not on Windows 10, exited the application on Windows w/o a problem. Any clue why is this happening on Windows 7 only?

Is this with a develop version of MonoGame? And what project type?

Hello Jjagg,

It’s a windows Project, Debug, x86, MG Framework Ver 3.6.0.1625 :weary:

Sir Jjagg if may I inquire, any development on bugs the update stopping when dragging the windows application bar ?

Thanks ^ _^ y

Could you try a develop build?

No need to flatter me :stuck_out_tongue:
No developments so far. You can track this issue for updates.

1 Like

Nyaha no flattering intended, can’t break the habit from the office :stuck_out_tongue:

[Froze update while pressing windows tittle bar]

ATM, I have a simple solution a separate thread for updating my network game state if MG-update is not updating due whatever reason pressing tittle-bar or resizing, it is now in synch even after releasing mouse button on tittle bar :smile: I preferred this solution rather sending full state on lag players. Thread within MG application will run parallel even MG update is not calling, nice…

1 Like

Glad you at least got a nice workaround :slight_smile: Also, I’d hate to work in such a formal setting :confused:

1 Like

I used to see this a lot, in Program.cs make sure you wrap the game object in a using statement:

using (var game = new Game1()) { game.Run(); }

This begs the question though… Microsoft stopped supporting win7 years ago. It might not be a bad idea to follow their lead :wink:

Steam hardware survey says Windows 7 is still the most popular OS with over 65% usage. Also, it’s very little effort to keep supporting, it just requires users to use an old enough .NET version.

Using blocks is just an implementation of IDisposable automagically

using (var game = new Game1())
{
game.Run();
}

Same banana :

var game = new Game1()
game.Run();
if( game!=null ) { game.Dispose(); game = null; }

Same banana :

var game = new Game1();
try
{
game.Run();
}
finally
{
if (game != null)
{
game.Dispose();
game = null;
}
}

IMHO it’s not cool releasing a game or any application for Windows Desktop stated for Windows 10 only , it should support at least 7,8,10 for the application developed today.

Ok yeah, I didn’t realize so many Steam users were still on win7 :confused:

yes, thank you, I know what a using statement is. My point was that if you don’t dispose of the Game object by the end of the Main() method in your game, it can cause the exact “has stopped working” problem you are seeing. If you are cleaning up the game object correctly and still seeing the problem, then it is probably some other issue.

Cheers!

1 Like

I think a lot of Chinese people are still using Windows 7. According to the Steam survey over 60% of Steam users have Simplified Chinese as their language (large influx due to PUBG). Here’s the link for anyone interested in the numbers: http://store.steampowered.com/hwsurvey/