Skip to content

Reduce dev console spam#1753

Merged
Rainyan merged 10 commits intoNeotokyoRebuild:masterfrom
Rainyan:reduce-console-spam-v2
Mar 1, 2026
Merged

Reduce dev console spam#1753
Rainyan merged 10 commits intoNeotokyoRebuild:masterfrom
Rainyan:reduce-console-spam-v2

Conversation

@Rainyan
Copy link
Collaborator

@Rainyan Rainyan commented Mar 1, 2026

Description

  • Fix a bunch of console warnings to reduce developer console noise.
  • Add some asserts for where some of the errors originated from, to catch them early
  • Improve some warnings' message wording

Toolchain

  • Windows MSVC VS2022

Linked Issues

Rainyan added 10 commits March 1, 2026 06:06
Fix warning:

> For FCVAR_REPLICATED, ConVar must be defined in client and game .dlls (sv_neo_reject_opengl_mesa_check)
Fix warning for cvar:

> Parent cvar in server.dll not allowed (props_break_max_pieces)
Need to declare the event in NeoModEvents.res to silence the warning:

> CGameEventManager::AddListener: event 'player_stats_updated' unknown.
Fix warning for empty (0 bytes) response system rules file:

> CResponseSystem:  failed to load scripts/talker/response_rules.txt
Silences warning:

> Unable to remove textwindow_temp.html!
Because the developers know, and it's not useful to have that noise in
the debug output.
Fixes console spam for bots:

> CreateEvent: event 'nav_blocked' not registered.
Fixes warning console spam:

> EmitAmbientSound: warning, broadcasting sound labled as SND_SPAWNING.
@AdamTadeusz
Copy link
Contributor

is this pr ready for review?

Copy link
Contributor

@sunzenshen sunzenshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look functionally alright, though a minor nit just to check if the removal of FCVAR_GAMEDLL from sv_neo_reject_opengl_mesa_check was intentional.

@sunzenshen sunzenshen requested a review from a team March 1, 2026 10:18
@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 1, 2026

The changes look functionally alright, though a minor nit just to check if the removal of FCVAR_GAMEDLL from sv_neo_reject_opengl_mesa_check was intentional.

Since the cvar exists purely game dll side, it should be safe to go with the default flags of 0 (many server sided cvars do this), so I think I'll leave it as is.

@Rainyan Rainyan merged commit 6e690c8 into NeotokyoRebuild:master Mar 1, 2026
7 checks passed
@Rainyan Rainyan deleted the reduce-console-spam-v2 branch March 1, 2026 11:49
@DESTROYGIRL
Copy link
Contributor

DESTROYGIRL commented Mar 1, 2026

This introduced a new console warning it seems:
Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)

Not really sure what it means by this, the warning shows up twice and exists on both client and server so... how could they not both have the flag

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 1, 2026

This introduced a new console warning it seems: Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)

Not really sure what it means by this, the warning shows up twice and exists on both client and server so... how could they not both have the flag

Hmm, I can't see this. When do you see the warning, in the main menu, when loading in a level? Any steps to reproduce?

@DESTROYGIRL
Copy link
Contributor

On game start without loading a map. Debug build
image

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 1, 2026

Very strange. Are you sure you're on the current master, and done a full rebuild? The only thing I can come up with is perhaps your client or server has cached the object file containing that cvar definition and for whatever reason it has gone stale. But that's just guessing.

Here's my full console output with +developer 2 launch options for 802bf4d (current master):

neo_version (Server's build info):
Build version: 20260301_802bf4d
Build date: 2026-03-01
Git hash: 802bf4d8d37eb07f4a818f8c0a7f1aa1d76c22a1
OS: Windows
Compiler: MSVC 19.44.35223.0
CSoundEmitterSystem:  Registered 759 sounds
CResponseSystem:  scripts\talker\response_rules.txt (0 rules, 0 criteria, and 0 responses)
maxplayers set to 24
Heap: 512.00 Mb
Binding uncached material "engine/preloadtexture", artificially incrementing refcount
Steam config directory: I:\SteamLibrary\steamapps\common\Source SDK Base 2013 Multiplayer\platform\config
Parsed 26 text messages
CClientSteamContext logged on = 1
[Cloud]: Default setting with remote data non-existent, sync all
execing config.cfg
12 CPUs (6 physical), Frequency: 3.8 Ghz,  Features: AuthenticAMD SSE SSE2 MMX RDTSC CMOV FCMOV
execing valve.rc
execing autoexec.cfg
CAchievementMgr::Steam_OnUserStatsReceived: failed to download stats from Steam, EResult 2

@AdamTadeusz
Copy link
Contributor

i think you can have convars defined in multiple places without a problem, maybe something in the engine redefines this convar without the flag

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 1, 2026

i think you can have convars defined in multiple places without a problem, maybe something in the engine redefines this convar without the flag

Scanning all the files in Source SDK Base 2013 Multiplayer\bin\x64, materialsystem.dll is the only one to make reference, and it's inside a string array in the data section so I doubt that is a cvar definition either.

edit: Actually you are right, the materialsystem function loops through those strings, allocates new memory and then calls the ConVar ctor for that memory with each of the cvar string names. So I guess there is a duplicate being created there, presumably with the conflicting default flags.

Outdated

I can reproduce 1 error printout by deliberately doing this:

diff --git a/src/game/shared/props_shared.cpp b/src/game/shared/props_shared.cpp
index 4391ad3a..1e97ac71 100644
--- a/src/game/shared/props_shared.cpp
+++ b/src/game/shared/props_shared.cpp
@@ -23,7 +23,13 @@

 ConVar sv_pushaway_clientside_size( "sv_pushaway_clientside_size", "15", FCVAR_REPLICATED | FCVAR_DEVELOPMENTONLY, "Minimum size of pushback objects" );
 #ifdef NEO
+
+#ifdef CLIENT_DLL
 ConVar props_break_max_pieces( "props_break_max_pieces", "-1", FCVAR_REPLICATED, "Maximum prop breakable piece count (-1 = model default)" );
+#else
+ConVar props_break_max_pieces( "props_break_max_pieces", "-1", 0, "Maximum prop breakable piece count (-1 = model default)" );
+#endif
+

but how to get 2 prints I have no idea.

@DESTROYGIRL
Copy link
Contributor

Are you sure you're on the current master, and done a full rebuild? The only thing I can come up with is perhaps your client or server has cached the object file containing that cvar definition and for whatever reason it has gone stale. But that's just guessing.

Yes, I also just tried with DLLs built from CI as well. Also tried removing all my command line options but to no avail

@AdamTadeusz
Copy link
Contributor

AdamTadeusz commented Mar 1, 2026

I ran git fetch --tags and rebuilt but its still showing me the old git commit hash, but I am pretty sure im on 802bf4d and i am getting the same console message

neo_version (Server's build info):
Build version: 20260301_cb5a7cf
Build date: 2026-03-01
Git hash: cb5a7cf6561253dbed72f91eb2cb3eb2ea60e53f
OS: Windows
Compiler: MSVC 19.44.35214.0
Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)
CSoundEmitterSystem:  Registered 759 sounds
CResponseSystem:  scripts\talker\response_rules.txt (0 rules, 0 criteria, and 0 responses)
maxplayers set to 24
Heap: 512.00 Mb
Steam config directory: D:\SteamLibrary\steamapps\common\Source SDK Base 2013 Multiplayer\platform\config
Parsed 26 text messages
CClientSteamContext logged on = 1
Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)
[Cloud]: Default setting with remote data non-existent, sync all
execing config.cfg
16 CPUs (8 physical), Frequency: 3.0 Ghz,  Features: AuthenticAMD SSE SSE2 MMX RDTSC CMOV FCMOV
execing valve.rc
execing autoexec.cfg
CAchievementMgr::Steam_OnUserStatsReceived: failed to download stats from Steam, EResult 2
****
image

(Edit) I switched back and forth between two branches and now the displayed version is updated and the error is still there

neo_version (Server's build info):
Build version: 20260301_802bf4d
Build date: 2026-03-01
Git hash: 802bf4d8d37eb07f4a818f8c0a7f1aa1d76c22a1
OS: Windows
Compiler: MSVC 19.44.35214.0
Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)
CSoundEmitterSystem:  Registered 759 sounds
CResponseSystem:  scripts\talker\response_rules.txt (0 rules, 0 criteria, and 0 responses)
maxplayers set to 24
Heap: 512.00 Mb
Steam config directory: D:\SteamLibrary\steamapps\common\Source SDK Base 2013 Multiplayer\platform\config
Parsed 26 text messages
CClientSteamContext logged on = 1
Both ConVars must be marked FCVAR_REPLICATED for linkage to work (props_break_max_pieces)
[Cloud]: Default setting with remote data non-existent, sync all
execing config.cfg
16 CPUs (8 physical), Frequency: 3.0 Ghz,  Features: AuthenticAMD SSE SSE2 MMX RDTSC CMOV FCMOV
execing valve.rc
execing autoexec.cfg
CAchievementMgr::Steam_OnUserStatsReceived: failed to download stats from Steam, EResult 2

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 1, 2026

Bah, that's annoying. It's probably me who has the stale setup then if the two of you are seeing it. I'll revert that change for now in a new PR.

Rainyan added a commit to Rainyan/rebuild that referenced this pull request Mar 1, 2026
This reverts commit b6c170f.

Part of the merge commit 6e690c8.

Reverted due to problems as described in:
NeotokyoRebuild#1753 (comment)
Rainyan added a commit that referenced this pull request Mar 1, 2026
This reverts commit b6c170f.

Part of the merge commit 6e690c8.

Reverted due to problems as described in:
#1753 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants