SubmergedAmongUs / Submerged

An Among Us mod which adds a new underwater map
Other
102 stars 17 forks source link

Null Ref Spam In Logs #120

Closed AlchlcDvl closed 10 months ago

AlchlcDvl commented 1 year ago

Describe the bug The BepInEx log is spammed with null ref errors

To Reproduce (Might be a compatibility issue instead, the mod list is in the screenshots section) Steps to reproduce the behavior:

  1. Open a local lobby
  2. Press F1 and spawn bots to play
  3. Set the map to any map that's not Submerged
  4. See error

Expected behavior Honestly I have no idea what it's supposed to do exactly, it's not a critical bug, just a really annoying thing to see in the logs when trying to look for errors in your own mod

Screenshots

image

Mod List

image

Versions

Log file LogOutput.log

Additional context The mods I'm using are not out yet so here's their dll files in case it might actually be a compatibility issue

plugins.zip

The mods are:- Town Of Us Reworked, the mod that I'm working on and a custom build of UnityExplorer given to me by MyDragonBreath along with the usual Reactor and Submerged files

AlchlcDvl commented 1 year ago

i just realised mdb's ue doesn't load so you can ignore that part of the mod list

Alexejhero commented 1 year ago

I cannot reproduce this without Reworked.dll

Alexejhero commented 1 year ago

There is nothing that could throw that null ref in that property, unless PlayerCounter_TMP is renamed, destroyed or its children are modified

AlchlcDvl commented 1 year ago

i see then it might be an issue on my end

i do modify GameStartManager.PlayerCounter when modifying the lobby size with some of the settings that might be what's causing the issue

AlchlcDvl commented 1 year ago

but i mostly copy pasted the vanilla code and modified some parts of it so i'm not sure why it's being an issue

although earlier when i didn't do such a thing, the logs would be spammed with null refs within the vanilla code rather than the mod itself so to fix that i simply rewrote it with a bool prefix returning false

the only time i actually modify it myself is here

image

AlchlcDvl commented 1 year ago

so i temporarily disabled any modifications to PlayerCounter and the issue still persists

so would it possible for you to instantiate a new PlayerCounter and edit that to resolve any conflicts?

Alexejhero commented 10 months ago

I'm not editing the player counter, I am already cloning it, but I need to grab the original in order to do that.

I've changed from grabbing it by name to grabbing GameStartManager by type, this should mean that it won't be a problem even if you change it in other mods,