Ticket #42924

Fixes for regression bugs or other issues

Date d'ouverture: 2021-09-26 04:23 Dernière mise à jour: 2021-11-28 11:07

Rapporteur:
(Anonyme)
Propriétaire:
(Aucun)
Type:
État:
Atteints
Composant:
(Aucun)
Jalon:
(Aucun)
Priorité:
7
Sévérité:
5 - moyen
Résolution:
Aucun
Fichier:
43

Détails

As we're set to release another official beta of 3.1, this is where any fixes for regression bugs or other issues will go if they're found.

Ticket History (3/91 Histories)

2021-09-26 04:23 Updated by: None
  • New Ticket "Fixes for regression bugs or other issues" created
2021-09-26 23:38 Updated by: torr_samaho
Commentaire

Quick question on 10567: Did you test that the "-1" part of the following construction really works? GAMEMODE_e newmode = static_cast<GAMEMODE_e>( GetValueGAMEMODE_e( name )); // AK No need to change the game mode if it's invalid or if we're already playing it. if (( newmode == -1 ) || ( newmode == oldmode )) return 0; While GetValueGAMEMODE_e can return an int with value -1, -1 does not seem to be a valid value for the type GAMEMODE_e. So I'm not sure what static_cast<GAMEMODE_e> will do with such a -1. To be on the save side, you could check if GetValueGAMEMODE_e returned -1. If that's the case, return otherwise cast the returned value to GAMEMODE_e.

2021-09-27 00:30 Updated by: akmdm
Commentaire

Reply To torr_samaho

Quick question on 10567: Did you test that the "-1" part of the following construction really works? GAMEMODE_e newmode = static_cast<GAMEMODE_e>( GetValueGAMEMODE_e( name )); // AK No need to change the game mode if it's invalid or if we're already playing it. if (( newmode == -1 ) || ( newmode == oldmode )) return 0; While GetValueGAMEMODE_e can return an int with value -1, -1 does not seem to be a valid value for the type GAMEMODE_e. So I'm not sure what static_cast<GAMEMODE_e> will do with such a -1. To be on the save side, you could check if GetValueGAMEMODE_e returned -1. If that's the case, return otherwise cast the returned value to GAMEMODE_e.

I did test if it would work (tried passing fake or invalid game mode names into SetCurrentGamemode) and the return value would always be '0'. If I passed a valid game mode name into the function which wasn't already the current game mode, then it would return '1'. In any case, I re-uploaded 10567 which guarantees that the logic above always works without creating undefined behaviour.

2021-09-27 02:00 Updated by: akmdm
Commentaire

I made some improvements to the "GameSettings" and "LockedGameSettings" features in GAMEMODE (10569-10572). Most notably, I added "DefaultGameSettings" and "DefaultLockedGameSettings" blocks which enables/disables flags across all game modes. This is useful for mods that are played on more than one game mode and require the same flags to be on or off universally.

2021-09-27 04:38 Updated by: torr_samaho
Commentaire

Thanks for the new patches and the updates to them! They should be all in our main repo now.

2021-10-04 02:17 Updated by: akmdm
Commentaire

I added a bunch of new patches (inside "Patches - 2021 10 03.zip"), based on some of the testing and feedback we got last week. Most notably, I fixed serverinfo CVars that were entered on the command line not being applied properly, and fixed the scoreboard not displaying all the columns properly.

2021-10-04 04:48 Updated by: torr_samaho
Commentaire

Thanks for the new patches! I added all except for 10578 and 10580, as we just discussed on IRC.

2021-10-04 04:57 Updated by: torr_samaho
Commentaire

Thanks for the updated patches! I added both of them.

2021-10-10 21:12 Updated by: akmdm
Commentaire

I uploaded a bunch of new patches from this week, addressing some of the issues encountered during testing. I will have more patches to upload later today.

EDIT: 10588 doesn't respect lms_spectatorchat though it's acceptable anyways. The private message was intended for the server host, not specifically for the RCON client. The RCON client only receives these messages so they can communicate with players who privately message the server more effectively, and the players usually don't know who has RCON access.

EDIT 2: There's been some reports about people getting low FPS in 3.1. I think I recall that on my old PC, I got lower FPS in some cases than I normally would in 3.0. I'm a little suspicious that this commit: http://hg.osdn.net/view/zandronum/zandronum-stable/rev/ea2f3cf2ebc6 might be the cause, but would like to check it out more just to be sure.

(Edited, 2021-10-10 21:32 Updated by: akmdm)
2021-10-17 14:39 Updated by: akmdm
Commentaire

From the discussion we had during our last meeting, I touched up on the private chat mode so that spectators cannot send private messages to the server while the chat is restricted. It doesn't seem important to restrict the private message when the server is sending to a spectator, though.

2021-10-18 04:26 Updated by: torr_samaho
Commentaire

Thanks! I added the new patches.

2021-10-24 03:02 Updated by: akmdm
Commentaire

Due to not many people understanding how the private chat mode works, I added a message that tells the user how to change the player they want to send a private message to, if they're in the middle of typing one. This only appears if there's at least one other valid player to send the message to (i.e. no bots or the server).

2021-10-24 20:24 Updated by: torr_samaho
Commentaire

Thanks for the new patches! I checked and added all four of them.

2021-10-26 23:59 Updated by: akmdm
Commentaire

I just got a bug report from someone saying that they had issues logging into RCON remotely in 211024-2022:

https://media.discordapp.net/attachments/879280566879535104/902508233107841094/unknown.png

https://media.discordapp.net/attachments/879280566879535104/902540477910351922/ure.PNG?width=1022&height=676

I did a bisect and https://osdn.net/projects/zandronum/scm/hg/zandronum-stable/commits/11401a91efa1429d815b0d3bc0fdc93c9dae1bb4 is the culprit. Apparently, adding CLC_WEAPONSELECTBACKUP (52) is problematic because CLRC_BEGINCONNECTION is also equal to 52, and now NUM_CLIENT_COMMANDS is equal to 53. This creates a conflict in SERVER_DetermineConnectionType, on line 1696 in sv_main.cpp: if (( lCommand >= CLC_USERINFO ) && ( lCommand < NUM_CLIENT_COMMANDS )) return;

As a very temporary solution, I tried reducing the number of client commands by merging the client commands CLC_VOTEYES and CLC_VOTENO into a single command. This means the client now has to send an extra byte telling the server whether they voted yes or no on the current vote, but these commands are sent rarely enough that it's almost negligible. At least, it drops NUM_CLIENT_COMMANDS back to 52 and fixes the issue for now. However, it's not a permanent solution in the long run.

Changing CLRC_BEGINCONNECTION to a higher number isn't feasible at this time, and we'd also risk breaking compatibility with lots of RCON utilities like Doomseeker's or Doom Explorer's unless they somehow updated theirs immediately.

EDIT: I uploaded 10630.patch which combines the two vote commands together. If it gets pushed, I suggest that we release another beta right away just because I think this a major issue that needs to be addressed. I can add an update to the announcement I posted on the forums to indicate this.

(Edited, 2021-10-27 00:06 Updated by: akmdm)
2021-10-27 05:03 Updated by: torr_samaho
Commentaire

10630 is a good solution for this problem. I agree that the increased net traffic for voting is negligible, pushed the patch to our repo and uploaded new win32 binaries to the mediafire folder. Feel free to release a new beta with this. Thanks for fixing this so quickly!

2021-10-27 05:06 Updated by: akmdm
Commentaire

Reply To torr_samaho

10630 is a good solution for this problem. I agree that the increased net traffic for voting is negligible, pushed the patch to our repo and uploaded new win32 binaries to the mediafire folder. Feel free to release a new beta with this. Thanks for fixing this so quickly!

Thanks for sending the new builds! I'll upload them when I come home tonight.

2021-10-31 14:30 Updated by: akmdm
  • File Patches - 2021 10 31.zip (File ID: 7852) is attached
2021-10-31 14:35 Updated by: akmdm
Commentaire

I added a bunch of new patches (inside "Patches - 2021 10 31.zip") from this week.

2021-10-31 21:52 Updated by: akmdm
  • File 10645.patch (File ID: 7858) is attached
2021-10-31 22:22 Updated by: akmdm
  • File Patches - 2021 10 31.zip (File ID: 7852) is deleted
2021-10-31 22:23 Updated by: akmdm
  • File 10645.patch (File ID: 7858) is deleted
2021-11-01 00:35 Updated by: torr_samaho
Commentaire

Thanks for the new stack of patches! I reviewed and added all of them.

2021-11-01 23:33 Updated by: akmdm
Commentaire

I thought about 10647 again, and I think it's still reasonable to allow modders to revive dead spectators if the game is waiting for players or in the countdown sequence should any exist in these states (e.g. setting a player to dead spectators in a 1v1 deathmatch game, then reviving them shortly after). Dead spectators aren't meant to exist in these states, so reviving them before the game starts still follows the original approach. This function still doesn't work during the results sequence.

I updated the patch as 10647_v2 and uploaded a new patch: 10648 which fixes a "connection interrupted" issue that occurred when newly connected players didn't start as spectators.

(Edited, 2021-11-01 23:40 Updated by: akmdm)
2021-11-07 22:56 Updated by: akmdm
Commentaire

In addition to 10647_v2.patch and 10648.patch, I got a bunch of new patches ready. For the private chat mode, I was concerned about players on opposing teams being able to send private messages to each other and potentially cheating, so I replaced sv_noprivatechat with a new CVar sv_allowprivatechat.

