js-dos icon indicating copy to clipboard operation
js-dos copied to clipboard

Uncaught RuntimeError: unreachable

Open Ziiven opened this issue 3 years ago • 12 comments
trafficstars

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)

Ziiven avatar Sep 05 '22 00:09 Ziiven

Do you have link to test?

caiiiycuk avatar Sep 05 '22 06:09 caiiiycuk

@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.

Ziiven avatar Sep 05 '22 09:09 Ziiven

Is it because the save in the indexedDB is too large? There was another user mentioned a similar error about 2-3 months ago, which happened in the same game level and around 50 rounds

IMG_1706 IMG_1707

Ziiven avatar Sep 05 '22 09:09 Ziiven

Nope, it’s not related to saves. The problem is in game. I need the game and save on 49 level to reproduce and fix

Пн, 5 сент. 2022 г. в 12:16, Ziiven @.***>:

Is it because the save in the indexedDB is too large? There was another user mentioned the same error about 2-3 months ago, which happened in the same game level and around 50 rounds

— Reply to this email directly, view it on GitHub https://github.com/caiiiycuk/js-dos/issues/247#issuecomment-1236744687, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANFVMCI3OGAILBT3AURBLLV4W257ANCNFSM6AAAAAAQERTDVI . You are receiving this because you were mentioned.Message ID: @.***>

caiiiycuk avatar Sep 05 '22 09:09 caiiiycuk

@caiiiycuk I have asked that user to keep the save. Could you tell me how to export the saves from browser?

Ziiven avatar Sep 05 '22 09:09 Ziiven

If you use logged integration, then you can find download button in js-dos settings. Btw, maybe you can pass this turns on PC?

caiiiycuk avatar Sep 05 '22 12:09 caiiiycuk

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.

Ziiven avatar Sep 05 '22 14:09 Ziiven

Which game we are talking about?

caiiiycuk avatar Sep 05 '22 14:09 caiiiycuk

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;
    }

base64ArrayBuffer.txt

Ziiven avatar Sep 05 '22 23:09 Ziiven

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:

  1. in the main menu select "continue"
  2. once the game loaded, use the arrow key to move the selector to a grid that without any NPC
  3. press "space" key to popup a option menu, select "end" at the bottom by using the arrow key
  4. confirm end turn by press "space" key
  5. error triggered

1662439152137

Ziiven avatar Sep 06 '22 04:09 Ziiven

@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 :)

Ziiven avatar Sep 13 '22 00:09 Ziiven

Interesting, thanks! I will keep it open, cause I still want to look into.

caiiiycuk avatar Sep 13 '22 05:09 caiiiycuk