Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000945Zandronum[All Projects] Bugpublic2012-07-31 16:382018-09-30 19:51
ReporterZalewa 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPCOSLinux&WindowsOS Version
Product Version1.0-beta 
Target VersionFixed in Version1.0 
Summary0000945: Random Number Generator compatflag freezes the server
DescriptionWhen the "Old random number generator" compat flag (compatflags=8) is enabled and there are monsters on the map then the server will hang up as soon as the first player joins.

1. The game client will keep displaying "Authenticating level..." message.
2. The server will stop accepting any commands.

If monsters are disabled then everything works fine.

Tested on build 120729-1356.
Happens both on Linux and Windows.
Steps To Reproduce1. Host a cooperative game of Doom2 by using the following command line:
zandronum.exe -host -iwad doom2.wad +compatflags2 8
2. Try to join the server.
Attached Files

- Relationships
related to 0000770closedTorr Samaho Raising player cap (to 64 or 255) 

-  Notes
User avatar (0004161)
Edward-san (developer)
2012-07-31 18:31

Is that version the only one with such problem? what about the previous betas?
User avatar (0004164)
Zalewa (developer)
2012-07-31 19:05

The build mentioned in the report is the only one where the server freezes. All other builds seem to work properly.
User avatar (0004167)
Torr Samaho (administrator)
2012-07-31 19:30
edited on: 2012-07-31 19:30

Quote from Zalewa
The build mentioned in the report is the only one where the server freezes. All other builds seem to work properly.

In that case I'm pretty sure this has to be caused by the increased player limit. I'll investigate.

User avatar (0004168)
Torr Samaho (administrator)
2012-07-31 19:47
edited on: 2012-07-31 19:49

This one shows how horrible the old random number generator is: (Carn's version of) P_LookForPlayers used it to randomly iterate over all players. Since the generator simply never generates some of the numbers between 0 and 255, P_LookForPlayers never finishes to cover all 64 players but loops forever.

This should fix the issue.

User avatar (0004177)
Zalewa (developer)
2012-08-01 16:35

Seems to work.
User avatar (0004300)
AlexMax (developer)
2012-08-07 12:34

Would it be possible to rewrite P_LookForPlayers() to treat the list of players like a shuffled deck (take a list of player ids, shuffle them, then rip through them linearly) instead of relying on the PRNG to hit every number? The latter seems like bad design to me...even with a decent PRNG the function finishes in unpredictable time.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2012-07-31 16:38 Zalewa New Issue
2012-07-31 16:39 Zalewa Description Updated View Revisions
2012-07-31 16:39 Zalewa Steps to Reproduce Updated View Revisions
2012-07-31 16:39 Zalewa Steps to Reproduce Updated View Revisions
2012-07-31 16:41 Zalewa Description Updated View Revisions
2012-07-31 18:31 Edward-san Note Added: 0004161
2012-07-31 19:05 Zalewa Note Added: 0004164
2012-07-31 19:30 Torr Samaho Note Added: 0004167
2012-07-31 19:30 Torr Samaho Assigned To => Torr Samaho
2012-07-31 19:30 Torr Samaho Status new => assigned
2012-07-31 19:30 Torr Samaho Note Edited: 0004167 View Revisions
2012-07-31 19:30 Torr Samaho Note Revision Dropped: 4167: 0002277
2012-07-31 19:47 Torr Samaho Note Added: 0004168
2012-07-31 19:49 Torr Samaho Note Edited: 0004168 View Revisions
2012-08-01 16:35 Zalewa Note Added: 0004177
2012-08-02 19:28 Torr Samaho Relationship added child of 0000770
2012-08-02 19:31 Torr Samaho Relationship deleted child of 0000770
2012-08-02 19:31 Torr Samaho Relationship added related to 0000770
2012-08-02 19:46 Torr Samaho Status assigned => resolved
2012-08-02 19:46 Torr Samaho Fixed in Version => 1.0
2012-08-02 19:46 Torr Samaho Resolution open => fixed
2012-08-07 12:31 Dusk Status resolved => feedback
2012-08-07 12:31 Dusk Resolution fixed => reopened
2012-08-07 12:34 AlexMax Note Added: 0004300
2015-09-06 17:22 Dusk Status feedback => resolved
2015-09-06 17:22 Dusk Resolution reopened => fixed
2018-09-30 19:51 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker