-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test bad event code for crashes #1720
Comments
When I added sanity checks to all the data coming from LCF files I ignored event script on purpose because it was too much work to handle this but should happen someday. Don't use Output::Error for this. Errors are extremely annoying for the user because the game terminates without saving. When you look through the code you will see that any recoverable Error is a Warning. |
I'm not sure about this. Take #1719 for example. Here RPG_RT will exit with a dialog popup. This is because its a bug in the game's event code. Do we really want to just silently skip the In cases like this, we could end up in a state of bad event code where instead of the game crashing without allowing the user to save, the user saves and their save is corrupted. It's also not our fault. The error indicates a fatal bug in the game, not Player. I think it's definitely a case by case basis. There are some other situations where you could just warn and ignore without consequences. |
Check missing files, invalid event calls, invalid event page calls, invalid skills, invalid items, invalid actor references: These are all cases where RPG_RT terminates but we handle all of them with a warning. |
Lets imagine some scenarios:
One more thing to keep in mind. Plugging these and removing player crashes will likely result in a big reduction of android crash reports. |
Leaving a note to remember #1707 Test cases 13 for this one. |
For every possible event command, we need to test it for bad data. Things like #1719
For each event command, try to find a way to have it use invalid data. Player should either ignore it if its benign, or report an error using
Output::Error()
.This will be more important when people are using Player to develop games, as bad event code should report errors instead of crashing.
The text was updated successfully, but these errors were encountered: