Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes I get games that get "stuck". Example below #28

Open
pjsg opened this issue Feb 6, 2022 · 1 comment
Open

Sometimes I get games that get "stuck". Example below #28

pjsg opened this issue Feb 6, 2022 · 1 comment

Comments

@pjsg
Copy link

pjsg commented Feb 6, 2022

First, let me thank you for this game -- it keeps me on my toes!

image

It says that I flagged a square that could be empty. This isn't actually true. The last move was the 4 in roughly the middle of the row, 5 rows up. Now, I can't click anywhere, and the undo button doesn't work either.

However, there is interesting stuff in the console log:

minisat.js:27 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:28 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:25 Uncaught abort() at Error
    at Ma (https://pwmarcz.pl/kaboom/lib/minisat.js:41:363)
    at E (https://pwmarcz.pl/kaboom/lib/minisat.js:170:155)
    at Function.qa [as tb] (https://pwmarcz.pl/kaboom/lib/minisat.js:31:236)
    at Cc (https://pwmarcz.pl/kaboom/lib/minisat.js:123:421)
    at cF (https://pwmarcz.pl/kaboom/lib/minisat.js:151:117846)
    at cH (https://pwmarcz.pl/kaboom/lib/minisat.js:151:130595)
    at b5 (https://pwmarcz.pl/kaboom/lib/minisat.js:151:62962)
    at cq (https://pwmarcz.pl/kaboom/lib/minisat.js:151:100408)
    at ch (https://pwmarcz.pl/kaboom/lib/minisat.js:151:86577)
    at by (https://pwmarcz.pl/kaboom/lib/minisat.js:151:11303)
minisat.js:27 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:28 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:25 Uncaught abort() at Error
    at Ma (https://pwmarcz.pl/kaboom/lib/minisat.js:41:363)
    at E (https://pwmarcz.pl/kaboom/lib/minisat.js:170:155)
    at Function.qa [as tb] (https://pwmarcz.pl/kaboom/lib/minisat.js:31:236)
    at Cc (https://pwmarcz.pl/kaboom/lib/minisat.js:123:421)
    at cF (https://pwmarcz.pl/kaboom/lib/minisat.js:151:117846)
    at cH (https://pwmarcz.pl/kaboom/lib/minisat.js:151:130595)
    at b5 (https://pwmarcz.pl/kaboom/lib/minisat.js:151:62962)
    at by (https://pwmarcz.pl/kaboom/lib/minisat.js:151:3689)
    at wa (https://pwmarcz.pl/kaboom/lib/minisat.js:33:237)
    at https://pwmarcz.pl/kaboom/lib/minisat.js:33:367
minisat.js:27 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:28 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:25 Uncaught abort() at Error
    at Ma (https://pwmarcz.pl/kaboom/lib/minisat.js:41:363)
    at E (https://pwmarcz.pl/kaboom/lib/minisat.js:170:155)
    at Function.qa [as tb] (https://pwmarcz.pl/kaboom/lib/minisat.js:31:236)
    at Cc (https://pwmarcz.pl/kaboom/lib/minisat.js:123:421)
    at cF (https://pwmarcz.pl/kaboom/lib/minisat.js:151:117846)
    at cH (https://pwmarcz.pl/kaboom/lib/minisat.js:151:130595)
    at b5 (https://pwmarcz.pl/kaboom/lib/minisat.js:151:62962)
    at by (https://pwmarcz.pl/kaboom/lib/minisat.js:151:3689)
    at wa (https://pwmarcz.pl/kaboom/lib/minisat.js:33:237)
    at https://pwmarcz.pl/kaboom/lib/minisat.js:33:367
minisat.js:27 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:28 Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 67108864, or (2) set Module.TOTAL_MEMORY before the program runs.
minisat.js:25 Uncaught abort() at Error
    at Ma (https://pwmarcz.pl/kaboom/lib/minisat.js:41:363)
    at E (https://pwmarcz.pl/kaboom/lib/minisat.js:170:155)
    at Function.qa [as tb] (https://pwmarcz.pl/kaboom/lib/minisat.js:31:236)
    at Cc (https://pwmarcz.pl/kaboom/lib/minisat.js:123:421)
    at cF (https://pwmarcz.pl/kaboom/lib/minisat.js:151:117846)
    at cH (https://pwmarcz.pl/kaboom/lib/minisat.js:151:130595)
    at b5 (https://pwmarcz.pl/kaboom/lib/minisat.js:151:62962)
    at by (https://pwmarcz.pl/kaboom/lib/minisat.js:151:3689)
    at wa (https://pwmarcz.pl/kaboom/lib/minisat.js:33:237)
    at https://pwmarcz.pl/kaboom/lib/minisat.js:33:367
DevTools failed to load source map: Could not load content for https://pwmarcz.pl/kaboom/lib/bootstrap.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
@pwmarcz
Copy link
Owner

pwmarcz commented Feb 6, 2022

Thanks for the report! Looks like the version of minisat.js I have is not able to handle such huge data, and crashes with out-of-memory. I will need to look into rebuilding it.

For now, unfortunately the only workaround is "don't do that" :( Revealing the mines in such a diagonal pattern is generating a lot of clauses for the solver (you can see the number when you enable debug mode) - even if it doesn't crash the solver, it's going to be very slow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants