Project

General

Profile

Actions

Emulator Issues #6511

closed

Netplay Crashes on client window close as of the addition of window closing stopping the game

Added by JMC4789 over 11 years ago.

Status:
Fixed
Priority:
High
Assignee:
Category:
Netplay
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

This happens on all games, and only happens when you play across the internet. Playing locally, it doesn't seem to have a problem.

The emulator completely crashes for the host on game window close as of r1c74e412e2385631f501a97d770a009a68e7ed6f

Plus, it removes the capability for spectator hosts to close the window and reduce the load dolphin puts on their computer when hosting for players who couldn't host. I'm sure there was going to be a functionality over it eventually, but right now the change just makes everything worse.

Confirmed by four people in the melee netplay group, and myself. Viva la Stop Button.

Actions #1

Updated by MayImilae over 11 years ago

  • Category set to netplay
Actions #2

Updated by JMC4789 over 11 years ago

  • Status changed from New to Accepted

Now that I found a way to reproduce it with everyone, I can confirm this. The crash specifically happens when the client (who somehow didn't tell me this after I made the original issue) close their windows first. Then if the host tries to close/stop the game, they completely crash. Thus, it's user error, but this is something that didn't happen prior to the removal of the stop button.

Basically: Clients need to be able to close the window without killing the game.
Secondly: Hosts lost the ability to close the window and let clients play as of the change as well.

Actions #3

Updated by delroth over 11 years ago

  • Regression set to Yes
  • Milestone set to Current
  • Priority set to High

Jasper, sounds like a regression from your changes. Please fix or unassign owner if you can't work on it.

Actions #4

Updated by delroth over 11 years ago

Ping? Cc-ing RachelB since she might be interested in working on this.

Actions #5

Updated by magcius over 11 years ago

Let me explain what's going on with this one.

When a client closes their window, we don't remove them from the pad mapping, and thus what happens is the rest of the clients hang waiting for NetPlay input that will never come.

While we should be more resilient towards a rogue client not sending us any input, since it could happen due to network failures (implementing a timeout after which we drop a client, for instance), a quick fix would be to send a LEAVE_GAME packet after when the client stops their game, and we'd remove them from the pad mapping.

There is a UI issue with this though -- if a client stops their emulation, they can't start it again afterwards (since we don't send savestates over), but they're still connected to the server. So if a client stops their emulation by accident, they're fucked.

Actions #6

Updated by JMC4789 over 11 years ago

Easy fix: Implement starting from savestate, amirite?

But, What happened before was that if a client closed their netplay window, it just stayed closed. The only time it crashed is if they disconnected from teh server while the game was still running. If we went back to that, at least it'd be something.

Actions #7

Updated by rachelbryk over 11 years ago

Why don't we just stop everyone if anyone with a pad mapped stops emulation?

Actions #8

Updated by JMC4789 over 11 years ago

IF that lets spectators leave, close out netplay entirely, I'm good with this change. Right now if a spectator leaves it usually freezes netplay (Maybe not since Jasper's pad changes?)

If ANY player could stop the netplay game, I think that's better than it crashing, or letting them leave at this point. Adding savestate support/continue/anything else can be a separate issue.

Actions #9

Updated by magcius over 11 years ago

Yeah, sounds good to me. I tried to start this, but the flow that happens when stopping emulation is so convoluted that I gave up.

Actions #10

Updated by rachelbryk over 11 years ago

Eh? Can't we just do exactly what happens when the host stops emulation currently?

Actions #11

Updated by rachelbryk over 11 years ago

http://code.google.com/p/dolphin-emu/source/detail?r=cea7737aefa2afc6083a14f404c807dc2add894f&name=netplay-stop-fix

Works for me. Fixes the crash, stops netplay when anyone with a pad mapped stops emulation, and allows spectator hosts to stop emulation without anyone else being affected. Please test it.

Actions #12

Updated by rachelbryk over 11 years ago

  • Status changed from Accepted to Fixed

This issue was closed by revision 3ff81c919922.

Actions #13

Updated by rachelbryk over 11 years ago

This issue was closed by revision 3ff81c919922.

Actions

Also available in: Atom PDF