RimWorld

RimWorld

Big and Small - Framework
Possible error with Romance on the Rim?
Hi,
I had an error with Romance on the Rim's diplomatic marriage event, and it seems the error is related to Big & Small. Looks like an exception is blocking the creation of a confirmation button.

Someone else posted about the same problem on a RotR thread : https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2654432921/5938553975811085481/?ctp=9#c591762021827009602

Here's my own log :

Exception filling window for RomanceOnTheRim.Dialog_DiplomaticMarriage: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 94533FDF]
at BigAndSmall.RomanceTagsExtensions.<GetHighestSharedTag>g__CheckTags|0_0 (BigAndSmall.RomanceTags rOne, BigAndSmall.RomanceTags rTwo, BigAndSmall.RomanceTagsExtensions+<>c__DisplayClass0_0& ) [0x0004b] in <a46338c3110348f29cc28ce37a7483cc>:0
at BigAndSmall.RomanceTagsExtensions.GetHighestSharedTag (BigAndSmall.BSCache first, BigAndSmall.BSCache second) [0x0000e] in <a46338c3110348f29cc28ce37a7483cc>:0
at BigAndSmall.RomancePatches.GetLovinghanceFactor (Verse.Pawn pawn, Verse.Pawn otherPawn, System.Single result) [0x00043] in <a46338c3110348f29cc28ce37a7483cc>:0
at BigAndSmall.RomancePatches.LovingFactorPostfix (System.Single& __result, RimWorld.Pawn_RelationsTracker __instance, Verse.Pawn otherPawn, Verse.Pawn ___pawn) [0x00001] in <a46338c3110348f29cc28ce37a7483cc>:0
at RimWorld.Pawn_RelationsTracker.SecondaryLovinChanceFactor (Verse.Pawn otherPawn) [0x00167] in <630e2863bc9a4a3493f2eff01e3a9556>:0
- TRANSPILER RedMattis.BetterPrerequisites: IEnumerable`1 BigAndSmall.RomancePatches:LovingFactor_Transpiler(IEnumerable`1 instructions)
- POSTFIX ReSpliceCharmweavers.Mod: Void ReSpliceCharmweavers.Pawn_RelationsTracker_SecondaryLovinChanceFactor_Patch:Postfix(Single& __result, Pawn_RelationsTracker __instance, Pawn otherPawn)
- POSTFIX RedMattis.BetterPrerequisites: Void BigAndSmall.RomancePatches:LovingFactorPostfix(Single& __result, Pawn_RelationsTracker __instance, Pawn otherPawn, Pawn ___pawn)
at RomanceOnTheRim.Dialog_DiplomaticMarriage.AcceptButtonActive () [0x00018] in <f29bee73bbc3403e8ea4a70d16845e26>:0
at RomanceOnTheRim.Dialog_DiplomaticMarriage.AddRejectAndAcceptButtons (UnityEngine.Rect rejectButtonRect, UnityEngine.Rect acceptButtonRect) [0x00065] in <f29bee73bbc3403e8ea4a70d16845e26>:0
at RomanceOnTheRim.Dialog_DiplomaticMarriage.DoWindowContents (UnityEngine.Rect inRect) [0x00434] in <f29bee73bbc3403e8ea4a70d16845e26>:0
at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001a6] in <630e2863bc9a4a3493f2eff01e3a9556>:0
Last edited by BerserkOlaf; 23 May @ 2:12pm
< >
Showing 1-3 of 3 comments
TheDZD 31 May @ 8:07pm 
Might not just be Romance on the Rim. I got a similar error from BigAndSmall.RomanceTagsExtensions when running B&S alongside Way Better Romance. The error would happen when I moused over a relation in the Social tab while having a pawn selected, but only when dev mode was enabled and the related pawn was off-map.

Similarly to this earlier discussion, I was able to clear the error by going to the B&S settings and clearing the cache, but the issue would come back if I saved and reloaded the save.

I'm currently trying to narrow down the issue and get a minimal list of mods that can replicate the error. I'll attach a HugsLog once I have that confirmed, but for now here is just the error:

System.NullReferenceException: Object reference not set to an instance of an object [Ref A0FF0217] at BigAndSmall.RomanceTagsExtensions.<GetHighestSharedTag>g__CheckTags|0_0 (BigAndSmall.RomanceTags rOne, BigAndSmall.RomanceTags rTwo, BigAndSmall.RomanceTagsExtensions+<>c__DisplayClass0_0& ) [0x0004b] in <a46338c3110348f29cc28ce37a7483cc>:0 at BigAndSmall.RomanceTagsExtensions.GetHighestSharedTag (BigAndSmall.BSCache first, BigAndSmall.BSCache second) [0x0000e] in <a46338c3110348f29cc28ce37a7483cc>:0 at BigAndSmall.RomancePatches.GetCompatibilityWith (Verse.Pawn pawn, Verse.Pawn otherPawn, System.Single reductionScale, System.Single oldValue) [0x000c5] in <a46338c3110348f29cc28ce37a7483cc>:0 at BigAndSmall.RomancePatches.CompatibilityWith_Postfix (System.Single& __result, RimWorld.Pawn_RelationsTracker __instance, Verse.Pawn otherPawn, Verse.Pawn ___pawn) [0x00001] in <a46338c3110348f29cc28ce37a7483cc>:0 at RimWorld.Pawn_RelationsTracker.CompatibilityWith (Verse.Pawn otherPawn) [0x000af] in <630e2863bc9a4a3493f2eff01e3a9556>:0 - TRANSPILER rimworld.divineDerivative.romance: IEnumerable`1 BetterRomance.HarmonyPatches.Pawn_RelationsTracker_CompatibilityWith:Transpiler(IEnumerable`1 instructions, ILGenerator ilg) - POSTFIX rimworld.OMGSplat.NoNegativeCompatibility: Void NoNegativeCompatibility.NoNegativeCompatibility_Patch:PostFix(Single& __result) - POSTFIX rimworld.OMGSplat.NoNegativeCompatibility: Void NoNegativeCompatibility.NoNegativeCompatibility_Patch:PostFix(Single& __result) - POSTFIX RedMattis.BetterPrerequisites: Void BigAndSmall.RomancePatches:CompatibilityWith_Postfix(Single& __result, Pawn_RelationsTracker __instance, Pawn otherPawn, Pawn ___pawn) at RimWorld.SocialCardUtility.GetPawnRowTooltip (RimWorld.SocialCardUtility+CachedSocialTabEntry entry, Verse.Pawn selPawnForSocialInfo) [0x0016b] in <630e2863bc9a4a3493f2eff01e3a9556>:0 - TRANSPILER rimworld.divineDerivative.romance: IEnumerable`1 BetterRomance.HarmonyPatches.SocialCardUtility_GetPawnRowTooltip:Transpiler(IEnumerable`1 instructions, ILGenerator ilg) - PREFIX Altered.Carbon: Boolean AlteredCarbon.SocialCardUtility_GetPawnRowTooltip_Patch:Prefix(CachedSocialTabEntry entry, Pawn selPawnForSocialInfo, String& __result) at RimWorld.SocialCardUtility+<>c__DisplayClass50_0.<DrawPawnRow>b__0 () [0x00000] in <630e2863bc9a4a3493f2eff01e3a9556>:0 at Verse.ActiveTip.get_FinalText () [0x0000d] in <630e2863bc9a4a3493f2eff01e3a9556>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
Last edited by TheDZD; 31 May @ 8:09pm
TheDZD 1 Jun @ 11:43am 
Looks like B&S's caching behavior on its own is causing the issue. I was able to reproduce the errror with a minimal mod list by doing the following:
  1. Turn on dev mode.
  2. Start a new crashlanded start with default world settings.
  3. At pawn selection, reroll pawns until I get a pawn that has a relationship to another pawn that will not be on-map (faction leaders, the "left behind" pawns, etc.)
  4. Select the pawn with the relation and mouse over the name of the off-map pawn. The mouseover tooltip works just fine at this point.
  5. Save the game and immediately load that save.
  6. Try doing #4 again. This will now spam errors trying to generate the mouseover tooltip.

As mentioned before, I can fix the error temporarily by clearing and re-generating the B&S cache via the button in the mod options, but it has to be done every time a save is loaded to prevent the issue.

Hugslog can be found here: https://gist.github.com/HugsLibRecordKeeper/3eb8ab44ff56a9bf306be02f95697f30
Last edited by TheDZD; 1 Jun @ 11:44am
RedMattis  [developer] 1 Jun @ 11:42pm 
Hm, it seems to not set up romance tag for some pawn there, perhaps because they aren't set as "humanlike" for whatever reason, which would cause the tags to not be generated.

I'll add some code to handle the tags being null.
< >
Showing 1-3 of 3 comments
Per page: 1530 50