Skip to content

add mutex for switching pointer inspector address#1298

Merged
Jamiras merged 1 commit intoRetroAchievements:masterfrom
Jamiras:bugfix/ptr_inspector_mutex
Mar 21, 2026
Merged

add mutex for switching pointer inspector address#1298
Jamiras merged 1 commit intoRetroAchievements:masterfrom
Jamiras:bugfix/ptr_inspector_mutex

Conversation

@Jamiras
Copy link
Member

@Jamiras Jamiras commented Mar 4, 2026

https://discord.com/channels/310192285306454017/1149693430306447380/1478492057495539725

Because dolphin does memory reads in the non-UI thread, there's a race condition when changing the selected address in the pointer finder. Each time the selection changes, a message is queued to update the field list. If another message is queued before the first is processed, the code may try to modify the list using data from the previous node. If the nodes aren't the same size, an array indexing error can occur, leading to an exception or crash.

This PR adds a mutex and some redundancy logic to ensure only one address is processed at a time.

@Jamiras Jamiras added this to the 1.4.1 milestone Mar 4, 2026
@Jamiras Jamiras changed the title add mutex for switching address add mutex for switching pointer inspector address Mar 4, 2026
@Jamiras Jamiras merged commit 5745dd0 into RetroAchievements:master Mar 21, 2026
6 checks passed
@Jamiras Jamiras deleted the bugfix/ptr_inspector_mutex branch March 21, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant