Bug 56637 - Corrupt foundation in Klondike
Summary: Corrupt foundation in Klondike
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 59355 81942 95604 97037 102954 110621 125337 141464 158889 159637 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-31 00:05 UTC by Lloyd Williams
Modified: 2008-06-24 18:56 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
KPat saved game prior to foundation corruption (4.57 KB, text/plain)
2003-05-09 00:16 UTC, Lloyd Williams
Details
bug screenshot (203.86 KB, image/jpeg)
2005-06-17 13:44 UTC, Mariusz Kozlowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lloyd Williams 2003-03-31 00:05:49 UTC
Version:            (using KDE KDE 3.1.1)
Installed from:    Debian testing/unstable Packages
OS:          Linux

kpat moved the eight of clubs on to the six of clubs on the foundation, leaving the seven of clubs in the playing area.

The game was still completable by moving the eight of clubs back into the playing area.

I've not been able to reproduce this.
Comment 1 Lloyd Williams 2003-04-01 13:41:45 UTC
Ah-ha. This is reproducable.  
  
When kpat moves a card from the playing area to the foundation, it's possible to grab 
the card with the mouse and hold it inside the playing area (this may take a few tries). 
I suppose kpat considers the card to now be on the foundation, and proceeds to 
move more cards to the foundation, possibly including the next in the suit of the one 
you are holding. If there is still a valid place for the held card in the playing area, it can 
be moved there and the foundation is left corrupt. 
 
There's some more weird behaviour with this bug. E.g., if there's no valid place for 
the held card in the playing area, it becomes stuck and unmovable from wherever it 
was held when its last valid position is removed. 
 
Comment 2 Stephan Kulow 2003-05-08 17:06:29 UTC
I think I saw the bug before. Can you please do me a favor and prepare a save game that  
makes it easy to reproduce this? 
Comment 3 Lloyd Williams 2003-05-09 00:16:42 UTC
Created attachment 1507 [details]
KPat saved game prior to foundation corruption

Upon opening the saved game kpat will automatically perform several moves, undo
all of them. Move the three of clubs on to the four of diamonds. KPat will
automatically move the two of hearts on to the foundation, while it is in
transit drag (and don't let go) the three of clubs away. KPat will move the
three of clubs and the four of clubs to the foundation. If successful, you will
be able to move the three of clubs from under the four of clubs to the four of
diamonds, leaving the foundation corrupt. You can still continue play by moving
the four of clubs back on to the five of hearts.

The timing is crucial, if you try to drag the three of clubs too early then
KPat will ignore the click. The best time is as the two of hearts is settling
on the foundation.
Comment 4 Stephan Kulow 2003-10-14 12:48:01 UTC
*** Bug 59355 has been marked as a duplicate of this bug. ***
Comment 5 Inge Wallin 2005-01-05 17:21:37 UTC
*** Bug 95604 has been marked as a duplicate of this bug. ***
Comment 6 Inge Wallin 2005-02-23 16:33:28 UTC
*** Bug 97037 has been marked as a duplicate of this bug. ***
Comment 7 Inge Wallin 2005-03-31 23:49:53 UTC
*** Bug 102954 has been marked as a duplicate of this bug. ***
Comment 8 Mariusz Kozlowski 2005-06-17 13:44:32 UTC
Created attachment 11488 [details]
bug screenshot

I captured the screenshot with this. It is hard to reproduce so I don't really
know how that happened. Maybe the timing is the key.
Comment 9 Inge Wallin 2006-08-16 13:32:34 UTC
*** Bug 125337 has been marked as a duplicate of this bug. ***
Comment 10 Stephan Kulow 2006-10-29 21:23:27 UTC
BINGO! I can reproduce it :)

Thanks so much Lloyd, I will only fix that for KDE4 though I guess.

Comment 11 Stephan Kulow 2006-10-29 21:27:31 UTC
SVN commit 600180 by coolo:

don't allow autodrop if cards are moving
BUG: 56637


 M  +6 -0      dealer.cpp  


--- trunk/KDE/kdegames/kpat/dealer.cpp #600179:600180
@@ -957,6 +957,12 @@
     if (!autoDrop())
         return false;
 
+    if (!movingCards.isEmpty()) {
+        QTimer::singleShot(qRound( TIME_BETWEEN_MOVES * m_autoDropFactor ), this, SLOT(startAutoDrop()));
+        return true;
+    }
+
+
     QList<QGraphicsItem *> list = items();
 
     //kDebug( 11111 ) << "startAutoDrop\n";
Comment 12 Stephan Kulow 2006-10-29 21:29:14 UTC
*** Bug 81942 has been marked as a duplicate of this bug. ***
Comment 13 Stephan Kulow 2006-10-29 21:31:10 UTC
*** Bug 110621 has been marked as a duplicate of this bug. ***
Comment 14 Stephan Kulow 2008-02-02 18:42:09 UTC
*** Bug 141464 has been marked as a duplicate of this bug. ***
Comment 15 Francesco Davini 2008-05-09 01:54:52 UTC
Something very similar happened to me today: I moved a card to the parking area and all the remaing cards begun to fly to the foundations. All but the one I parked! All the Kings on top, but an 8 remained out.
I have a snapshot available, should anyone want to see it.
Comment 16 Pino Toscano 2008-06-24 18:55:11 UTC
*** Bug 159637 has been marked as a duplicate of this bug. ***
Comment 17 Pino Toscano 2008-06-24 18:56:47 UTC
*** Bug 158889 has been marked as a duplicate of this bug. ***