Bug 81942 - freecell: wrong automatic placement of cards into the foundation piles
Summary: freecell: wrong automatic placement of cards into the foundation piles
Status: RESOLVED DUPLICATE of bug 56637
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-21 00:59 UTC by Levy, Chen
Modified: 2006-10-29 21:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Imposible state in freecell. (289.72 KB, image/png)
2004-05-21 01:04 UTC, Levy, Chen
Details
Drowing error (274.60 KB, image/png)
2004-05-21 01:07 UTC, Levy, Chen
Details
Game initial position (242.25 KB, image/png)
2004-05-21 01:10 UTC, Levy, Chen
Details
Screenshot: 2nd occurrence of the bug - 6-of-harts is out. (164.08 KB, image/png)
2004-06-16 16:11 UTC, Levy, Chen
Details
Screenshot: 2nd occurrence of the bug - 6-of-harts alone (185.33 KB, image/png)
2004-06-16 16:16 UTC, Levy, Chen
Details
Bad Ordering in Klondike (281.93 KB, image/png)
2005-10-15 10:47 UTC, Kent Fredric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Levy, Chen 2004-05-21 00:59:39 UTC
Version:           2.0 (using KDE 3.2.2-3.1.rh73.kde, Red Hat Linux release 7.3 (Valhalla))
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113.0)
OS:                Linux (i686) release 2.4.20-30.7.legacy

Disclaimer: I am not sure if I will be able to reproduce this bug. I think it happened after I undid some steps, and then continue playing, but I am not sure about it.

I will try to give a trace of the game. I hope it helps.

I got into an impossible state (screen-shot):

[  ][  ][  ][  ]  [Qc][0h][9s][Jd]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                      Qh  Qd  Qs
                      Js      Jh
                              0s
                              9d

(see "How to read the ASCII art?" below)

Note that the 9-of-diamond is out while the top card of diamond foundation pile is jack.


Undo 1
[  ][  ][  ][  ]  [Jc][0h][9s][Jd]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                      Js      Jh
                              0s
                              9d

Undo 2
[  ][  ][  ][  ]  [0c][0h][9s][Jd]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                      Js  Jc  Jh
                              0s
                              9d

Undo 3
[  ][  ][  ][  ]  [0c][0h][9s][Jd]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                      Js  Jc  Jh
                              0s
                              9d

Undo 4
[  ][  ][  ][  ]  [0c][9h][9s][Jd]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                      Js  Jc  Jh
                          0h  0s
                              9d

Undo 5
[  ][  ][  ][  ]  [0c][9h][9s][0d]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                          0h  0s
                              9d

Undo 6
[  ][  ][  ][  ]  [9c][9h][9s][0d]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                  0c      0h  0s
                              9d

Undo 7
[  ][  ][  ][  ]  [9c][8h][9s][0d]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                  0c      0h  0s
                  9h          9d

Undo 8
[  ][  ][  ][  ]  [9c][8h][9s][0d]
 [  ][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                  0c      0h  0s
                  9h          9d

Undo 9
[  ][  ][  ][  ]  [9c][7h][9s][0d]
 [8h][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                  0c      0h  0s
                  9h          9d

Undo 10
[  ][  ][  ][  ]  [9c][7h][9s][0d]
 [8h][  ][  ][  ][Kd][Ks][Kc][Kh]
                  Qc  Qh  Qd  Qs
                  Jd  Js  Jc  Jh
                  0c      0h  0s
                  9h          9d

Undo 10
[  ][  ][  ][  ]  [9c][7h][9s][0d]
 [8h][  ][  ][  ][Kd][Ks][Kc][Kh]
  Js              Qc  Qh  Qd  Qs
                  Jd      Jc  Jh
                  0c      0h  0s
                  9h          9d

Undo 11
[  ][  ][  ][  ]  [9c][7h][8s][0d]
 [8h][  ][  ][  ][Kd][Ks][Kc][Kh]
  Js              Qc  Qh  Qd  Qs
                  Jd      Jc  Jh
                  0c      0h  0s
                  9h      9s  9d

Undo 12
[  ][  ][  ][  ]  [9c][7h][8s][0d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
              Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s

Undo 13
[  ][  ][  ][  ]  [9c][7h][8s][0d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
              Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s

Undo 14a (oops)
[  ][  ][  ][  ]  [9c][7h][8s][9d]
 [8h][  ][  ][  ][Kd][Ks][Kc][Kh]
  Js              Qc  Qh  Qd  Qc
  0d              Jd      Jc  Jh
                  0c      0h  0s
                  9h      9s  
                              ^^
Some weird stuff here:
* the cards in the right most playing pile (marked with ^^) are not aligned correctly to the pile position (screen-shot).
This pile is movable. The game think it to be positioned as in undo-13. I deduce that by the fact that when I move the pile to a different position, I see the animation moves logic. But when I move it to the original position like in undo-13, it simply move there with no move logic.
* There are 3 changes in this undo:
  1) The 10-of-diamond was moved from the foundation pile to the playing pile (this is correct)
  2) The 9-of-diamond was moved from the playing pile to the foundation pile (how can it happen on an undo?)
  3) The the pile that contained the 9-of-diamond was moved to a different playing pile (see previous point).

Undo 14b
[  ][  ][  ][  ]  [9c][7h][8s][9d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
  0d          Jh  Jd      Jc
              0s  0c      0h
                  9h      9s

Undo 15
[  ][  ][  ][  ]  [9c][7h][8s][8d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
  0d          Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s

Undo 16
[  ][  ][  ][  ]  [9c][7h][8s][7d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][8d]
  Js          Qc  Qc  Qh  Qd
  0d          Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s

Undo 17
[  ][  ][  ][  ]  [9c][7h][8s][7d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
  0d          Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s
                          8d

Undo 18
[  ][  ][  ][  ]  [9c][7h][7s][7d]
 [8h][  ][  ][Kh][Kd][Ks][Kc][  ]
  Js          Qc  Qc  Qh  Qd
  0d          Jh  Jd      Jc
              0s  0c      0h
              9d  9h      9s
                  8s      8d
                          
And so on... the rest looks OK, and quite frankly, I am all spent.

I will attach a screen-shot of the start position. I don't know what game number it is.


How to read the ASCII art?

[  ]  a place of a card
[Ns]  a place with a card in it:
      N is the number: 
        A   = ace
        2-9 = number no card
        0   = 10
        J   = jack
        Q   = Queen
        K   = King
      s is the shape:
        c   = club
        d   = diamond
        h   = hart
        s   = spade
Comment 1 Levy, Chen 2004-05-21 01:04:21 UTC
Created attachment 6069 [details]
Imposible state in freecell.

This is shot #1/3: it shows the impossible state denoted in the first ASCII art
above.
Comment 2 Levy, Chen 2004-05-21 01:07:51 UTC
Created attachment 6070 [details]
Drowing error

Shot #2/3: see undo-14a
Comment 3 Levy, Chen 2004-05-21 01:10:56 UTC
Created attachment 6071 [details]
Game initial position

Shot #3/3: It may (or may not) help reproduce the bug.
Comment 4 Levy, Chen 2004-06-16 16:04:46 UTC
It just happend again. 

I have a new guess for steps of reproduction, although it is by no means an assured way. 

This time I dragged a playing pile, while the animation for automatically moving cards to the foundation pile, was running.
When I did so, everything looked OK (i.e. move-cards-to-the-foundation-pile animation was stopped, and was replaced by the animation of moving the playing pile to it's new location, and then the move-cards-to-the-foundation-pile animation was resumed), this until it stopped in an impossible state:

This time the top card in the hart foundation pile is 7-of-harts while the 6-of-harts is still in the playing pile.
Comment 5 Levy, Chen 2004-06-16 16:11:32 UTC
Created attachment 6387 [details]
Screenshot: 2nd occurrence of the bug - 6-of-harts is out.

This is the impossible state, at which the move-cards-to-the-foundation-pile
animation was stopped. Note that while the 6-of-harts is out in the playing
pile, the 7-of-harts is the top most card in the foundation pile.
Comment 6 Levy, Chen 2004-06-16 16:16:48 UTC
Created attachment 6388 [details]
Screenshot: 2nd occurrence of the bug - 6-of-harts alone

When I let the game continue, by moving the 6-of-harts aside, the game "ends"
like this, with the 6-of-harts all alone in the playing pile.
Comment 7 Levy, Chen 2004-06-19 01:44:36 UTC
OK, this bug is now reproduceable!

Here how to do it:

1) Make sure that "Enable autodrop" is checkd on the Settings menu.
2) Start a freecell game (obviously)
3) Play for a win. Try to keep 4 high and ordered playing piles. This demands that there will be someware a low card that is blocking the automatic end (with a win) of a game.
4) Remove the blocking card, and let the game play itself out. While this is happening try to drag one of the playing piles (you may not be able to do so, but at least one pile should be movable).
5) Keep dragging this pile around. You may notice that some cards from the foundation pile are moving along side of the pile you are dragging. When you finaly drop the pile, you may notice that while the 3 other piles had deminished, the dragged pile stays in its original hight. This looks like the source of the problem - a card seems to be in 2 places at once: In the playing pile that was dragged around, and in the foundation piles.

HTH.
Comment 8 Kent Fredric 2005-10-15 10:47:47 UTC
Created attachment 12988 [details]
Bad Ordering in Klondike

The same problem occurs in klondike. note how the 4 of Spades is in play, and
the 5 of spades is on the foundation.
Comment 9 Stephan Kulow 2006-10-29 21:29:13 UTC

*** This bug has been marked as a duplicate of 56637 ***