Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Host calls startMultiplayerGame() too many times, clients crash #2346

@wzdev-ci

Description

@wzdev-ci

keyword_crash resolution_fixed type_bug | by Cyp


All clients crash due to the host calling startMultiplayerGame() too many times, if the last client clicks ready too many times too fast.

Easy to reproduce in master. When trying to test why it seemed to be fixed in 3.0, I finally ended up reproducing it by clicking ready emphatically enough.

In master, complains about an unhandled NET_FIREUP, and crashes mysteriously.
In 3.0, just crashes mysteriously (but probably did get an extra NET_FIREUP).

diff --git a/src/multiint.c b/src/multiint.c
index cd244f0..386a7d0 100644
--- a/src/multiint.c
+++ b/src/multiint.c
@@ -2833,6 +2833,8 @@ static void processMultiopWidgets(UDWORD id)
 /* Start a multiplayer or skirmish game */
 void startMultiplayerGame(void)
 {
+	debug(LOG_ERROR, "startMultiplayerGame()");
+
 	decideWRF();										// set up swrf & game.map
 	bMultiPlayer = true;
 	bMultiMessages = true;

Host log: (Note extra startMultiplayerGame().)

error   |03:00:00: [PlayList_Read] PHYSFS_openRead("music/music.wpl") failed with error: File not found
error   |03:00:24: [startMultiplayerGame] startMultiplayerGame()
error   |03:00:25: [widgAddForm] widgAddForm: Could not find parent form from formID
error   |03:00:25: [widgAddForm] Assert in Warzone: ../../../lib/widget/widget.c:298 (0), last script event: 'N/A'
error   |03:00:25: [widgAddButton] widgAddButton: Could not find parent form from formID
error   |03:00:25: [widgAddButton] Assert in Warzone: ../../../lib/widget/widget.c:386 (0), last script event: 'N/A'
error   |03:00:25: [widgAddLabel] widgAddLabel: Could not find parent form from formID
error   |03:00:25: [widgAddLabel] Assert in Warzone: ../../../lib/widget/widget.c:342 (0), last script event: 'N/A'
error   |03:00:25: [startMultiplayerGame] startMultiplayerGame()
error   |03:00:25: [widgAddForm] widgAddForm: Could not find parent form from formID
error   |03:00:25: [widgAddForm] Assert in Warzone: ../../../lib/widget/widget.c:298 (0), last script event: 'N/A'
error   |03:00:25: [widgAddButton] widgAddButton: Could not find parent form from formID
error   |03:00:25: [widgAddButton] Assert in Warzone: ../../../lib/widget/widget.c:386 (0), last script event: 'N/A'
error   |03:00:25: [widgAddLabel] widgAddLabel: Could not find parent form from formID
error   |03:00:25: [widgAddLabel] Assert in Warzone: ../../../lib/widget/widget.c:342 (0), last script event: 'N/A'
error   |03:00:25: [widgAddForm] widgAddForm: Could not find parent form from formID
error   |03:00:25: [widgAddForm] Assert in Warzone: ../../../lib/widget/widget.c:298 (0), last script event: 'N/A'
error   |03:00:25: [widgAddButton] widgAddButton: Could not find parent form from formID
error   |03:00:25: [widgAddButton] Assert in Warzone: ../../../lib/widget/widget.c:386 (0), last script event: 'N/A'
error   |03:00:25: [widgAddLabel] widgAddLabel: Could not find parent form from formID
error   |03:00:25: [widgAddLabel] Assert in Warzone: ../../../lib/widget/widget.c:342 (0), last script event: 'N/A'
error   |03:00:25: [widgAddForm] widgAddForm: Could not find parent form from formID
error   |03:00:25: [widgAddForm] Assert in Warzone: ../../../lib/widget/widget.c:298 (0), last script event: 'N/A'
error   |03:00:25: [widgAddButton] widgAddButton: Could not find parent form from formID
error   |03:00:25: [widgAddButton] Assert in Warzone: ../../../lib/widget/widget.c:386 (0), last script event: 'N/A'
error   |03:00:25: [widgAddLabel] widgAddLabel: Could not find parent form from formID
error   |03:00:25: [widgAddLabel] Assert in Warzone: ../../../lib/widget/widget.c:342 (0), last script event: 'N/A'
error   |03:00:25: [widgAddForm] widgAddForm: Could not find parent form from formID
error   |03:00:25: [widgAddForm] Assert in Warzone: ../../../lib/widget/widget.c:298 (0), last script event: 'N/A'
error   |03:00:25: [widgAddButton] widgAddButton: Could not find parent form from formID
error   |03:00:25: [widgAddButton] Assert in Warzone: ../../../lib/widget/widget.c:386 (0), last script event: 'N/A'
error   |03:00:25: [widgAddLabel] widgAddLabel: Could not find parent form from formID
error   |03:00:25: [widgAddLabel] Assert in Warzone: ../../../lib/widget/widget.c:342 (0), last script event: 'N/A'
warning |03:00:26: [CheckpsMouseOverWidget] psMouseOverWidget (0x2c6eea0) has become dangling. Reseting.
info    |03:00:34: [NETrecv] Player, (player 1) seems to have dropped/disconnected.
info    |03:00:34: [NETrecv] sending NET_PLAYER_DROPPED for player 1 (invalid socket)
info    |03:00:34: [MultiPlayerLeave] ** Player 1 [Cyp], has left the game.

Issue migrated from trac:2346 at 2022-04-16 06:48:57 -0700

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions