Project

General

Profile

Actions

Emulator Issues #9526

closed

Race conditions in netplay

Added by Summate over 8 years ago. Updated over 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

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

Description

The netplay functionality has one or more latent race conditions associated with sharing resources between the main thread and netplay thread(s). This used to manifest consistently when traversal became inaccessible during emulation - the messagebox routine would block and if the user did not click it quickly enough, it caused a crash.

I've submitted a pull request that should more or less take care of the messagebox routine during netplay, however, the latent race condition will be completely unaffected by this. The crashes resulting from it should be reduced in frequency.

It's not really a good idea to run PanicAlertT in constructor code as it may do things like block. My preference would be to throw an exception to indicate a failure and propagate the failure up to a level where it can be handled appropriately. In lieu of that, the design of the core code should account for the fact that the function may fail and it should be moved out of the constructor and placed into the API in some way. Whether that be a TryConnect function or something to that effect.

Actions

Also available in: Atom PDF