mgba-emu / mgba

mGBA Game Boy Advance Emulator
https://mgba.io/
Mozilla Public License 2.0
5.38k stars 744 forks source link

[Bug?] field 'overlay' throws error after script reset #3167

Closed Bunkai9448 closed 2 months ago

Bunkai9448 commented 2 months ago

I was doing tests with the overlay script, if you want to reload a logo without displaying the previous one, you need to close and reopen the emulator for any overlay to work again.

I tried v0.10.3 and last dev build-2024-03-13-win32-8332-c8c9fcb665271054e8ed9a87f555c7b37d64e39c Both with the same result, here's the bug report attached with last dev build bug_overlay.zip

Steps to reproduce: Load https://github.com/mgba-emu/mgba/blob/master/res/scripts/logo-bounce.lua Reset the script Load https://github.com/mgba-emu/mgba/blob/master/res/scripts/logo-bounce.lua again Script throws error: [ERROR] ...ktop/romhacking gba.guide.ports/aluaCode/logo-bounce.lua:5: attempt to index a nil value (field 'overlay')