Bug 84819 - Kings: Card on the left top will crash the program
Summary: Kings: Card on the left top will crash the program
Status: RESOLVED INTENTIONAL
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 84818 85340 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-09 18:21 UTC by Nanne Scholtens
Modified: 2004-10-15 12:58 UTC (History)
1 user (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 Nanne Scholtens 2004-07-09 18:21:29 UTC
Version:           2.0 (using KDE 3.1.4)
Installed from:    compiled sources
Compiler:          gcc version 3.2.3
OS:                Linux (i686) release 2.4.22

Hi,

When I'am playing Kings and want to put cards in another column then the program crashed sometimes. It's nearly impossible to reproduce this bug.

This is the bugreport:

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...[New Thread 16384 (LWP 1361)]

0x40fac5c9 in waitpid () from /lib/libpthread.so.0
#0  0x40fac5c9 in waitpid () from /lib/libpthread.so.0
#1  0x406989ed in KCrash::defaultCrashHandler(int) ()
   from /opt/kde/lib/libkdecore.so.4
#2  0x40faac45 in __pthread_sighandler () from /lib/libpthread.so.0
#3  <signal handler called>
#4  0x08069494 in KPixmap::~KPixmap() ()
#5  0x0805c13b in KStaticDeleterBase::~KStaticDeleterBase() ()
#6  0x0805b277 in KStaticDeleterBase::~KStaticDeleterBase() ()
#7  0x40b3fffc in QScrollView::viewportMouseDoubleClickEvent(QMouseEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x40b3f838 in QScrollView::eventFilter(QObject*, QEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#9  0x40a3096e in QObject::activate_filters(QEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#10 0x40a30891 in QObject::event(QEvent*) () from /usr/lib/qt/lib/libqt-mt.so.3
#11 0x40a6760c in QWidget::event(QEvent*) () from /usr/lib/qt/lib/libqt-mt.so.3
#12 0x409d8035 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#13 0x409d77d2 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#14 0x4061bc89 in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde/lib/libkdecore.so.4
#15 0x4097217b in QETWidget::translateMouseEvent(_XEvent const*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#16 0x4096f8e4 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#17 0x40985ed7 in QEventLoop::processEvents(unsigned) ()
   from /usr/lib/qt/lib/libqt-mt.so.3
#18 0x409eb276 in QEventLoop::enterLoop() () from /usr/lib/qt/lib/libqt-mt.so.3
#19 0x409eb118 in QEventLoop::exec() () from /usr/lib/qt/lib/libqt-mt.so.3
#20 0x409d8281 in QApplication::exec() () from /usr/lib/qt/lib/libqt-mt.so.3
#21 0x0805558e in QFrame::paintEvent(QPaintEvent*) ()
#22 0x410fad06 in __libc_start_main () from /lib/libc.so.6
Comment 1 Tommi Tervo 2004-07-09 20:55:35 UTC
*** Bug 84818 has been marked as a duplicate of this bug. ***
Comment 2 Stephan Kulow 2004-07-18 12:49:30 UTC
*** Bug 85340 has been marked as a duplicate of this bug. ***
Comment 3 Stephan Kulow 2004-07-18 12:50:52 UTC
CVS commit by coolo: 

disable kings. No one cares about that and it's generating bugs ;(
CCMAIL: 84819@bugs.kde.org


  M +2 -0      kings.cpp   1.11


--- kdegames/kpat/kings.cpp  #1.10:1.11
@@ -113,4 +113,5 @@ bool Kings::isGameLost() const {
 }
 
+#if 0
 static class LocalDealerInfo12 : public DealerInfo
 {
@@ -119,4 +120,5 @@ public:
     virtual Dealer *createGame(KMainWindow *parent) { return new Kings(parent); }
 } gfdi12;
+#endif
 
 #include "kings.moc"


Comment 4 Inge Wallin 2004-10-14 22:09:58 UTC
CVS commit by ingwa: 

Fix bug 87451: crash in patience when selecting 'unknown' as game type

 - renumber the following patiences: Golf, Klondike (draw 3), Spider
   Easy, Spider Medium, Spider Hard.

This bug was due to the fact that Stephan Kulow wasn't thorough enough
when he disabled the Kings patience because of bug 84819.  

Well, now it seems to be really disabled.  Now all that remains is to
actually *fix* 84819. :-)

I will find out if this fix needs backporting.

CCMAIL: 84819@bugs.kde.org
CCMAIL: 87451-done@bugs.kde.org


  M +3 -0      CHANGES   1.10
  M +1 -1      golf.cpp   1.11
  M +7 -0      kings.cpp   1.12
  M +1 -1      klondike.cpp   1.47
  M +1 -0      main.cpp   1.38
  M +5 -5      pwidget.cpp   1.116
  M +3 -3      spider.cpp   1.4


--- kdegames/kpat/CHANGES  #1.9:1.10
@@ -1,4 +1,7 @@
 2004-10-14 Inge Wallin <inge@lysator.liu.se>
 
+        - fix bug 87451: crash in patience when selecting 'unknown' as game type
+        ---- CVS commit here ----
+
         - fix bug 89755: Aces up move counter doesn't work (idiot.cpp)
         - bump version to 2.2.1

--- kdegames/kpat/golf.cpp  #1.10:1.11
@@ -158,5 +158,5 @@ static class LocalDealerInfo13 : public 
 {
 public:
-    LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 13) {}
+    LocalDealerInfo13() : DealerInfo(I18N_NOOP("Go&lf"), 12) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Golf(parent); }
 } ldi13;

--- kdegames/kpat/kings.cpp  #1.11:1.12
@@ -114,4 +114,11 @@ bool Kings::isGameLost() const {
 
 #if 0
+NOTE: When this is reenabled, renumber the following patiences back again:
+Golf
+Klondike, draw 3
+Spider Easy
+Spider Medium
+Spider Hard
+
 static class LocalDealerInfo12 : public DealerInfo
 {

--- kdegames/kpat/klondike.cpp  #1.46:1.47
@@ -489,5 +489,5 @@ static class LocalDealerInfo14 : public 
 {
 public:
-    LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 14) {}
+    LocalDealerInfo14() : DealerInfo(I18N_NOOP("Klondike (&draw 3)"), 13) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Klondike(false, parent); }
 } ldi14;

--- kdegames/kpat/main.cpp  #1.37:1.38
@@ -52,4 +52,5 @@ int main( int argc, char **argv )
     aboutData.addAuthor("Josh Metzler", I18N_NOOP("Spider Implementation"), "joshdeb@metzlers.org");
     aboutData.addAuthor("Maren Pakura", I18N_NOOP("Documentation"), "maren@kde.org");
+    aboutData.addAuthor("Inge Wallin", I18N_NOOP("Bug fixes"), "inge@lysator.liu.se");
 
     KCmdLineArgs::init( argc, argv, &aboutData );

--- kdegames/kpat/pwidget.cpp  #1.115:1.116
@@ -330,4 +330,9 @@ void pWidget::newGameType()
     }
 
+    if (!dill) {
+        kdError() << "unimplemented game type " << id << endl;
+        dill = DealerInfoList::self()->games().first()->createGame(this);
+    }
+
     connect(dill, SIGNAL(undoPossible(bool)), SLOT(undoPossible(bool)));
     connect(dill, SIGNAL(gameWon(bool)), SLOT(gameWon(bool)));
@@ -340,9 +345,4 @@ void pWidget::newGameType()
     dill->takeState();
 
-    if (!dill) {
-        kdError() << "unimplemented game type " << id << endl;
-        dill = DealerInfoList::self()->games().first()->createGame(this);
-    }
-
     dill->resetMoves();
 

--- kdegames/kpat/spider.cpp  #1.3:1.4
@@ -459,5 +459,5 @@ static class LocalDealerInfo15 : public 
 {
 public:
-    LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 15) {}
+    LocalDealerInfo15() : DealerInfo(I18N_NOOP("S&pider (Easy)"), 14) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(1, parent); }
 } ldi15;
@@ -466,5 +466,5 @@ static class LocalDealerInfo16 : public 
 {
 public:
-    LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 16) {}
+    LocalDealerInfo16() : DealerInfo(I18N_NOOP("Spider (&Medium)"), 15) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(2, parent); }
 } ldi16;
@@ -473,5 +473,5 @@ static class LocalDealerInfo17 : public 
 {
 public:
-    LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 17) {}
+    LocalDealerInfo17() : DealerInfo(I18N_NOOP("Spider (&Hard)"), 16) {}
     virtual Dealer *createGame(KMainWindow *parent) { return new Spider(4, parent); }
 } ldi17;


Comment 5 Inge Wallin 2004-10-15 12:58:30 UTC
According to Stephan Kulow, this patience is boring, and even the person who prompted him to write it agrees.  He suggests that we don't fix this bug, so I close it now.

I might reopen it some time and look into it.  (If nothing else, I will play Kings a couple of times and see if it really is boring. :-) )