Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Exit() not working when using Song in Cross platform project

$
0
0

@nicolas.mdx wrote:

Hi,

I think I've encountered what could be a bug with Exit() in some projects.
Monogame version : 3.8.0.330

How to reproduce it:

Create a cross platform desktop project.
Create a Song:

Song music;

Then, in LoadContent, load it :

music = Content.Load<Song>("cool");

Compile and run project.
Hit Escape.
The window closes, but the process goes on running (need to kill it or stop it from VS interface).

If you do the same with a Windows project, the problem is not present.

Workaround : use Environment.Exit(0) instead of Exit(). But I don't know if it's a good way to properly exit the program.

Nicolas

EDIT : Environment.Exit(0) is not a clean workaround since the program exists with a warning:
AL lib: (EE) alc_cleanup: 1 device not closed

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles