You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When logging invalid memory writes I noticed pokemon emerald tries to read from a NULL pointer during the fade out animation in the naming screen (right after the players confirm their name)
The problematic function is called GetTextCaretPosition, and this is the instruction that loads the global pointer gNamingScreenData
Confirmed this bug with no$gba
It happens just as the screen is about to be swapped.
As you can see, R4 is NULL and was used to calculate R1.
This causes a read into the bios address space, which returns the last executed bios opcode as documented in GBATEK. (See R1 in the above image, this is a LDR PC, [LR,#-2]
My emulator does not emulate this behavior but it does not matter for the scope of this bug.
When logging invalid memory writes I noticed pokemon emerald tries to read from a NULL pointer during the fade out animation in the naming screen (right after the players confirm their name)
The problematic function is called
GetTextCaretPosition
, and this is the instruction that loads the global pointergNamingScreenData
gNamingScreenData is set to NULL when waiting for the fade to finish in the following function
But for some reason
GetTextCaretPosition
still gets called every frame causing this NULL deref.Possibly a real bug in the game itself?
The text was updated successfully, but these errors were encountered: