Skip to content

[BUG]: Spawning SCP-079 without its default camera disconnects the player (TryGetDefaultCamera) #396

@MajorFox-MJ

Description

@MajorFox-MJ

Before You Report

  • I have searched for existing reports of this bug, and this bug report is unique.

Version

1.1.6

Description

If you remove the base map (therefore default camera) then try to spawn SCP-079, it'll disconnect the player with a invalid data client error.

To Reproduce

Disable base game map spawning in configs
Spawn the player as SCP-079

Expected Behavior

It should either :

  • Spawn SCP-079 with a blank screen
  • Try to get any other camera already spawned instead of disconnecting the player.
  • Being able to set the default camera upon spawning a camera toy

Additional Information

Disconnecting connection: connection(0). This can happen if the other side accidentally (or an attacker intentionally) sent invalid data. Reason: System.NullReferenceException: Object reference not set to an instance of an object.
at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync+<>c.b__42_0 (PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x) [0x00000] in <00000000000000000000000000000000>:0
at Utils.NonAllocLINQ.HashsetExtensions.TryGetFirst[T] (System.Collections.Generic.HashSet1[T] target, System.Func2[T,TResult] condition, T& first) [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync.TryGetDefaultCamera (PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera& cam) [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync.TryGetCurrentCamera (PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera& cam) [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.PlayableScps.Scp079.Scp079SpeakerAbility.SpawnObject () [0x00000] in <00000000000000000000000000000000>:0
at GameObjectPools.PoolObject.SetupPoolObject () [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.PlayerRoleManager.InitializeNewRole (PlayerRoles.RoleTypeId targetId, PlayerRoles.RoleChangeReason reason, PlayerRoles.RoleSpawnFlags spawnFlags, Mirror.NetworkReader data) [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.RoleSyncInfo..ctor (Mirror.NetworkReader reader) [0x00000] in <00000000000000000000000000000000>:0
at PlayerRoles.PlayerRolesNetUtils.ReadRoleSyncInfo (Mirror.NetworkReader reader) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkReader.Read[T] () [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkMessages+<>c__DisplayClass8_02[T,C].<WrapHandler>b__0 (Mirror.NetworkConnection conn, Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0 at Mirror.NetworkClient.UnpackAndInvoke (Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0 at Mirror.NetworkClient.OnTransportData (System.ArraySegment1[T] data, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorClient+<>c__DisplayClass9_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorTransport.LateUpdate () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Mirror.<>c__DisplayClass8_02:<WrapHandler>b__0(NetworkConnection, NetworkReader, Int32) Mirror.NetworkClient:UnpackAndInvoke(NetworkReader, Int32) Mirror.NetworkClient:OnTransportData(ArraySegment1, Int32)
Mirror.LiteNetLib4Mirror.<>c__DisplayClass9_0:b__0()
Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorTransport:LateUpdate()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimportedImported to internal git

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions