Bug 201683 - One Spider pile is inverted when restoring a game
Summary: One Spider pile is inverted when restoring a game
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-27 18:48 UTC by Anne Wilson
Modified: 2009-08-11 02:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne Wilson 2009-07-27 18:48:28 UTC
Version:           4.2.98 (using KDE 4.2.98)
OS:                Linux
Installed from:    Fedora RPMs

Using 'Remember State on Exit' - on restoring a game the first (left-hand) pile is inverted, and slightly overlaps the next pile.  Slightly resizing the 'table' causes a re-draw after which all is well.

Examples seen -

Spider game 1031519899 - cards Dondorf
Spider game 36095174 - cards Dondorf
Changed cards to Egyptians, closed, restarted - still inverted.
Restart game - still inverted until window re-sized
Comment 1 Anne Wilson 2009-07-27 19:07:03 UTC
Game 478348734, card deck Dondorf (will try other decks later).  Funning on a netbook.  Position 145,0, Size 814,562.  Resized to 853,562 to force re-draw
Comment 2 Anne Wilson 2009-07-28 13:06:28 UTC
Further tests:

Window size: 992,668, game 288619138
Jolly Royal
Nicu Ornamental
Oxygen
Paris

Not tested - Konqui (hard on the eyes)

Should I carry on, or do different tests?
Comment 3 Anne Wilson 2009-07-28 13:44:08 UTC
Oops - should have said that all those listed had the inverted display on resume.
Comment 4 Parker Coates 2009-07-28 14:13:13 UTC
No, that should be plenty for the moment. If I need anything more, I'll let you know.
Comment 5 Parker Coates 2009-07-30 19:36:40 UTC
Okay, for the life of me I can't reproduce this bug anymore. I've tried about 30 times with different window geometries and different decks.

Anne, does it happen for you every time, or only sometimes? You listed game numbers; does it occur with the initial state of those games or did you have to play for a bit to make it happen? Which version of Qt are you using? (I'm really grasping at straws here.)

The "Remember State on Exit" option is just a convenient wrapper around the Save and Load actions. If you manually save a game to file, disable "Remember State on Exit", close KPat, reopen KPat and load the game from file, do you see the same thing?
Comment 6 Anne Wilson 2009-07-30 20:20:36 UTC
I'm pretty sure it hasn't been every time, but certainly most times.  Until two minutes ago I've never seen it on a newly dealt game.  This time it opened with an existing game (pile inverted).  I had abandoned the game, hitting the 'New' icon.  The new deal (game 2134712336) has an inverted pile.  Repeat - I've never seen this before.

OK - resized to get a good display, but make no moves.  Quit game.  Re-launch kpat.  Display is correct - no problems.

Is it possible to force a particular game number, so that I can test more consistently?

Qt - qt-4.5.2-2.fc11.i586

Manual save, disable 'remember state' and restart - it looks fine.

I'll do more test and report back if I see anything that might help.
Comment 7 Anne Wilson 2009-07-30 21:08:58 UTC
Still on game 2134712336.  I've re-started the game (several times), manually saved it then reloaded, enabled 'Remember state' and I can't make this game invert again.  (I can't win it either, but that's another story).  One more try, and if it doesn't invert I'm going on to a new game.
Comment 8 Parker Coates 2009-07-30 22:35:21 UTC
To load a particular game number use "Choose Game..." from the "Game" menu.
Comment 9 Anne Wilson 2009-07-31 10:16:52 UTC
Thanks.  I've just re-opened 2134712336 (after overnight shutdown).  Pile is inverted again.
Comment 10 Parker Coates 2009-08-10 17:26:13 UTC
Okay, I've figure out how to reproduce:
 - You must clear at least one full K-A run.
 - Make the first pile long enough that the cards are "compressed" to avoid extending over completed pile at the bottom. (Making the window very wide and short, helps here.)
 - Restart KPat.

Now that I can reproduce, the only thing left is to fix it. :)
Comment 11 Parker Coates 2009-08-11 02:47:55 UTC
SVN commit 1009850 by coates:

Reworked and cleaned up a fair bit of the scene layout code. More work to come.

Managed to finally fix the inverted pile bug when playing Spider. Unfortunately the change is rather large and somewhat invasive, so I don't think it makes sense to backport to the 4.3 branch. The risk of breakage is just to high for such an easily worked around, tricky to reproduce display issue.

BUG:201683

 M  +67 -77    dealer.cpp  
 M  +1 -0      dealer.h  
 M  +1 -1      view.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1009850