peon2 / fbneo-training-mode

a simple training mode for multiple games on the fbneo platform
58 stars 35 forks source link

tableio's table.load() crashes the emulator in some games #86

Closed poliva closed 2 years ago

poliva commented 2 years ago

Not sure if it's an issue specific to my computer, but when I try to start some games, if the games//config.lua does not exists, the training mode starts successfully with the default values, however if the config.lua does exist, the emulator crashes.

Steps to replicate:

Replacing table.load() to just return "nil" avoids the crash, so i'm guessing the issue is something there, but haven't been able to figure out what.

peon2 commented 2 years ago

Crashes seem to most commonly occur with file reads and gd image building/reading. I've tried to make it a little more consistent with 34691e74 but I wonder if there's an underlying issue with the gd library or interfacing with it.

peon2 commented 2 years ago

It's very strange that this only regularly happens with cps2 games (and a select few).

poliva commented 2 years ago

The issue seems to be only with games that use cps2-hitboxes

poliva commented 2 years ago

This seems to fix it in the games i have tried, and doesn't seem to break anything else: https://github.com/poliva/fbneo-training-mode/commit/3db35db4a7403f9e1b1d1c6307e881b7882b42fc

it probably needs more testing before it's ready to ship.

poliva commented 2 years ago

ok, i've done some more extensive testing and it seems to do the trick. CPS2 hitboxes are displayed correctly, and the emu doesn't crash anymore. I'm going to submit a pull req with it.