Uncaught RuntimeError: unreachable
Ziiven opened this issue · comments
Hi, I'm using jsdos play a turn based game. But when I reached about 50 rounds the game freeze and shows this error in the console
wdosbox.js:9 Uncaught RuntimeError: unreachable
at 0059645a:0x9ca6
at 0059645a:0x2824
at 0059645a:0x11a05b
at 0059645a:0xf5607
at 0059645a:0xdf3e7
at ret. (wdosbox.js:9:110113)
at Object.doRewind (wdosbox.js:9:111349)
at wdosbox.js:9:111941
at Module.receive (wdosbox.js:9:13772)
Uncaught RuntimeError: unreachable
Uncaught RuntimeError: table index is out of bounds
Uncaught RuntimeError: table index is out of bounds
at 0059645a:0xdd98b
at ret. (wdosbox.js:9:110113)
at Object.doRewind (wdosbox.js:9:111349)
at wdosbox.js:9:111941
at Module.receive (wdosbox.js:9:13772)
Do you have link to test?
@caiiiycuk sorry I don't have. It happened in one of my users.
I think myabe this error is related with the saves in indexedDB? Because he said he saved the game in the 49th round, and it will throw this error every time in the 50th round.
@caiiiycuk I have asked that user to keep the save. Could you tell me how to export the saves from browser?
If you use logged integration, then you can find download button in js-dos settings. Btw, maybe you can pass this turns on PC?
He said the game freeze after he end the player's turn, no matter what he did. Anyway I will upload the game save as soon as he give it to me.
Which game we are talking about?
The game is called "Flame Dragon 2". The game bundle is here: https://doszone-uploads.s3.dualstack.eu-central-1.amazonaws.com/personal-v2/studio/dkkpr/bundle.jsdos
However I found out I didn't use logged integration. Is it ok if I exported the game save as arrayBuffer and converted it to base64? You can convert it back to arrayBuffer using this function:
function _base64ToArrayBuffer(base64) {
let binary_string = window.atob(base64);
let len = binary_string.length;
let bytes = new Uint8Array(len);
for (let i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}
Just tried the save myself, it will 100% trigger the error even the player don't do anything in that round
When you enter the game you can do the following steps to reproduce:
- in the main menu select "continue"
- once the game loaded, use the arrow key to move the selector to a grid that without any NPC
- press "space" key to popup a option menu, select "end" at the bottom by using the arrow key
- confirm end turn by press "space" key
- error triggered
@caiiiycuk Just confirmed that this issue is not related to the jsdos. It is something that in the game itself (it set a maximum turns of 50, and will force the game to stop when reach 50). So please close this issue :)
Interesting, thanks! I will keep it open, cause I still want to look into.