pwmarcz / kaboom

Cruel but fair Minesweeper clone
https://pwmarcz.pl/kaboom
MIT License
210 stars 17 forks source link

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

Open pjsg opened 2 years ago

pjsg commented 2 years ago

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 commented 2 years ago

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