Bug 87451 - crash in patience when selecting 'unknown' as game type (kde3.3rc2)
Summary: crash in patience when selecting 'unknown' as game type (kde3.3rc2)
Status: RESOLVED FIXED
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 87705 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-18 19:55 UTC by Janis Blechert
Modified: 2004-10-14 22:10 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 Janis Blechert 2004-08-18 19:56:00 UTC
Version:           2.2 (using KDE 3.3.0, Gentoo)
Compiler:          gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8

I don't know from where 'unknown' came from but when I select it patience crashes with the following bt:
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash handler]
#5  0x0806153c in QGArray::data ()
#6  0x0806ba4c in Qt::Qt ()
#7  0x0806c9be in Qt::Qt ()
#8  0x40d7fdbc in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#9  0x40d7fc14 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#10 0x4057c940 in KAction::activated () from /usr/kde/3.3/lib/libkdeui.so.4
#11 0x4057c2ef in KAction::slotActivated () from /usr/kde/3.3/lib/libkdeui.so.4
#12 0x405893cf in KSelectAction::slotActivated ()
   from /usr/kde/3.3/lib/libkdeui.so.4
#13 0x40591c6f in KSelectAction::qt_invoke ()
   from /usr/kde/3.3/lib/libkdeui.so.4
#14 0x40d7fdbc in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3
#15 0x4115d7db in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3
#16 0x40da1bc3 in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3
#17 0x40dab88e in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3
#18 0x40d100ed in QApplication::internalNotify ()
   from /usr/qt/3/lib/libqt-mt.so.3
#19 0x40d0f330 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3
#20 0x4081c82c in KApplication::notify () from /usr/kde/3.3/lib/libkdecore.so.4
#21 0x08068094 in QApplication::sendEvent ()
#22 0x40cfb75d in QEventLoop::activateTimers ()
   from /usr/qt/3/lib/libqt-mt.so.3
#23 0x40cac6b5 in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3
#24 0x40d2744d in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3
#25 0x40d27366 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3
#26 0x40d1028f in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3
#27 0x08058bde in ?? ()
#28 0xbffff140 in ?? ()
#29 0x0817cda0 in ?? ()
#30 0x00000001 in ?? ()
#31 0x00000000 in ?? ()
#32 0x00000000 in ?? ()
#33 0x00000001 in ?? ()
#34 0x0809f978 in _IO_stdin_used ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0x0809f77b in _IO_stdin_used ()
#38 0x4160c21a in ?? () from /lib/libpthread.so.0
#39 0x417811df in ?? () from /lib/libc.so.6
#40 0x00000005 in ?? ()
#41 0x40991924 in kde_malloc_is_used () from /usr/kde/3.3/lib/libkdecore.so.4
#42 0x00000020 in ?? ()
#43 0x080b5538 in ?? ()
#44 0x00000000 in ?? ()
#45 0x4160c298 in ?? () from /lib/libpthread.so.0
#46 0x4160b334 in ?? () from /lib/libpthread.so.0
#47 0x41609ee4 in ?? () from /lib/libpthread.so.0
#48 0x414e4c28 in ?? ()
#49 0x00000025 in ?? ()
#50 0x4176fe98 in ?? ()
#51 0x41881130 in ?? ()
#52 0x400139dc in ?? () from /lib/ld-linux.so.2
#53 0x4176f1a0 in ?? ()
#54 0x00000000 in ?? ()
#55 0xbffff1d0 in ?? ()
#56 0x081783f0 in ?? ()
#57 0x417802e2 in ?? () from /lib/libc.so.6
#58 0x006a3695 in ?? ()
#59 0x4177bc54 in ?? () from /lib/libc.so.6
#60 0x4097d5e8 in vtable for KApplication ()
   from /usr/kde/3.3/lib/libkdecore.so.4
#61 0x40013d60 in ?? ()
#62 0x08131b88 in ?? ()
#63 0x00000000 in ?? ()
#64 0x08131638 in ?? ()
#65 0x081726d0 in ?? ()
#66 0x081713d8 in ?? ()
#67 0x0817fe00 in ?? ()
#68 0x00000000 in ?? ()
#69 0x00000000 in ?? ()
#70 0x00000001 in ?? ()
#71 0xbffff2c4 in ?? ()
#72 0x40007800 in _dl_rtld_di_serinfo () from /lib/ld-linux.so.2
#73 0x417858a8 in __libc_start_main () from /lib/libc.so.6
#74 0x080587e1 in ?? ()
Comment 1 Stephan Kulow 2004-08-22 17:02:53 UTC
*** Bug 87705 has been marked as a duplicate of this bug. ***
Comment 2 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;