Open orbea opened 5 years ago
Paging @fr500
It will not crash if the first core is fbalpha and the second core is bsnes, but it will crash if the first core is bsnes and the second core is fbalpha. As fr500 said in irc last night the reason might be that the second core has more subsystems.
I am pretty sure I can patch this out but this is really problematic for a number of reasons What is happening is a new core was peeked that has more subsystems than the current one.
So there are two different instances of subsystem data in memory at the same time
The menu uses the following to figure out what to show:
/* Core fully loaded, use the subsystem data */
if (system->subsystem.data)
subsystem = system->subsystem.data;
/* Core not loaded completely, use the data we peeked on load core */
else
subsystem = subsystem_data;
menu_subsystem_populate(subsystem, info);
So, since the first core is STILL FULLY LOADED it's going for the true codepath. Now I could track that a core has changed and force the correct codepath but this is basically what I have been asking forever
LOAD CORE should not be available while a game is loaded. Reasons:
As you can see, it's a BIG PROBLEM. As I said I think I can pretty much patch this up but it doesn't solve the big problem.
The solutions are:
Loading a Core while Content is active results in RA being in a really really really inconsistent state. This should be fixed at the root of the problem.
Hide Load Core when content is active
I am okay with this solution and prefer it over the alternative. However I think refactoring the code base to prevent these kinds of issues would be better, but its also much more work...
Does this still happen?
Yes, I don't think anything was done beyond discussing if its better to fix this by hiding Load Core
when content is loaded or if someone wants to spend time doing a more involved and harder fix.
LOAD CORE should not be available while a game is loaded.
PR #8194 does this for RGUI. Would you like me to do it for the other menu drivers as well...?
Description
When running a core that supports subsystems like snes9x or sameboy and then loading another core that also supports subsystems it will crash.
So far I have found it will only crash if the second core is fbalpha or bsnes.
Expected behavior
It should not segfault.
Actual behavior
Full GDB log - https://pastebin.com/mstV19C8
Steps to reproduce the bug
Bisect Results
45228d030718deed3ecc0eef72f7bef09221cf1f
Version/Commit
You can find this information under Information/System Information
Environment information
Slackware64-current
gcc-8.2.0