Performance Fish causes three Vanilla Vehicles Expanded vehicle definitions to fail during XML loading.
Affected vehicles:
VVE_Scytheman
VVE_Badger
VVE_Burya
Opening the architect menu and under vehicles the whole architect menu crashes, or when having better architect menu mod installed, under "military", the whole architect menu crashes.
All three fail while RimWorld is resolving the following field against Vehicles.VehicleProperties:
<winterCostMultiplier>...</winterCostMultiplier>
Confirmed reproduction
Fishery enabled, Performance Fish disabled
All three vehicles load correctly.
Fishery and Performance Fish enabled
All three vehicles fail to load.
No other mods or settings were changed between these two tests.
Diagnostic result
A custom Harmony diagnostic captured the exact exception:
typeBeingDeserialized: Vehicles.VehicleProperties
fieldNode.Name: winterCostMultiplier
System.NullReferenceException: Object reference not set to an instance of an object
at Verse.XmlToObjectUtils.DoFieldSearch(
System.Type typeBeingDeserialized,
System.Xml.XmlNode fieldNode,
System.Xml.XmlNode xmlRootForDebug
)
- PREFIX Vehicle Framework:
SmashTools.Patching.Patch_XmlParsing.PreProcessAttributes
- POSTFIX Vehicle Framework:
SmashTools.Patching.Patch_XmlParsing.ReadCustomAttributes
The affected XML nodes are populated normally:
VVE_Scytheman: <winterCostMultiplier>0.7</winterCostMultiplier>
VVE_Badger: <winterCostMultiplier>2.125</winterCostMultiplier>
VVE_Burya: <winterCostMultiplier>0.95</winterCostMultiplier>
When Performance Fish is active, DoFieldSearch throws while resolving these fields. With Performance Fish disabled, the same definitions load successfully.
Consequences
Because the VehicleDefs fail to load:
- the vehicles are missing;
- their blueprint and wreck references cannot resolve;
- the affected vehicle section of the Architect menu can break.
Workaround
Removing the three winterCostMultiplier XML nodes prevents the errors, but this also removes their intended winter travel modifiers.
Disabling Performance Fish fixes the issue without modifying the vehicle definitions.
Versions
- RimWorld:
1.6.4871
- Performance Fish:
0.6.2
- Fishery:
0.6.1
- Vehicle Framework: RimWorld 1.6 version
Could Performance Fish’s reflection caching, particularly its patches around reflection or object creation, be returning a stale or incorrect field result during Vehicle Framework’s custom XML parsing?
Modlist:
ModsConfig.xml
Rimworld Log with custom debugger:
Log after VF XMD Debug 2.txt
Custom debug mod:
VF XML Diagnostic.zip
Custom mod patch to fix it (Temporary fix until this is fixed)
Place folder inside \steamapps\common\RimWorld\Mods
And the safest mod load order to place it would be right after the last mod that does anything with Vanilla vehicles expanded or Vehicle framework.
VVE WinterCost Diagnostic Fix.zip
Performance Fish causes three Vanilla Vehicles Expanded vehicle definitions to fail during XML loading.
Affected vehicles:
VVE_ScythemanVVE_BadgerVVE_BuryaOpening the architect menu and under vehicles the whole architect menu crashes, or when having better architect menu mod installed, under "military", the whole architect menu crashes.
All three fail while RimWorld is resolving the following field against
Vehicles.VehicleProperties:Confirmed reproduction
Fishery enabled, Performance Fish disabled
All three vehicles load correctly.
Fishery and Performance Fish enabled
All three vehicles fail to load.
No other mods or settings were changed between these two tests.
Diagnostic result
A custom Harmony diagnostic captured the exact exception:
The affected XML nodes are populated normally:
When Performance Fish is active,
DoFieldSearchthrows while resolving these fields. With Performance Fish disabled, the same definitions load successfully.Consequences
Because the
VehicleDefs fail to load:Workaround
Removing the three
winterCostMultiplierXML nodes prevents the errors, but this also removes their intended winter travel modifiers.Disabling Performance Fish fixes the issue without modifying the vehicle definitions.
Versions
1.6.48710.6.20.6.1Could Performance Fish’s reflection caching, particularly its patches around reflection or object creation, be returning a stale or incorrect field result during Vehicle Framework’s custom XML parsing?
Modlist:
ModsConfig.xml
Rimworld Log with custom debugger:
Log after VF XMD Debug 2.txt
Custom debug mod:
VF XML Diagnostic.zip
Custom mod patch to fix it (Temporary fix until this is fixed)
Place folder inside \steamapps\common\RimWorld\Mods
And the safest mod load order to place it would be right after the last mod that does anything with Vanilla vehicles expanded or Vehicle framework.
VVE WinterCost Diagnostic Fix.zip