Skip to content

Remove Rbp Probing - Fixes #612 (Skylantern), #658 (GoldenCube)#662

Merged
notfood merged 1 commit intorwmt:devfrom
Tick-git:Remove-Rbp-Probing
Sep 1, 2025
Merged

Remove Rbp Probing - Fixes #612 (Skylantern), #658 (GoldenCube)#662
notfood merged 1 commit intorwmt:devfrom
Tick-git:Remove-Rbp-Probing

Conversation

@Tick-git
Copy link

@Tick-git Tick-git commented Aug 31, 2025

Label: 1.6, fix

Important: Might be good to wait with merging until someone tests Windows -> Mac. But I'm almost certain it should work.

Fixes: #612 (Skylantern), #658 (GoldenCube)

I investigated issue #658. I tried reverting the changes to DeferredStackTracingImpl.cs step by step because I couldn't get my head around why this only happens in 1.6 and not in 1.5.

Reverts: #562
Rbp probing was originally introduced to address 1.6 crossplay issues between Windows and Linux, as well as mismatches when players were not using the same mod build. These issues have since been resolved by #623.

The probing causes errors when a constructor is invoked via reflection because it failed to find the next rbp pointer and then we tried to dereference a null pointer(#612, #658). I don’t have an exact explanation for why the probing fails, but since the issue is resolved by reverting to Zetrith’s original implementation (together with the #623 fix), there’s no need to investigate further, I think.

Reverts: #548
This was our first attempt changing rbp lookup in 1.6. However, it caused problems, which led to #562. In that PR, we changed the offset from +1 to +4. I initially reverted it back to this PR, but the stack trace was incomplete. Then, after switching the offset back to +1 - everything works fine. I assume this was also related to the #623 issue.

Tests

  • Windows release build → Windows release build → OK
  • Windows debug build → Windows debug build → OK
  • Windows release build → Linux VM release build → OK
  • Windows debug build → Linux VM release build → DESYNC (but this also happens on current dev)
  • Windows release build → Mac release build → Not tested (requested on Discord)

RBD probing was originally to address 1.6 issues with crossplay between Windows and Linux, as well as when players were not using the same build of the mod. This issue has now been resolved by rwmt#623.

The probing caused errors when a constructor was invoked via reflection. I don’t have an explanation for why this is happening, but it’s not worth investigating at the moment, as we are reverting the code to the state that Zetrith implemented, along with the rwmt#623 fix.
@notfood notfood added fix Fixes for a bug or desync. 1.6 Fixes or bugs relating to 1.6 (Not Odyssey). labels Aug 31, 2025
@notfood notfood moved this to In review in 1.6 and Odyssey Aug 31, 2025
@Tick-git
Copy link
Author

Tick-git commented Sep 1, 2025

Windows -> Mac has been tested and works as expected. Good to merge from my side. :)

@notfood notfood merged commit 32f3215 into rwmt:dev Sep 1, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In review to Done in 1.6 and Odyssey Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6 Fixes or bugs relating to 1.6 (Not Odyssey). fix Fixes for a bug or desync.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

NullReferenceException gamebreaking bug Skylantern festival ritual throws NRE every tick

2 participants