Project

General

Profile

Actions

Emulator Issues #9526

closed

Race conditions in netplay

Added by Summate almost 8 years ago. Updated over 6 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 #1

Updated by Aestek almost 8 years ago

This PanicAlert is gone now and logs to the chat box instead.

Actions #2

Updated by JMC4789 over 6 years ago

  • Status changed from New to Fixed

I think that means it's fixed.

Actions

Also available in: Atom PDF