Project

General

Profile

Bug #1954

Joining an MP game from a different game causes segfault (after version conflict)

Added by vermil almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Defect
Target version:
Start date:
2015-01-29
% Done:

100%

Tags:

Description

Attempting to join an MP game from a different game causes a seg fault in the latest unstable (1486). For instance attempting to join a Doom2 MP game while running Ultimate Doom.

Attempting to join an MP game from the same game one is currently running appears to function correctly.

This seems to be a bug that has been around a fair while.


Related issues

Related to Bug #1960: Crash when handling input events during busy modeClosed2015-02-05

Associated revisions

Revision d93e3fe3 (diff)
Added by skyjake almost 6 years ago

Fixed|UI|Multiplayer: Potential crash when joining an MP game

Synchronous signal handling (game unload, MP join) may lead to the
widget being gone when it's time to check if there's a further
action to do.

IssueID #1954

Revision 3e1527da (diff)
Added by skyjake almost 6 years ago

Fixed|Multiplayer|Client: Cleaning up client state when leaving a game

The client was not properly cleaning its state when leaving a game.
Now received packets are discarded and the postfx shader is reset to
"none".

If one was kicked from an MP game due to version conflict, the old
buffered packets caused a segfault when the client continued handling
them after connecting to a new server.

IssueID #1954
IssueID #1971

History

#1 Updated by danij almost 6 years ago

  • Category set to Defect
  • Priority changed from Normal to Urgent
  • Target version set to 49

#2 Updated by skyjake almost 6 years ago

  • Status changed from New to In Progress
  • Assignee set to skyjake

#3 Updated by skyjake almost 6 years ago

I tried this on OS X with two local servers, but it didn't trigger any problems. Next I'll have to set up suitable remote servers and try it on Windows.

BTW, were you using any resource packs in these games?

#4 Updated by skyjake almost 6 years ago

Tried local servers on Windows (without resource packs), didn't get a crash.

#5 Updated by vermil almost 6 years ago

I wasn't using any resource packs and was trying to join a non-local server.

Specifically, various ones of Kuri Kai.

It could be a version mis-match (and that causes a seg fault when one tries to join a server with a different version from a game other than the one the MP game is for).

#6 Updated by skyjake almost 6 years ago

  • Related to Bug #1960: Crash when handling input events during busy mode added

#7 Updated by skyjake almost 6 years ago

  • Subject changed from Joining an MP game from a different game to Joining an MP game from a different game causes segfault

#8 Updated by skyjake almost 6 years ago

During my Windows debugging I discovered and fixed #1960, which may have been the primary culprit here, since it was possible to trigger it also with key/mouse release events.

Needs to be tested again with Friday's build (or later). I'll keep the MP test servers running for convenience (occasionally if not all the time).

#9 Updated by skyjake almost 6 years ago

  • Status changed from In Progress to Feedback
  • Assignee changed from skyjake to vermil
  • % Done changed from 0 to 20

#10 Updated by eunbolt almost 6 years ago

Attached is the gdb output of the crash on my system using build 1500.

not a debug build

#11 Updated by eunbolt almost 6 years ago

the above gdb output is the server and the client on the local machine, so both are build 1500.(not the nz/au servers)

vermil's test from above are most likely to the nz/au. whcich he is correct that they are version mismatches as they are the latest stable build

#12 Updated by skyjake almost 6 years ago

That does show a crash occurring, however without debug symbols it doesn't help much. Any chance you could do a debug build? That would be extremely helpful.

I'll try local servers on Linux myself and see if I can reproduce it.

#13 Updated by eunbolt almost 6 years ago

attached is from a 1500build that had debug as an option

config_user.pri contained

CONFIG += deng_extassimp
CONFIG += deng_debug
PREFIX=/opt/deng1500

#14 Updated by eunbolt almost 6 years ago

attached now is the output from a debug build

config_user.pri contained

CONFIG += deng_extassimp
CONFIG += deng_debug
PREFIX=/opt/deng1500

#15 Updated by skyjake almost 6 years ago

From the .2 log:

Reading symbols from doomsday...(no debugging symbols found)...done.
Executable: Doomsday Engine 1.15.0 (Unstable 64-bit) Feb 9 2015 18:18:11

Did you rerun qmake after modifying config_user.pri and do a clean rebuild? This should say "Unstable 64-bit +D +R", and gdb should be finding debug symbols.

CONFIG+=deng_debug

This should be just "CONFIG+=debug".

#16 Updated by eunbolt almost 6 years ago

ok, here is debug build output

#17 Updated by eunbolt almost 6 years ago

debug build output uploaded

#18 Updated by skyjake almost 6 years ago

Thanks! That indicates the crash is caused by the UI widget, I'll look into it.

#19 Updated by skyjake almost 6 years ago

  • Status changed from Feedback to In Progress
  • Assignee changed from vermil to skyjake
  • % Done changed from 20 to 40

#20 Updated by skyjake almost 6 years ago

I've fixed the likely cause of the crash in the UI widget. A new build will be available later today for testing.

#21 Updated by skyjake almost 6 years ago

  • % Done changed from 40 to 80

#22 Updated by skyjake almost 6 years ago

I discovered and fixed another crash. Just as vermil suggested, first having a version conflict with a server and then joining another was causing invalid network packets to be buffered on the client. I've now fixed this for the next build (not in 1502).

#23 Updated by skyjake almost 6 years ago

  • Subject changed from Joining an MP game from a different game causes segfault to Joining an MP game from a different game causes segfault (after version conflict)

#24 Updated by skyjake almost 6 years ago

  • Target version changed from 49 to 1.15

#25 Updated by skyjake almost 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Also available in: Atom PDF