KSudoku freezes when starting 25x25 game

Bug #552315 reported by Jeremiah
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE Games
Unknown
High
kdegames (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kdegames

I can start a game, but it freezes even before the puzzle is loaded.

Revision history for this message
Dude (computergeek2015) wrote :

I have the same problem. It also affects 16x16 for me.

Revision history for this message
In , Frank Schaefer (fschaefer-oss) wrote :

Version: 0.5 (using KDE 4.4.4)
OS: Linux

When trying to start the games

Sudoku 16x16
Sudoku 25x25
Roxdoku 16 (4x4x4)
Roxdoku 25 (5x5x5)

the "Play"-button hangs (keeps pressed) and the game doesn't start.

Reproducible: Always

Revision history for this message
In , Frank Schaefer (fschaefer-oss) wrote :

After waiting for ~20 seconds, Sudoku 16x16 finally starts.
Sudoku 25x25 didn't start within 8 minutes, so I stopped time measuring.
Seems like the game engine is doing some heavy work...

Revision history for this message
Dan McGrath (troubled) wrote :

I have this problem as well.

I did notice though that it happens somewhat randomly, and more often as you increase the number of tiles and/or the game difficulty. If I were to hazard a guess, I would think the game gets stuck in a loop trying to find a solvable map, since it takes up 100% of one core indefinitely.

a (tuomasjjrasanen)
Changed in kdegames (Ubuntu):
status: New → Confirmed
Revision history for this message
a (tuomasjjrasanen) wrote :

Danny McGrath's guess was correct. The execution loops in Puzzle::createPartial() until a solution is found.

I have made a upstream bug report: https://bugs.kde.org/show_bug.cgi?id=245756

Changed in kdegames:
status: Unknown → New
Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 245756 has been marked as a duplicate of this bug. ***

Changed in kdegames:
status: New → Unknown
Changed in kdegames:
status: Unknown → Confirmed
Changed in kdegames:
importance: Unknown → High
Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 278870 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank Schaefer (fschaefer-oss) wrote :

With KDE 4.9.4, this happens only noticable at difficulty level "unlimited".
I don't know if such a level really makes sense. If yes, there should be a status dialog with a "Cancel" button while creating the puzzle.

Revision history for this message
In , Iandw-au (iandw-au) wrote :

The new puzzle generator introduced in KDE SC 4.8 does not have this problem, except as you have observed in Unlimited difficulty mode. It encounters "road blocks" unpredictably during the generation process, instead of churning out and checking candidate puzzles regularly.

There is already a limit of 20 attempts to generate a puzzle with the type, size, difficulty and symmetry as ordered, after which KSudoku picks the best attempt so far and the user has the option to go on trying. Unlimited mode is just not getting that far on large-size puzzles. This is not right, but I cannot decide if it is worth investigating.

The point of Unlimited mode is for possible savants out there who have no problem with how many guessing and backtracking points there may be nor how soon the guessing has to start. The levels up to and including Hard normally require no guessing. These and the Diabolical level, which usually does require guessing, have been tested and calibrated against published puzzles in newspapers etc. My wife, who regularly does Hard and Diabolical puzzles, found Unlimited puzzles "inhuman" (i.e. tedious, very difficult and no fun) and my own experience was the same. That is why I introduced limits on guessing in the other levels.

Changed in kdegames:
status: Confirmed → Unknown
Revision history for this message
In , Christoph-maxiom (christoph-maxiom) wrote :

*** Bug 325199 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Codestruct (codestruct) wrote :

https://phabricator.kde.org/D12908 extends the Unlimited message box to warn users that the generation of Unlimited puzzles might take long time.

Revision history for this message
In , Codestruct (codestruct) wrote :

I lower the Importance from Crash to Grave.

Revision history for this message
In , Codestruct (codestruct) wrote :

Suggestion for a sustainable solution:

Currently we have a Welcome Screen and a Game Screen. This could be extended by a Generate Puzzle Screen.

This new Generate Puzzle could contain:

- A progress bar to indicate puzzle generating work (would solve this ticket)

- The message "It will be possible to solve the generated puzzle by logic alone. No guessing will be required. The internal difficulty rating is 3.6. There are 31 clues at the start and 50 moves to go." instead of in a message box

- "Generate New" button (formerly the "Retry" button from the message box)

- Difficulty and Symmetry settings - This way those comboboxes could be removed from the status bar and replaced by simple labels as the comboboxes have no function in the Game Screen.

- The message "After 20 tries, the best difficulty level achieved is 2, with internal difficulty rating 2.8, but you requested difficulty level 4. Do you wish to try again or accept the puzzle as is?" instead of a complicated message box (see also https://bugs.kde.org/show_bug.cgi?id=357999)

- "Back to Game selection" button

Revision history for this message
In , Codestruct (codestruct) wrote :

Git commit b6e059b12644fa70693d47801dcdfc515923aba7 by Gregor Mi.
Committed on 07/07/2018 at 16:54.
Pushed by gregormi into branch 'master'.

Improve two messages

Summary:
Related: bug 357999

1. Improve Low Difficulty warning message to solve Bug 357999 ("Missing word in Low Difficulty warning message")
2. Improve Bug 242300 ('"Generate A Puzzle" hangs when big games like 16x16 or 25x25 games are chosen"): Warns users that generation of Unlimited mode puzzles takes long time
3. Explain better what "Enable all messages" means

Reviewers: #kde_games, aacid

Reviewed By: aacid

Subscribers: mreeves, aacid, ngraham, kde-games-devel

Differential Revision: https://phabricator.kde.org/D12908

M +7 -6 src/generator/sudokuboard.cpp
M +7 -2 src/gui/ksudoku.cpp

https://commits.kde.org/ksudoku/b6e059b12644fa70693d47801dcdfc515923aba7

Simon Quigley (tsimonq2)
Changed in kdegames (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.