|Viewing Issue Advanced Details|
|ID||Category [?]||Severity [?]||Reproducibility||Date Submitted||Last Update|
|06477||Cheat System||Critical (emulator)||Always||28 days ago||10 days ago|
|Tester||EoceneMiacid||View Status||Public||Platform||MAME (Self-compiled)|
|Assigned To||cuavas||Resolution||Fixed||OS||Linux (64-bit)|
|Version||0.182||Fixed in Version||0.183||Build||64-bit|
|Summary||06477: All systems: MAME should ignore problematic cheats (or at least exit gracefully)|
MAME crashes (returning code 5) whenever cheats are enabled but a problematic cheat is defined.
Here's an example with Midnight Run (midnrun) using Pugsy's last release (intended for version 0.174)
"MAME exception: midnrun.xml(5): error parsing cheat expression "maincpu.pw@1AD8=0B37" (invalid number)"
|Steps To Reproduce||Enable cheats, launch a game/system that has a problematic cheat defined (such as midnrun)|
|Additional Information||Ideally MAME should send this warning to stderr, but not crash|
|Affected Sets / Systems||All systems|
28 days ago
edited on: 28 days ago
The crash is unintentional.
It used to work just fine up until about a year or so ago when some fiddling in debugger seems to have made non-functional cheats (those addressing cpu regions which don't exist, usually) to crash MAME out.
The current method to bypass is to use the internal CHEAT plugin instead of -cheat. For some reason, everything works as expected there and it will simply not load the offending cheats.
Previous attempts to fix it may not have worked as well as expected - 06241
25 days ago
|It's caused by using exceptions for error propagation when loading cheats, but writing code in a way that's decidedly not exception-safe. The problem is entirely in the cheat code, not the debugger. It's on my TODO list to fix, but it's not my highest priority at the moment.|
21 days ago
|On failure to parse an individual cheat, an error message should be printed and the cheat manager should move on to the next cheat. On a problematic cheat file, the cheat manager should print an error message and clear out all cheats. I've also fixed memory leaks, made lots of things const, and generally cleaned up the code. Let me know about any regressions.|
10 days ago
|Thank you very much Vas!|