leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
275 stars 52 forks source link

Exit in-game menu item does not exit in Linux #504

Open Talkless opened 4 years ago

Talkless commented 4 years ago

Description

I've just installed v1.7.1.8 deb (from website), and noticed that I cannot normally quit game (have to ctrl-c form terminal). Exit in-game menu item does not exit game. Video stops (same last frame), background audio still plays, but nothing else happens.

Reproduction

Launch OpenBVE on linux (with any track), click Esc key, select Exit.

Route

Any route

Train

Any train

Logs

Nothing interesting in console output.

Related information

leezer3 commented 4 years ago

Short answer is that this seems to be highly distribution / desktop environment / Mono version dependant.

I know the Jessie / XCFE VM I've got here quits OK, will have to spin up Sid and see if I can trigger anything.

danfe commented 3 years ago

I know the Jessie / XCFE VM I've got here quits OK

Same here with the latest version 1.7.2.0 on FreeBSD and IceWM (quits OK). It doesn't quit gracefully if I close the window via [x] or press Alt-F4, but in-game exit (Ctrl-Q) works fine.

leezer3 commented 3 years ago

Now that's interesting actually: https://github.com/leezer3/OpenBVE/blob/master/source/OpenBVE/System/GameWindow.cs#L417

In those circumstances, we very deliberately force-kill the process. I still can't reproduce the closing issues here, but we might want to extend that to everything.

IIRC when we last had this reported, it only failed to close under those specific circumstances. What I'd really like to find out though is what's actually hanging around. My best guess is that it's something in the OpenTK library, but dunno....