If the latter is set to 2, then in-game players are only allowed to send private messages to their teammates. They will not be able to send private messages to the server either, again, to avoid potential cheating. However, true spectators are allowed to send private messages to the server or other true spectators.

2021-11-07 23:04 Updated by: akmdm
Commentaire

On second thought, still letting true spectators be able to chat with the server while sv_allowprivatechat is set to 2 is just as bad as letting the in-game players do the same. I updated 10657 so now true spectators can only private chat with other true spectators in this case, meaning nobody can send private messages to the server.

(Edited, 2021-11-07 23:05 Updated by: akmdm)
2021-11-07 23:50 Updated by: torr_samaho
Commentaire

Thanks for the new patches! I'm going through them and will post comments here as I go.

10657_v2: I'd say the function name CHAT_CanSendPrivateChatToTeammate is misleading, since this function is also used when ulSender and ulReceiver are no team mates, but can still return true in that case.

2021-11-08 00:28 Updated by: akmdm
Commentaire

Thanks for reviewing and pushing many of these patches already.

Reply To torr_samaho

10657_v2: I'd say the function name CHAT_CanSendPrivateChatToTeammate is misleading, since this function is also used when ulSender and ulReceiver are no team mates, but can still return true in that case.

I uploaded 10657_v3, renaming CHAT_CanSendPrivateChatToTeammate to CHAT_CanSendPrivateMessageTo, which should more self-explanatory. Is there anything that I should know about regarding 10654 (appending limit strings on the scoreboard)?

2021-11-08 00:49 Updated by: torr_samaho
Commentaire

Thanks for the updated patch! I added it.

Regarding 10654, I started to look at this, but scoreboard_AppendLimit is somewhat confusing. Its comment says // AK Checks if we can append this limit string to the previous one., but this doesn't seem to be what the function is actually doing. It only checks whether "lines" is not empty and then removes the last line from list of lines and prepends that to the FString limit.

2021-11-08 01:55 Updated by: akmdm
Commentaire

Reply To torr_samaho

Thanks for the updated patch! I added it. Regarding 10654, I started to look at this, but scoreboard_AppendLimit is somewhat confusing. Its comment says // AK Checks if we can append this limit string to the previous one., but this doesn't seem to be what the function is actually doing. It only checks whether "lines" is not empty and then removes the last line from list of lines and prepends that to the FString limit.

Thanks for the comment. I updated 10654 to better reflect what the code actually does, "prepend" seems like a better word to choose instead of "append" in this case. I also uploaded a new patch: 10661.patch.

2021-11-14 15:49 Updated by: akmdm
Commentaire

I uploaded a new round of patches, including a new executable icon to celebrate 3.1's eventual release.

2021-11-16 00:45 Updated by: akmdm
Commentaire

I uploaded the updated patches, as well as a couple of extra patches. I fixed the server sending SERVERINFO or SENSITIVESERVERSETTING CVars to clients who don't have RCON access and implemented sector reconciliation with the backtrace.

For implementing the sector reconciliation, because the unlagged only stores up to 35 tics of position data in the past, I decided that a backtrace should also not be performed if the player was extrapolated 35 tics ago or more, so this way it won't get messed up. Furthermore, reconciling the sectors means that I don't have to save the player's floorsector or floor height (i.e. floorHeight = player->mo->z - pFloorSector->floorplane.ZatPoint( player->mo->x, player->mo->y) anymore, so that simplifies the code a bit. :)

I tried finding Medicris, but unfortunately it doesn't look like he's active anywhere (the last message he posted on the Zandronum forums was over three years ago), so I made sure to give him proper credit in zandronum-history.txt and the commit log message. It looks like his icon (or something very similar) is already used as an emoji on the official Zandronum Discord server, so maybe we're okay to use it here too?

If all six patches get pushed into the main repo, then I'd say we're ready to release the next beta. Thanks again, and have a great week!

EDIT: I added another patch, 10687, which allows SetPlayerClass to assign random classes to players.

(Edited, 2021-11-16 02:07 Updated by: akmdm)
2021-11-16 04:11 Updated by: torr_samaho
Commentaire

Thanks for the new patches!

Quick question on 10681: Could the problem of AdminClientIterator be that ClientIterator::isCurrentValid is not virtual?

2021-11-16 04:20 Updated by: akmdm
Commentaire

Reply To torr_samaho

Thanks for the new patches! Quick question on 10681: Could the problem of AdminClientIterator be that ClientIterator::isCurrentValid is not virtual?

I didn't check to see if making it virtual will fix the problem. Unfortunately I'm not home right now, so I can't test it out.

2021-11-16 04:26 Updated by: torr_samaho
Commentaire

No problem. It's not urgent.

Question on 10684: server_PerformBacktrace seems to change pClient->OldData (since it uses ++pClient->OldData->ulSavedGametic). Wouldn't it be safer to replace unlaggedIndex = ++pClient->OldData->ulSavedGametic % UNLAGGEDTICS; with ++unlaggedIndex;? I think this would also be easier to read.

2021-11-16 04:30 Updated by: akmdm
Commentaire

Reply To torr_samaho

No problem. It's not urgent. Question on 10684: server_PerformBacktrace seems to change pClient->OldData (since it uses ++pClient->OldData->ulSavedGametic). Wouldn't it be safer to replace unlaggedIndex = ++pClient->OldData->ulSavedGametic % UNLAGGEDTICS; with ++unlaggedIndex;? I think this would also be easier to read.

I think so too. The modulus operation should still be kept so that the index can't go out of bounds.

2021-11-16 04:40 Updated by: torr_samaho
Commentaire

Yeah, right. The modulus needs to be kept, so I guess you wouldn't use ++, but unlaggedIndex = (unlaggedIndex +1) % UNLAGGEDTICS;.

2021-11-16 04:49 Updated by: akmdm
Commentaire

If it's okay with you, would you be able to amend that change into 10684?

2021-11-16 07:23 Updated by: torr_samaho
Commentaire

Sorry, while it would be no problem to amend the patch, I won't have time for any testing and don't want to push completely untested code to our repo.

2021-11-16 09:43 Updated by: akmdm
Commentaire

That's perfectly fine. I'll update the patches whenever I can and re-upload them when ready.

2021-11-16 15:35 Updated by: akmdm
Commentaire

Turning ClientIterator::isCurrentValid into a virtual function didn't solve the problem. Could it have something to do with the constructors of both classes, despite ClientIterator's constructor consisting of optional parameters?

(Edited, 2021-11-16 15:36 Updated by: akmdm)
2021-11-17 00:06 Updated by: akmdm
Commentaire

Right, so when a AdminClientIterator object gets created, ClientIterator::ClientIterator executes incremntCurrentTillValid which then executes ClientIterator::isCurrentValid, not AdminClientIterator::isCurrentValid, because the derived object hasn't been created yet at this point. I don't I can fix this problem without compromising ClientIterator, creating a default constructor for the derived class won't work because the base class's members are private. But is it really important? All AdminClientIterator does extra is check if SERVER_GetClient( **this )->bRCONAccess is true and is only used in SERVERCOMMANDS_SyncCVarToAdmins.

2021-11-17 02:15 Updated by: akmdm
Commentaire

I uploaded the updated patches (except 10681 and 10682). I had to make another small change with 10684 so that a player's z-position is properly corrected after a backtrace is performed. I also decided to reuse 10679 so that the backtrace still fails if a player activated any specials during extrapolation, but removed the "tricky" part out. I won't be able to update these patches again today, unfortunately.

2021-11-17 05:28 Updated by: torr_samaho
Commentaire

I don't I can fix this problem without compromising ClientIterator, creating a default constructor for the derived class won't work because the base class's members are private. But is it really important?

No, the important thing was to understand why this doesn't work. So the actual increment works when the virtual is added, but the initial element is not valid because of the problem you found. One could make ClientIterator::incremntCurrentTillValid protected and also call it in the derived class constructor, but we can just use your existing patch as is. I'll push that.

2021-11-17 05:51 Updated by: torr_samaho
Commentaire

The patches look all good. I added all of them to our repo. Feel free to make a new beta release if everything is in now that you'd like to have.

2021-11-21 14:18 Updated by: akmdm
Commentaire

I uploaded another round of patches. I got some feedback from some competitive players who expressed their dislike for the mouse movement in 3.1 even after changing the value of smooth_mouse. Therefore, I added a new CVar cl_useskulltagmouse which restores the mouse movement as it felt in 3.0 and earlier. After testing a build with this option enabled (both offline and online), they were satisfied with the change. I reckon there are more people out there who might prefer the old mouse, so it would be safe to have the option around. The rest of the patches are general bug fixes and other minor additions.

2021-11-21 19:12 Updated by: torr_samaho
Commentaire

Thanks for the new patches! Quick comment on 10710: The two added !cl_useskulltagmouse in d_main.cpp are in ZDoom code, aren't they? If so, they are still missing a comment with your initials.

2021-11-21 22:14 Updated by: akmdm
Commentaire

Right, I should've added comments in those places too. I uploaded 10710_v2.patch to correct this.

2021-11-28 11:07 Updated by: akmdm
  • État Update from Ouvert to Atteints
Commentaire

I'm going to close this ticket because it's getting too long and there's too many attachments to keep track of. Any new patches will be uploaded on a new ticket.

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion