Dedicated Server: ArgumentNullException @ Smorgasbord Square (commercial_strip_04)

strongheart

Refugee
Version
3.0 b259
Platform
Windows
Sandbox Code
AAAJABJACJADJARFBNC
I get an ArgumentNullException when I go to the Smorgasbord Square POI (commercial_strip_04). This is for dedicated server only. When I try on a local game I do get some warnings about null renderers, but no errors.

I've tested with both Linux and Windows servers and a Windows client. The logs and video are for Windows on both sides.

I don't see any gameplay impact other than the console window coming up and requiring dismissal.

Code:
ArgumentNullException: Value cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <1071a2cb0cb3433aae80a793c277a048>:0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <1071a2cb0cb3433aae80a793c277a048>:0
  at SignDataManager.TryGetRenderingData (GlobalSignId signId, SignDataManager+SignRenderingData& signRenderingData) [0x0000f] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignDataManager.TryApplyRenderingData (GlobalSignId signId, SignDataManager+RenderingDataPatcher patcher, System.Collections.Generic.List`1[T] signRenderers, SignCanvas+SignBlendMode blendMode, UnityEngine.Camera targetCamera) [0x00000] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignCanvas.RefreshRenderers () [0x00033] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignCanvas.Initialize (SignDataManager+RenderingDataPatcher _alternativePatcher) [0x00030] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at TEFeatureCanvas.SetBlockEntityData (BlockEntityData _blockEntityData) [0x00096] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at TileEntityComposite.SetBlockEntityData (BlockEntityData _blockEntityData) [0x0000b] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at BlockCompositeTileEntity.OnBlockEntityTransformAfterActivated (WorldBase _world, Vector3i _blockPos, BlockValue _blockValue, BlockEntityData _bed) [0x0003d] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at Chunk.OnDisplayBlockEntities (World _world, UnityEngine.Transform _entityBlocksParentT, ChunkCluster _chunkCluster) [0x00300] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at ChunkManager.doCopyChunksToUnity () [0x0011c] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at ChunkManager.CopyChunksToUnity () [0x00000] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at GameManager.gmUpdate () [0x00534] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at GameManager.Update () [0x00000] in <d983dee3f9114d09bdb3b5f8df4452f8>:0

Client logs: https://pastebin.com/ZYn7Q3DU
Server logs: https://pastebin.com/ZJDY0wSC
 
Reproduction Steps
1. Set up a dedicated server to use the Pregen06k01 world
2. Launch it and connect to it
3. Go to the Smorgasbord Square POI (commercial_strip_04)

You'll see the red error in the logs.
Link to Logs
https://pastebin.com/ZYn7Q3DU
Link to Screenshot/Video
https://youtu.be/3x1VrnRm4jA
Thank you for reporting. I've confirmed the issue and will make an internal ticket for it.
Do let us know if you find other POIs causing this issue (as the fix is per location based)
 
That stack trace points to a vanilla sign/canvas rendering bug inside commercial_strip_04, not a general chunk corruption issue.

SignCanvas.RefreshRenderers() is calling SignDataManager.TryGetRenderingData() with a null GlobalSignId, so the dictionary lookup throws:
ArgumentNullException: Value cannot be null.
Parameter name: key
It appears one of the POI’s sign or canvas block entities is loading without valid sign-rendering data. That explains why it happens when the POI chunk is displayed and why the dedicated server throws the exception while a local game may only log renderer warnings.


The likely fix is for TFP to correct the affected sign/canvas block or prefab data in commercial_strip_04. We have not reproduced it ourselves yet, but the stack trace is clearly within the vanilla SignDataManager and SignCanvas system.
Yes—it very likely is a vanilla 3.0 b259 bug.

Why:
  • The stack trace is entirely in vanilla classes: SignDataManager, SignCanvas, TEFeatureCanvas, and ChunkManager.
  • It is tied to the vanilla POI commercial_strip_04.
  • The reporter reproduced it on both Windows and Linux dedicated servers.
  • A local game shows related null-renderer warnings, even though it does not throw the full exception.
The likely cause is a sign or canvas block inside that POI loading with a missing GlobalSignId.
 
Thank you for reporting. I've confirmed the issue and will make an internal ticket for it.
Do let us know if you find other POIs causing this issue (as the fix is per location based)
Thanks!

Can I request that you also create an internal ticket to have the client generate a less intrusive log message when the issue is detected? I've instrumented the code and it looks like there's a GlobalSignId with a null libraryId or signGuid being passed up from the Block.

A red error popping up in the console is jarring and can interrupt gameplay. I know the players on my server are not going to like it being a regular occurrence.
 
Here's a patch that seems to work well for me. It makes the job of finding the problem POI very easy. However, it's not EAC friendly and I can't run a public server with EAC disabled.

C#:
using System;
using HarmonyLib;

namespace StrongUtils {
  public class SignDiagnostics {
    [HarmonyPatch(typeof(TEFeatureCanvas), nameof(TEFeatureCanvas.SetBlockEntityData))]
    public class TEFeatureCanvas_SetBlockEntityData_Patch {
      private static Exception Finalizer(TEFeatureCanvas __instance, Exception __exception) {
        if (__exception is null) {
          return null;
        }

        Block block = __instance.blockValue.Block;
        Vector3i pos = __instance.ToWorldPos();
        PrefabInstance poi = GameManager.Instance.World.GetPOIAtPosition(pos);
        var location = poi is null ? "" : $" in {poi.prefab.LocalizedEnglishName} ({poi.prefab.PrefabName})";
        Log.Warning($"[SignDiagnostics] Could not load canvas block {block.blockName}{location}:\n{__exception}");

        return null;
      }
    }
  }
}

This is the log message I get:

Code:
2026-06-30T05:09:26 103.709 WRN [SignDiagnostics] Could not load canvas block signDecalWood2x1 at -803, 52, 986 in Smorgasbord Square (commercial_strip_04):
System.ArgumentNullException: Value cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <1071a2cb0cb3433aae80a793c277a048>:0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <1071a2cb0cb3433aae80a793c277a048>:0
  at SignDataManager.TryGetRenderingData (GlobalSignId signId, SignDataManager+SignRenderingData& signRenderingData) [0x0000f] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignDataManager.TryApplyRenderingData (GlobalSignId signId, SignDataManager+RenderingDataPatcher patcher, System.Collections.Generic.List`1[T] signRenderers, SignCanvas+SignBlendMode blendMode, UnityEngine.Camera targetCamera) [0x00000] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignCanvas.RefreshRenderers () [0x00033] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at SignCanvas.Initialize (SignDataManager+RenderingDataPatcher _alternativePatcher) [0x00030] in <d983dee3f9114d09bdb3b5f8df4452f8>:0
  at (wrapper dynamic-method) TEFeatureCanvas.DMD<System.Void TEFeatureCanvas:SetBlockEntityData(BlockEntityData)>(TEFeatureCanvas,BlockEntityData)
 
Last edited:
Thanks!

Can I request that you also create an internal ticket to have the client generate a less intrusive log message when the issue is detected? I've instrumented the code and it looks like there's a GlobalSignId with a null libraryId or signGuid being passed up from the Block.

A red error popping up in the console is jarring and can interrupt gameplay. I know the players on my server are not going to like it being a regular occurrence.
Thank you for the info. The good news is this was already fixed in our internal builds to make this error less intrusive (not force open console) and more informative (where/which POI), but is not in the public builds yet. It will be available in a future update, but unfortunately I do not know when.
 
Back
Top