Skip to content

Patch VC Crash 2 - #2619

Open
Rebbacus wants to merge 1 commit into
OoTRandomizer:Devfrom
Rebbacus:wadpatchrev2
Open

Patch VC Crash 2#2619
Rebbacus wants to merge 1 commit into
OoTRandomizer:Devfrom
Rebbacus:wadpatchrev2

Conversation

@Rebbacus

Copy link
Copy Markdown

First: Found a function call during rom loading that contained a progress value! It did nothing, so hooked that to get a nicer percentage display. So that should fix the load-in progress value during start-up and resume from home menu.

Now for the other crash.
This is such a rare crash that it's wild two people got it so close together recently. It's identifiable by the SRR0:80040738 and DAR:00000040 present on both the N64 registers and Wii GP registers pages.
MMR had this same crash almost three years ago, but back then I figured it was a side-effect of the unpatched cpuExecuteCall bug, and without the more extensive decompile work done on the WiiVC to reference, gave up trying to track it down.

treeCleanCrash-1

The error this is fixing: https://github.com/zeldaret/oot-vc/blob/9c1853710bcf6b598b0710022fdb87b9a8e99e2c/src/emulator/cpu.c#L12847-L12850
if the values start and end fit right between a restore node's nAddress0 and nAddress1, the restore node won't get nulled when it should, leading to its data becoming stale and possibly leading to a crash in a later call of the function treeCleanNodes.
There's no need to check where end is, if start is greater than nAddress0, and equal or less than nAddress1, then root->restore should be nulled.

I've hooked up a screen print function on the patched crash condition, to see if this possibly occurs more often than it does crash. Hope to only see this in another three years!

NICE01_2026-08-20_22-53-34

(...I hope there isn't any other causes to this crash...)

Testing

Played US version for a bit on Wii to check stability, seems fine. Forced the error message to see that it displays on correctly on wii too. JP version was booted into game and seems okay.

…ion was met. Fix US version's load-in progress display.
@djevangelia

Copy link
Copy Markdown

Super cool and super impressive!
I'm thinking how to make a message to encourage players to report it if they encounter it for further research.
It might be worth adding something like "you can continue to play normally" too as it comes from nowhere.

@flagrama

Copy link
Copy Markdown

I'm not sure additional messaging for posting it is entirely necessary. People tend to post screenshots when something they don't expect happens and ask about it anyway.

@djevangelia

Copy link
Copy Markdown

Do we have stats on how many people don't post when something unexpected happens? 🧐
Considering it's so extremely rare, I think it's not a bad decision to actively encourage it.

@flagrama

Copy link
Copy Markdown

People who don't post in the Discord in the first place which will ignore the message anyway. Nothing lost.

@TreZc0

TreZc0 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Yeah i think it makes sense to hook up this message to the debug flag

@flagrama

flagrama commented Aug 22, 2026

Copy link
Copy Markdown

I disagree with that. We need the message at least initially so that we can see when the issue reoccurs to see how often it actually happens, especially if it hasn't always caused crashes. We also want to see if it occurs and causes a different crash or if a different crash happens and this is entirely unrelated.

@fenhl fenhl added Type: Bug Something isn't working Type: Enhancement New feature or request Status: Needs Review Someone should be looking at it Status: Under Consideration Developers are considering whether to accept or decline the feature described Component: Patching Affects the patching of the ROM and removed Type: Enhancement New feature or request Status: Under Consideration Developers are considering whether to accept or decline the feature described labels Aug 22, 2026
@TreZc0

TreZc0 commented Aug 22, 2026

Copy link
Copy Markdown
Member

But not at the cost of confusing casuals and having this spun up to people who's first thought would not be to run to our bug reports channels. Stuff like that should at the very least not belong into a full release, i am okay with having it in dev though.

@flagrama

Copy link
Copy Markdown

Yeah, that sounds like a fine compromise to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Patching Affects the patching of the ROM Status: Needs Review Someone should be looking at it Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants