[SYS-Errors] Invalid Operation Exception Spam

Version: 14.1.3

Branch: Release (stable) branch

Timestamp: 2025/08/12 06:13:06

Server Name: NWOS Canada 1

Description

common exception that occurs in game, without reproduction steps. The SpectatableModuleBase of name can be any class.

InvalidOperationException: SpectatableModuleBase of name 'ChaosRiflemanRole(Clone)' does not have an owner!
  at PlayerRoles.Spectating.SpectatableModuleBase.get_TargetHub () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.SpectatableListEffects.Scp1576SpectatorIconEffect.UpdateVisibility () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.SpectatableListElementBase.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.FullSizeSpectatableListElement.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.StandardSpectatableListElement.Update () [0x00000] in <00000000000000000000000000000000>:0 
InvalidOperationException: SpectatableModuleBase of name 'Scp049-2(Clone)' does not have an owner!
  at PlayerRoles.Spectating.SpectatableModuleBase.get_TargetHub () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.SpectatableListEffects.Scp1576SpectatorIconEffect.UpdateVisibility () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.SpectatableListElementBase.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.FullSizeSpectatableListElement.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at PlayerRoles.Spectating.StandardSpectatableListElement.Update () [0x00000] in <00000000000000000000000000000000>:0 

Steps to reproduce

I used a plugin to recreate the issue using this code. It needs to be done on player dying

Timing.CallDelayed(2.0f, () =>

        {

                       player.SetRole(RoleTypeId.Scientist, RoleChangeReason.None, RoleSpawnFlags.None);

        }

It seems by spawning

What is supposed to happen

This exception should not happen

What actually happens

This exception happens

Attachments

Player.log

Edited by Crimson