rossimo / retrobot

MIT License
281 stars 16 forks source link

Bot does not gracefully recover from errors #35

Open silasary opened 2 years ago

silasary commented 2 years ago

If bot experiences network issues between locking components and sending the next image, the channel can become softlocked, requiring a reboot to unlock the channel.

An /unlock admin command would be useful to resolve such situations.

rossimo commented 2 years ago

Another crash that leads to the same scenario:

TypeError: Cannot read properties of undefined (reading 'refcount')
    at __emval_decref (C:\retrobot\stable\cores\mgba_libretro.js:9:109035)
    at wasm://wasm/008f4a76:wasm-function[392]:0x69758
    at Object.retro_load_game (eval at new_ (C:\retrobot\stable\cores\mgba_libretro.js:9:111995), <anonymous>:8:10)
    at loadRom (C:\retrobot\stable\src\util.ts:8:25)
    at exports.default (C:\retrobot\stable\src\worker.ts:125:16)
    at async C:\retrobot\stable\node_modules\piscina\src\worker.ts:147:20
RuntimeError: table index is out of bounds
    at wasm://wasm/008f4a76:wasm-function[2242]:0xf7b57
    at wasm://wasm/008f4a76:wasm-function[374]:0x69009
    at wasm://wasm/008f4a76:wasm-function[391]:0x69721
    at Object.retro_get_system_av_info (eval at new_ (C:\retrobot\stable\cores\mgba_libretro.js:9:111995), <anonymous>:8:1)
    at exports.default (C:\retrobot\stable\src\worker.ts:144:10)
    at async C:\retrobot\stable\node_modules\piscina\src\worker.ts:147:20