Closed xAstroBoy closed 6 months ago
Could you give us some more information on what other plugins you're using, and when this error occured?
Could you give us some more information on what other plugins you're using, and when this error occured?
i did just this small hotfix with dnspy
PluginHelper.HasCompatibilityPlugin seems to be causing the issue
i just added a couple nullchecks.
What other mods were present, though? It's important for us to know why this happens since it might point at an issue elsewhere.
Could you provide us your game logs?
018e871b-4e3b-4094-11dd-5d8e25a96b83
Is mostly Client side mods.
Could you please forward us your game logs for a playthrough when this error happens?
Could you please forward us your game logs for a playthrough when this error happens?
there's no error, just that exception, i fixed it myself locally by adding null checks...
The rest of the game logs would still be good as additional context for us to look into what's triggering this, so we can ensure null checks aren't just a bandaid fix while the real problem is somewhere else / in the way we're checking things / etc...
The rest of the game logs would still be good as additional context for us to look into what's triggering this, so we can ensure null checks aren't just a bandaid fix while the real problem is somewhere else / in the way we're checking things / etc...
null checks are not a bandaid, install the modpack with r2modman and see it by yourself, not all mods have that attribute
@MaxWasUnavailable Is it possible that a plugin hasn't loaded yet, and running GetType is causing the NRE?
Possibly? I don't recall us running into this during any of our testing with plugins that both have and don't have the attribute, though. Hence why I'd love a log so we can check if there's anything weird going on.
I'd rather not slap try/catch or null checks everywhere in case it is an issue that should error, or in case it's a situation where we're doing things out of order (as you suggest), and where a null check would just hide the error but not fix the problem.
Looking at that stack-trace, it appears to be happening when loading the server list, when all mods should be loaded. For some reason some of the plugins/mods appear to not be loaded, which doesn't make sense to me.
[20:34:41.9251125] [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: LobbyCompatibility.Features.PluginHelper.HasCompatibilityAttribute (BepInEx.BaseUnityPlugin plugin) (at ./Features/PluginHelper.cs:59) LobbyCompatibility.Features.PluginHelper+<>c.b7_0 (System.Collections.Generic.KeyValuePair:IL_001B)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at :IL_001F)
LobbyCompatibility.Features.PluginHelper.GetAllPluginInfo () (at ./Features/PluginHelper.cs:91)
LobbyCompatibility.Features.PluginHelper.GetRequiredPluginsChecksum () (at ./Features/PluginHelper.cs:262)
LobbyCompatibility.Features.PluginHelper.get_Checksum () (at ./Features/PluginHelper.cs:36)
LobbyCompatibility.Patches.LoadServerListTranspiler.LoadListPostfix (SteamLobbyManager steamLobbyManager) (at ./Patches/LoadServerListTranspiler.cs:86)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b 7_0 (System.Object state) (at <787acc3c9a4c471ba7d971300105af24>:IL_0000)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :IL_0002)
UnityEngine.UnitySynchronizationContext.Exec () (at :IL_005D)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at :IL_0014)
2[TKey,TValue] plugin) (at ./Features/PluginHelper.cs:68) System.Linq.Enumerable+WhereSelectEnumerableIterator
2[TSource,TResult].ToList () (at