Bug 87437

Summary: crash while typing hebrew
Product: [Unmaintained] kbabel Reporter: Diego Iastrubni <cuco3001>
Component: generalAssignee: Stanislav Visnovsky <visnovsky>
Status: RESOLVED FIXED    
Severity: crash CC: czernik, kmashrab
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Delete highlighter for deleted text editor

Description Diego Iastrubni 2004-08-18 16:24:44 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources

I took a pot file from kdeartwork and copied it into the corresponding language. Then I clicked on the file in konqui. 

It always (tried with different files) when I tried to translated messages as this one:
<center><b>RiscOS preview</b></center> 

(translating "preview").

Typing latin letters there did not affect, and the application works. I attach here the trace from drkonqui, but it will not be helpfull.

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 3707)]
0x412ecbe8 in waitpid () from /lib/libpthread.so.0
#0  0x412ecbe8 in waitpid () from /lib/libpthread.so.0
#1  0x408fac94 in __JCR_LIST__ () from /usr/local/kde33/lib/libkdecore.so.4
#2  0x40818597 in KCrash::defaultCrashHandler ()
   from /usr/local/kde33/lib/libkdecore.so.4
#3  0xbffff940 in ?? ()
#4  0x08293e40 in ?? ()
#5  0xbfffe710 in ?? ()
#6  0x411c58f0 in __JCR_LIST__ ()
   from /mnt/source/kde-tree/qt-copy/lib/libqt-mt.so.3
#7  0xffff0010 in ?? ()
#8  0x00000000 in ?? ()
#9  0xffff8080 in ?? ()
#10 0xbfffe7e0 in ?? ()
#11 0x00000000 in ?? ()
#12 0x00000e89 in ?? ()
#13 0x00000400 in ?? ()
#14 0x00000400 in ?? ()
#15 0x00000001 in ?? ()
#16 0xbfffe7e0 in ?? ()
#17 0x0fffff8b in ?? ()
#18 0xbfffe7d0 in ?? ()
#19 0x00000000 in ?? ()
#20 0x00000003 in ?? ()
#21 0x000001db in ?? ()
#22 0x00000003 in ?? ()
#23 0x000001db in ?? ()
#24 0x00000003 in ?? ()
#25 0x083a6200 in ?? ()
#26 0x411c58f0 in __JCR_LIST__ ()
   from /mnt/source/kde-tree/qt-copy/lib/libqt-mt.so.3
#27 0x0838f670 in ?? ()
#28 0x01ffe5d0 in ?? ()
#29 0xbfffe538 in ?? ()
#30 0x411d9c6e in _XftDisplayInfoGet () from /usr/lib/libXft.so.2
Comment 1 Rogério Pereira Araújo 2004-08-18 21:51:34 UTC
I got a crash in kbabel when i start to typing some words translated to brazilian portuguese, kbabel just crashes and prints a very large stack trace. My KDE version is 3.3 rc2 compiled with gcc 3.4.1
Comment 2 Igal 2004-08-18 22:08:55 UTC
Another crash while typing hebrew here. When I type English on the same strings - nothing happens. 
KDE version 3.3_rc2
KBABEL compiled from source on Gentoo by GCC 3.3.4
Comment 3 Munzir Taha 2004-08-18 23:45:55 UTC
It happen a lot of time for me when typing Arabic also. The problem is it's very difficult for me to always reproduce it in a systematic manner. Sometimes, it happens, sometimes it's not! It's really a very annoying problem.
Comment 4 Stanislav Visnovsky 2004-08-19 10:24:09 UTC
Anybody with a backtrace including the debug symbols?

Also, I need your qt version.
Comment 5 Stanislav Visnovsky 2004-08-19 10:31:13 UTC
Also, do you have spellcheck on the fly enabled?
Comment 6 Mashrab Kuvatov 2004-08-19 13:14:52 UTC
I had the same problem with the yesterday's KDE_3_3_BRANCH + QT-3.3. Disabling "spellcheck on the fly" solves it.
Comment 7 Igal 2004-08-19 20:12:24 UTC
I have QT 3.3.3
Disabling "spellcheck on the fly" do solve the problem.
Comment 8 Stanislav Visnovsky 2004-08-24 15:32:52 UTC
Created attachment 7250 [details]
Delete highlighter for deleted text editor

Could anyone, please, test this patch? The behavior improves
for me (even with on-the-fly-spellcheck enabled).
Comment 9 Munzir Taha 2004-08-24 20:26:33 UTC
cuco?
Comment 10 Andrey Cherepanov 2004-08-25 16:30:48 UTC
I test your patch. After applying work normal, without crash. Thank you very match!

If you patch file in CVS you can close this bug. ;)
Comment 11 Stanislav Visnovsky 2004-08-25 17:34:44 UTC
CVS commit by nanulo: 

destroy syntax highlighter for destroyed text editors

CCMAIL: 87437-done@bugs.kde.org


  M +3 -0      kbhighlighting.cpp   1.12
  M +7 -0      mymultilineedit.cpp   1.106
  M +1 -0      mymultilineedit.h   1.55


--- kdesdk/kbabel/kbabel/kbhighlighting.cpp  #1.11:1.12
@@ -68,4 +68,5 @@ KBabelHighlighter::KBabelHighlighter( QT
 void KBabelHighlighter::highlight( )
 {
+  kdDebug(KBABEL) << this << ": Highlight started" << endl;
   // no updates while we're highlighting
   _edit->blockSignals( true );
@@ -141,4 +142,6 @@ void KBabelHighlighter::highlight( )
   _edit->updateContents( );
   _edit->ensureCursorVisible();
+  
+  kdDebug(KBABEL) << this << ": Highlight finished" << endl;
 }
 

--- kdesdk/kbabel/kbabel/mymultilineedit.cpp  #1.105:1.106
@@ -562,4 +562,5 @@ MsgMultiLineEdit::MsgMultiLineEdit(int I
                 _diffDelColor(Qt::darkRed),
                 _currentUnicodeNumber(0),
+                highlighter(0),
                 _tagStartPara(0), _tagStartIndex(0), _tagEndPara(0), _tagEndIndex(0)
 {
@@ -595,4 +596,10 @@ MsgMultiLineEdit::MsgMultiLineEdit(int I
 }
 
+MsgMultiLineEdit::~MsgMultiLineEdit ()
+{
+    if(highlighter)
+        delete highlighter;
+}
+
 void MsgMultiLineEdit::setText(const QString& s)
 {

--- kdesdk/kbabel/kbabel/mymultilineedit.h  #1.54:1.55
@@ -145,4 +145,5 @@ public:
 
    MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0);
+   virtual ~MsgMultiLineEdit();
 
    /** is displaying surrounding quotes enabled? */


Comment 12 Stanislav Visnovsky 2004-08-26 11:42:35 UTC
*** Bug 88113 has been marked as a duplicate of this bug. ***