LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[BUG]: NRE GetCurrentZone/IsInDarkenedRoom and kicking from server.

Open TheGameDaniil opened this issue 8 months ago • 1 comments

Before You Report

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

Version

14.2.6

Description

To be honest, I don't understand where this chain of bugs came from. I used the latest version of AutoEvents by MedveMarci and recompiled the plugin using the latest library versions, but the problem persists. When launching certain mini-games, there’s a chance you’ll get kicked from the server, but sometimes that doesn’t happen. And this only happens when someone within your radius starts talking. Conversely, if you turn on your microphone, the person next to you gets kicked from the server.

To Reproduce

I think that if you're not in the zone and it's dark, and you're talking to someone nearby, they'll be kicked off the server.

Expected Behavior

I expected the game to run smoothly without crashing and with voice chat support.

Additional Information

Logs:

[2026-03-26 19:09:43.663 +02:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at RoomLightController.IsInDarkenedRoom (MapGeneration.RoomIdentifier rid, UnityEngine.Vector3 positionToCheck) [0x00000] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at RoomLightController.IsInDarkenedRoom (UnityEngine.Vector3 positionToCheck) [0x0000a] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.FpcStandardRoleBase.get_InDarkness () [0x0000b] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.FpcStandardRoleBase.get_InsufficientLight () [0x00013] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at CustomPlayerEffects.InsufficientLighting.UpdateServer () [0x0000f] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at CustomPlayerEffects.InsufficientLighting.AlwaysUpdate () [0x00007] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at (wrapper delegate-invoke) <Module>.invoke_void()
[2026-03-26 19:09:43.663 +02:00] [STDOUT]   at StaticUnityMethods.Update () [0x00009] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at MapGeneration.RoomUtils.GetCurrentZone (ReferenceHub hub) [0x0000c] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.FpcVisibilityController.GetActiveFlags (ReferenceHub observer) [0x00070] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.Visibility.VisibilityController.ValidateVisibility (ReferenceHub hub) [0x00022] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.NetworkMessages.FpcServerPositionDistributor.WriteAll (ReferenceHub receiver, Mirror.NetworkWriter writer) [0x0007a] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.NetworkMessages.FpcPositionMessage.Write (Mirror.NetworkWriter writer) [0x00000] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.NetworkMessages.FpcMessagesReadersWriters.WriteFpcPositionMessage (Mirror.NetworkWriter writer, PlayerRoles.FirstPersonControl.NetworkMessages.FpcPositionMessage msg) [0x00000] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at (wrapper delegate-invoke) System.Action`2[Mirror.NetworkWriter,PlayerRoles.FirstPersonControl.NetworkMessages.FpcPositionMessage].invoke_void_T1_T2(Mirror.NetworkWriter,PlayerRoles.FirstPersonControl.NetworkMessages.FpcPositionMessage)
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at Mirror.NetworkWriter.Write[T] (T value) [0x00023] in <9580c2adc24144439c56c5a55d603bd3>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at Mirror.NetworkConnection.Send[T] (T message, System.Int32 channelId) [0x00006] in <9580c2adc24144439c56c5a55d603bd3>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at PlayerRoles.FirstPersonControl.NetworkMessages.FpcServerPositionDistributor.LateUpdate () [0x0006d] in <15593c9ab2b647bd89287b048c101df8>:0
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at (wrapper delegate-invoke) <Module>.invoke_void()
[2026-03-26 19:09:43.665 +02:00] [STDOUT]   at StaticUnityMethods.LateUpdate () [0x00009] in <15593c9ab2b647bd89287b048c101df8>:0

TheGameDaniil avatar Mar 26 '26 17:03 TheGameDaniil

Duplicate of #378

SlejmUr avatar Mar 26 '26 17:03 SlejmUr