TTT2 icon indicating copy to clipboard operation
TTT2 copied to clipboard

Scoreboard stuck, creating errors

Open vinhill opened this issue 1 year ago • 7 comments

Your version of TTT2

Workshop version v0.13.2b

Describe the bug

Similar to #1292

After the round ended, multiple clients experienced a scoreboard that does not close. It does not always appear and thus is hard to state the specific circumstances. Only a re-connect or map change resolves the issue. Until a new round starts, names are empty and too few players are listed on the scoreboard.

Context

  • Collection link of your Server: https://steamcommunity.com/sharedfiles/filedetails/?id=3034370711
  • Additional addons: https://github.com/vinhill/TTTStats/blob/main/sv_custom_console_print.lua

Server Errors

During startup

L 04/09/2024 - 20:51:15: Lua Error: bad argument #3 to hook.Add (function expected, got nil)
stack traceback:
	lua/terrortown/autorun/server/sv_spec_dop_roles.lua:247: in main chunk
	[C]: in function 'include'
	lua/ttt2/libraries/fileloader.lua:91: in function 'LoadFolder'
	gamemodes/terrortown/gamemode/server/sv_main.lua:304: in main chunk
	[C]: in function 'include'
	gamemodes/terrortown/gamemode/shared/sh_include.lua:218: in function 'ttt_include'
	gamemodes/terrortown/gamemode/init.lua:5: in main chunk

During game round

[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589
[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:89: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:89
[[ArcCW] Arctic's Customizable Weapons (Base)] lua/arccw/client/cl_ttt.lua:71: bad argument #1 to 'band' (number expected, got nil)
  1. band - [C]:-1
   2. unknown - lua/arccw/client/cl_ttt.lua:71
    3. Run - lua/dlib/modules/hook.lua:904
     4. PreprocSearch - lua/ttt2/libraries/bodysearch.lua:987
      5. UpdatePlayerData - gamemodes/terrortown/gamemode/client/vgui/cl_sb_info.lua:118
       6. SetPlayer - gamemodes/terrortown/gamemode/client/vgui/cl_sb_info.lua:31
        7. SetPlayer - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:328
         8. AddPlayerRow - gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:125
          9. UpdateScoreboard - gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua:537
           10. Init - gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua:246
            11. Create - lua/dlib/luabridge/luabridge.lua:223
             12. unknown - lua/dlib/luabridge/luabridge.lua:249
              13. ProtectedCall - [C]:-1
               14. Create - lua/dl[vinno|2|STEAM_0:0:97283690] Lua Error:

Client errors

The three from TTT2 above, the ArcCW error above with varying call-stacks, the following

[DLib] Cannot create panel "TTTScoreboard"! Look for errors above
stack traceback:
	lua/dlib/luabridge/luabridge.lua:256: in function 'Create'
	gamemodes/terrortown/gamemode/client/cl_scoreboard.lua:27: in function 'ScoreboardCreate'
	gamemodes/terrortown/gamemode/client/cl_scoreboard.lua:40: in function <gamemodes/terrortown/gamemode/client/cl_scoreboard.lua:36>
[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/cl_scoreboard.lua:45: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/cl_scoreboard.lua:45

Screenshots

In the following, the scoreboard is expected to not be shown. Tab not pressed

In the following, only one scoreboard is expected to be shown. Behind "Bot03", one can read "Missing In Action" from the second scoreboard and next to "Bot02", an admin icon from the second scoreboard shines through. Tab pressed

Server console.log

Here is the section of one game round from the console.log. Maybe the order or errors and the weapons that were used are of interest.

console.log
ParseKeyvalue: Unsupported field type 13 when setting 'ignoredEntity' on env_explosion#1959
CP map: ttt_minecraft_b5_fish_n_ships
CP round state: prep
Attempted to create unknown entity type !
ServerLog: Round proper has begun...
L 04/09/2024 - 20:27:36: Round proper has begun...
CP round state: active
ServerLog: 00:02.45 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
L 04/09/2024 - 20:27:38: 00:02.45 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
ServerLog: 00:02.45 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
L 04/09/2024 - 20:27:38: 00:02.45 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
ServerLog: 00:02.55 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 16.5
L 04/09/2024 - 20:27:38: 00:02.55 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 16.5
ServerLog: 00:02.55 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 17 dmg
L 04/09/2024 - 20:27:38: 00:02.55 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 17 dmg
ServerLog: 00:02.85 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 16.5
L 04/09/2024 - 20:27:39: 00:02.85 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 16.5
ServerLog: 00:02.85 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 17 dmg
L 04/09/2024 - 20:27:39: 00:02.85 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 17 dmg
ServerLog: 00:02.94 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
L 04/09/2024 - 20:27:39: 00:02.94 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
ServerLog: 00:02.94 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
L 04/09/2024 - 20:27:39: 00:02.94 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
ServerLog: 00:03.00 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
L 04/09/2024 - 20:27:39: 00:03.00 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot03 [detective, innocents]  for 30
ServerLog: 00:03.00 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
L 04/09/2024 - 20:27:39: 00:03.00 - DMG: 	 vinno [traitor] damaged Bot03 [detective] for 30 dmg
ServerLog: 00:03.00 - KILL:	 vinno [traitor] killed Bot03 [detective]
L 04/09/2024 - 20:27:39: 00:03.00 - KILL:	 vinno [traitor] killed Bot03 [detective]
ServerLog: 00:03.00 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot03 [detective, innocents] 
L 04/09/2024 - 20:27:39: 00:03.00 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot03 [detective, innocents] 
AddMultiDamage:  g_MultiDamage.GetDamageForce() == vec3_origin
AddMultiDamage:  g_MultiDamage.GetDamageForce() == vec3_origin
[vinno|2|STEAM_0:0:97283690] Lua Error:

[[ArcCW] Arctic's Customizable Weapons (Base)] lua/arccw/client/cl_ttt.lua:71: bad argument #1 to 'band' (number expected, got nil)
  1. band - [C]:-1
   2. unknown - lua/arccw/client/cl_ttt.lua:71
    3. Run - lua/dlib/modules/hook.lua:904
     4. Show - gamemodes/terrortown/gamemode/client/cl_search.lua:309
      5. callback - lua/ttt2/libraries/bodysearch.lua:395
       6. func - lua/ttt2/extensions/net.lua:206
        7. unknown - lua/includes/extensions/net.lua:38

ServerLog: 00:17.85 - CP_DMG FALL: nonplayer (Entity [0][worldspawn]) damaged Bot01 [traitor, traitors]  for 21.796072006226
L 04/09/2024 - 20:27:54: 00:17.85 - CP_DMG FALL: nonplayer (Entity [0][worldspawn]) damaged Bot01 [traitor, traitors]  for 21.796072006226
ServerLog: 00:26.88 - CP_OE: vinno [traitor, traitors]  ordered item_radar
L 04/09/2024 - 20:28:03: 00:26.88 - CP_OE: vinno [traitor, traitors]  ordered item_radar
ServerLog: 00:37.09 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:13: 00:37.09 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
ServerLog: 00:37.09 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
L 04/09/2024 - 20:28:13: 00:37.09 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
ServerLog: 00:37.18 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:13: 00:37.18 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
ServerLog: 00:37.18 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
L 04/09/2024 - 20:28:13: 00:37.18 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
ServerLog: 00:37.64 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 16.5
L 04/09/2024 - 20:28:13: 00:37.64 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 16.5
ServerLog: 00:37.64 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 17 dmg
L 04/09/2024 - 20:28:13: 00:37.64 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 17 dmg
ServerLog: 00:40.18 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:16: 00:40.18 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot02 [innocent, innocents]  for 30
ServerLog: 00:40.18 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
L 04/09/2024 - 20:28:16: 00:40.18 - DMG: 	 vinno [traitor] damaged Bot02 [innocent] for 30 dmg
ServerLog: 00:40.18 - KILL:	 vinno [traitor] killed Bot02 [innocent]
L 04/09/2024 - 20:28:16: 00:40.18 - KILL:	 vinno [traitor] killed Bot02 [innocent]
ServerLog: 00:40.18 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot02 [innocent, innocents] 
L 04/09/2024 - 20:28:16: 00:40.18 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot02 [innocent, innocents] 
AddMultiDamage:  g_MultiDamage.GetDamageForce() == vec3_origin
ServerLog: 01:03.39 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:39: 01:03.39 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
ServerLog: 01:03.39 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
L 04/09/2024 - 20:28:39: 01:03.39 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
ServerLog: 01:03.48 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:39: 01:03.48 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
ServerLog: 01:03.48 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
L 04/09/2024 - 20:28:39: 01:03.48 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
ServerLog: 01:03.55 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
L 04/09/2024 - 20:28:39: 01:03.55 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 30
ServerLog: 01:03.55 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
L 04/09/2024 - 20:28:39: 01:03.55 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 30 dmg
ServerLog: 01:04.09 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 16.5
L 04/09/2024 - 20:28:40: 01:04.09 - CP_DMG BULLET: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) damaged Bot04 [innocent, innocents]  for 16.5
ServerLog: 01:04.09 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 17 dmg
L 04/09/2024 - 20:28:40: 01:04.09 - DMG: 	 vinno [traitor] damaged Bot04 [innocent] for 17 dmg
ServerLog: 01:04.09 - KILL:	 vinno [traitor] killed Bot04 [innocent]
L 04/09/2024 - 20:28:40: 01:04.09 - KILL:	 vinno [traitor] killed Bot04 [innocent]
ServerLog: 01:04.09 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot04 [innocent, innocents] 
L 04/09/2024 - 20:28:40: 01:04.09 - CP_KILL: vinno [traitor, traitors] <Weapon [3216][arccw_mw2_acr]>, (Player [1][vinno], vinno) killed Bot04 [innocent, innocents] 
AddMultiDamage:  g_MultiDamage.GetDamageForce() == vec3_origin
ServerLog: Round ended.
L 04/09/2024 - 20:28:41: Round ended.
ServerLog: Result: traitors wins.
L 04/09/2024 - 20:28:41: Result: traitors wins.
CP round state: post
[vinno|2|STEAM_0:0:97283690] Lua Error:

[[ArcCW] Arctic's Customizable Weapons (Base)] lua/arccw/client/cl_ttt.lua:71: bad argument #1 to 'band' (number expected, got nil)
  1. band - [C]:-1
   2. unknown - lua/arccw/client/cl_ttt.lua:71
    3. Run - lua/dlib/modules/hook.lua:904
     4. PreprocSearch - lua/ttt2/libraries/bodysearch.lua:987
      5. UpdatePlayerData - gamemodes/terrortown/gamemode/client/vgui/cl_sb_info.lua:118
       6. SetPlayer - gamemodes/terrortown/gamemode/client/vgui/cl_sb_info.lua:31
        7. SetPlayer - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:328
         8. AddPlayerRow - gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:125
          9. UpdateScoreboard - gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua:537
           10. Init - gamemodes/terrortown/gamemode/client/vgui/cl_sb_main.lua:246
            11. Create - lua/dlib/luabridge/luabridge.lua:223
             12. unknown - lua/dlib/luabridge/luabridge.lua:249
              13. ProtectedCall - [C]:-1
               14. Create - lua/dl[vinno|2|STEAM_0:0:97283690] Lua Error:

[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589

[vinno|2|STEAM_0:0:97283690] Lua Error:

[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589

[vinno|2|STEAM_0:0:97283690] Lua Error:

[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_row.lua:589

[vinno|2|STEAM_0:0:97283690] Lua Error:

[TTT2 (Base) - v0.13.2b] gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:89: attempt to index global 'sboard_panel' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/client/vgui/cl_sb_team.lua:89

vinhill avatar Apr 09 '24 19:04 vinhill

could it be that it only happens if a player was killed by an ArcCW weapon and then searched by a detective?

TimGoll avatar Apr 09 '24 19:04 TimGoll

I can look into it whether ArcCW is the cause. But the above examples come from rounds I played as Traitor against Bots that involved no searching of bodies, certainly not through an Detective.

vinhill avatar Apr 09 '24 19:04 vinhill

ok, but in that case it only happens for the player that searched the body I think

TimGoll avatar Apr 09 '24 19:04 TimGoll

I tested

  • Detective kills Traitor / Traitor kills Innocent, without ArcCW weapon, round ends, opening scoreboard causes no errors, identifies body, opening scoreboard causes ArcCW error but scoreboard does not get stuck
  • Traitor kills Detective without ArcCW weapon, confirms, kills second person without ArcCW weapon, scoreboard automatically opens and gets stuck

I might do some more testing in a few days.

vinhill avatar Apr 09 '24 19:04 vinhill

Okay, thank you. Seems like it isn't what I suspected then. I can check this in two weeks or so when I'm back home

TimGoll avatar Apr 10 '24 07:04 TimGoll

Removing ArcCW did resolve the issue, though this does not seem to be a common issue with the addon, so I expect some combination of my addons to be the cause. If there is no reasonable option for TTT2 to be more resilient to such a problem, I guess the issue can be closed.

vinhill avatar Apr 29 '24 19:04 vinhill

If we can fix this and make TTT2 more resilient, we aim to do this

TimGoll avatar Apr 29 '24 19:04 TimGoll