SamuZai
RTA
RTA

patreon


From Chaos to Stability: Fixing Flycast’s Input Issues

Hi everyone!

As I wrapped up preparations for the new RePlay OS image release, I encountered persistent and seemingly random crashes in the Flycast core. Initially suspecting frontend memory leaks, I conducted a thorough memory analysis using tools like Valgrind. This process revealed dozens of critical memory management issues, prompting extensive code refactoring across the application—including improvements to input configuration handling, core lifecycle management, the video engine, and more.

While these changes significantly enhance stability, they also touch many components, which could inadvertently introduce new bugs. So far, testing suggests the system is in a stable state, but I encourage the T2 and T3 Patreon members to rigorously validate this in the upcoming BETA release.

But here’s the twist: Despite these fixes, the Flycast crashes persisted. Digging deeper into the core’s codebase, I discovered that certain critical variables were not properly initialized or released when the core was unloaded and reloaded. This led to memory corruption in specific scenarios. A simple yet vital fix (now pending to be merged upstream) resolves this by explicitly resetting static state during core load and unload.

🔍 Curious about the changes? Check out the pull request here:
Flycast PR #1871

Huge thanks to the community for your patience and support. Let’s keep pushing for a rock-solid experience!

Stay tuned for more updates!

Comments

Muchas gracias por la data!Excelente trabajo!

arcadezone_81

Not only we are getting the best emulation os, we are also improving upstream core code. Well done! Will test vigorously for sure.

strongorder


More Creators