Bug 93803

Summary: SIGSEGV after typing '^'
Product: [Applications] kwordquiz Reporter: Bastian Senst <bastianholst>
Component: generalAssignee: Peter Hedlund <peter>
Status: RESOLVED FIXED    
Severity: crash CC: aacid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: This is what I tried

Description Bastian Senst 2004-11-23 18:39:53 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    SuSE RPMs
OS:                Linux

KWordQuiz crashes after typing '^' with a SIGSEGV. I noticed that it doesn't crash if the '^' is in the first entry, but i've tested it many times, it is the '^' I think.

Here is the report of the Crashmanager:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1096366336 (LWP 8363)]
[KCrash handler]
#7  0x40cb4688 in QObject::installEventFilter ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#8  0x0805e66c in KWordQuizView::beginEdit ()
#9  0x40ed453d in QTable::keyPressEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
#10 0x40ce7b0d in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#11 0x40c5040f in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#12 0x40c524c2 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x408cdd5e in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#14 0x40ed45b2 in QTable::keyPressEvent () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x40ce7b0d in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x40c5040f in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x40c524c2 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x408cdd5e in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#19 0x40be14bb in QETWidget::translateKeyEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0x40bedd7a in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40bfe5d5 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40c68071 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40c67eb6 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0x40c51e8f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x08070a6f in main ()

and here is the console output: 

bastian@linux:~> kwordquiz
sending IMStart with 0 chars to 0x83e4200
sending IMEnd with 1 chars to 0x83e4200, text=é
sending IMStart with 0 chars to 0x83e4200
sending IMEnd with 1 chars to 0x83e4200, text=à
sending IMStart with 0 chars to 0x83e30e0
sending IMEnd with 1 chars to 0x83e30e0, text=é
KCrash: Application 'kwordquiz' crashing...
Comment 1 Peter Hedlund 2004-11-25 03:26:32 UTC
I can't reproduce such a crash. Do you mean the ^ character (ascii 94) or do you mean the symbol above ê. From the backtrace it seems that the crash occurs when you start editing a cell by typing a first character, is that correct? I can even use the upper left key on a German keyboard layout to generate ê without problems.
Comment 3 Anne-Marie Mahfouf 2004-12-19 16:03:39 UTC
Janno, what is your distribution? I cannot reproduce this bug, running KWordQuiz from source cvs HEAD.
Comment 5 Carsten Niehaus 2005-06-14 13:35:42 UTC
Created attachment 11448 [details]
This is what I tried

This didn't make it crash
Comment 6 Carsten Niehaus 2005-06-14 13:37:21 UTC
As I just stated, I could make it crash. This is latest trunk, gcc 3.3.5, KUbuntu-Linux.

Hope this helps.
Comment 7 Carsten Niehaus 2005-06-14 13:37:57 UTC
Oh, I forgot (sorry for the spam): My system is in german.
Comment 8 Albert Astals Cid 2005-06-14 17:31:00 UTC
Hi Peter i can reproduce this crash using Suse provided pacages for kdeedu 3.4.1 for Suse 9.1 tomorrow i'll try to compile qt and kdeeedu from svn to see if the problem is still there.
Comment 9 Albert Astals Cid 2005-06-16 11:27:47 UTC
Hi Peter, it seems the cause is qt shiped suse as with the qt from trolltech it works, this patch seems to workaround the problem

Index: kwordquizview.cpp
===================================================================
--- kwordquizview.cpp   (revision 426042)
+++ kwordquizview.cpp   (working copy)
@@ -288,7 +288,8 @@
 {
   m_currentText = text(row, col);
   cellEditor = QTable::beginEdit(row, col, replace);
-  cellEditor->installEventFilter(this);
+  if (cellEditor)
+    cellEditor->installEventFilter(this);
   return cellEditor;
 }
Comment 10 Peter Hedlund 2005-06-17 04:00:17 UTC
SVN commit 426340 by hedlund:

Don't crash when running a Qt patched by SuSE. Thanks to Albert Astals Cid for tracking this one down.
BUG:93803

 M  +2 -1      kwordquizview.cpp  


--- trunk/KDE/kdeedu/kwordquiz/src/kwordquizview.cpp #426339:426340
@@ -288,7 +288,8 @@
 {
   m_currentText = text(row, col);
   cellEditor = QTable::beginEdit(row, col, replace);
-  cellEditor->installEventFilter(this);
+  if (cellEditor)
+    cellEditor->installEventFilter(this);
   return cellEditor;
 }