bbradson / Performance-Fish

Performance Mod for RimWorld
Mozilla Public License 2.0
423 stars 34 forks source link

Possible incompatibility with 1-2-3 Personalities M1? #22

Closed mrfunstuff closed 6 months ago

mrfunstuff commented 6 months ago

Visual Exceptions identifies an exception between Performance Fish...

"static Boolean CreateInstance_Type.Prefix(Type type, Object&___result)"

and 1-2-3 Personalities M1

"static Patch_ThingWithCompsInitializeComps.Postfix(ThingWithCompsInstance, List'1&___comps"

dunno if this is an actual issue or not!

==

Exception in Verse.ThingWithComps.InitializeComps: System.MissingMethodException: Default constructor not found for type Verse.ThingComp at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in :0 at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in :0 at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in :0 at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in :0 at System.Activator.CreateInstance (System.Type type) [0x00025] in :0

bbradson commented 6 months ago

The easy way to test this, as well as any other inconclusive error, is to disable the seemingly involved patch. In this case it would be ReflectionCaching:CreateInstance_Type. After doing so and restarting you will then still get the same error, as it's thrown outside of Fish's patch here, but without any mentions of Fish's no longer running patch. Visual Exceptions generally just guesses based on patches applied somewhere in the stacktrace. It doesn't actually consider their effects or the order they run in, causing it to often be rather wildly inaccurate. Simple Personalities can't possibly be at fault here too, as that mod's patch hasn't even run by the time the error was thrown according to the stacktrace. It's likely caused by a much earlier error, probably a config error or a TypeLoadException somewhere, but has nothing to do with Performance Fish anyway.

mrfunstuff commented 6 months ago

Thank you for the response and explanation, as well as your work on this great tool!