Bug 183356 - Kate crashes upon exit after opening a file with a phone number.
Summary: Kate crashes upon exit after opening a file with a phone number.
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 20:38 UTC by Shlomi Fish
Modified: 2009-04-30 14:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A text file that exhibits the crash. Contains an imaginary phone number. (13 bytes, text/plain)
2009-02-05 20:49 UTC, Shlomi Fish
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shlomi Fish 2009-02-05 20:38:34 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Mandriva RPMs

Kate Crashes upon exit after editing a file with these contents (will attach soon):

{{{
* 052-123456
}}}

I'm getting the following backtrace:

{{{{{{{{{{{{{{{{{{{
Application: Kate (kate), signal SIGABRT
[Current thread is 1 (Thread 0xb5cef6d0 (LWP 19983))]

Thread 1 (Thread 0xb5cef6d0 (LWP 19983)):
[KCrash Handler]
#6  0xffffe424 in __kernel_vsyscall ()
#7  0xb7ef5c00 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb7ef7668 in abort () at abort.c:88
#9  0xb7f311cd in __libc_message (do_abort=2, fmt=0xb8002684 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:170
#10 0xb7f379b1 in malloc_consolidate (av=0xb801b140) at malloc.c:5994
#11 0xb7f3951d in _int_malloc (av=0xb801b140, bytes=524) at malloc.c:4229
#12 0xb7f3b38c in __libc_malloc (bytes=524) at malloc.c:3551
#13 0xb6ffb1d7 in operator new () from /usr/lib/libstdc++.so.6
#14 0xb6ffb31d in operator new[] () from /usr/lib/libstdc++.so.6
#15 0xb70a69ba in QHashData::rehash (this=0x9340758, hint=7) at tools/qhash.cpp:299
#16 0xb7723b5e in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#17 0xb7abc79c in QMenu::~QMenu () from /usr/lib/libQtGui.so.4
#18 0xb62fc21f in KMenu::~KMenu () from /usr/lib/libkdeui.so.5
#19 0xb6151afa in KActionMenu::~KActionMenu () from /usr/lib/libkdeui.so.5
#20 0xb718c044 in QObjectPrivate::deleteChildren (this=0x9350f00) at kernel/qobject.cpp:1884
#21 0xb77239d4 in QWidget::~QWidget () from /usr/lib/libQtGui.so.4
#22 0xb7a940df in QMainWindow::~QMainWindow () from /usr/lib/libQtGui.so.4
#23 0xb62f72b0 in KMainWindow::~KMainWindow () from /usr/lib/libkdeui.so.5
#24 0xb6337ea9 in KXmlGuiWindow::~KXmlGuiWindow () from /usr/lib/libkdeui.so.5
#25 0xb69df1ba in KParts::MainWindow::~MainWindow () from /usr/lib/libkparts.so.4
#26 0xb732d0f6 in ?? () from /usr/lib/libkateinterfaces.so.4
#27 0xb7310f95 in ?? () from /usr/lib/libkateinterfaces.so.4
#28 0xb72f850e in KateApp::shutdownKate () from /usr/lib/libkateinterfaces.so.4
#29 0xb730f234 in ?? () from /usr/lib/libkateinterfaces.so.4
#30 0xb73133bb in ?? () from /usr/lib/libkateinterfaces.so.4
#31 0xb7192c4d in QMetaObject::activate (sender=0x9386a48, from_signal_index=5, to_signal_index=6, argv=0xbfd7b710) at kernel/qobject.cpp:3031
#32 0xb719307b in QMetaObject::activate (sender=0x9386a48, m=0xb7eadbf8, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfd7b710) at kernel/qobject.cpp:3121
#33 0xb76c1a45 in QAction::triggered () from /usr/lib/libQtGui.so.4
#34 0xb76c2437 in QAction::activate () from /usr/lib/libQtGui.so.4
#35 0xb7ac1be7 in ?? () from /usr/lib/libQtGui.so.4
#36 0xb7ac323d in QMenu::keyPressEvent () from /usr/lib/libQtGui.so.4
#37 0xb62fb8ca in KMenu::keyPressEvent () from /usr/lib/libkdeui.so.5
#38 0xb7722910 in QWidget::event () from /usr/lib/libQtGui.so.4
#39 0xb7ac4a04 in QMenu::event () from /usr/lib/libQtGui.so.4
#40 0xb76c7fec in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#41 0xb76d1377 in QApplication::notify () from /usr/lib/libQtGui.so.4
#42 0xb6222e40 in KApplication::notify () from /usr/lib/libkdeui.so.5
#43 0xb717d813 in QCoreApplication::notifyInternal (this=0xbfd7c950, receiver=0x9393268, event=0xbfd7be1c) at kernel/qcoreapplication.cpp:587
#44 0xb772b56d in ?? () from /usr/lib/libQtGui.so.4
#45 0xb7763879 in ?? () from /usr/lib/libQtGui.so.4
#46 0xb7765b8b in ?? () from /usr/lib/libQtGui.so.4
#47 0xb773d791 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#48 0xb7767654 in ?? () from /usr/lib/libQtGui.so.4
#49 0xb6e42dea in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#50 0xb6e46508 in ?? () from /usr/lib/libglib-2.0.so.0
#51 0xb6e466c8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#52 0xb71a930a in QEventDispatcherGlib::processEvents (this=0x91ab2c0, flags={i = -1076377832}) at kernel/qeventdispatcher_glib.cpp:319
#53 0xb7766daa in ?? () from /usr/lib/libQtGui.so.4
#54 0xb717be83 in QEventLoop::processEvents (this=0xbfd7c7c0, flags={i = -1076377720}) at kernel/qeventloop.cpp:143
#55 0xb717c041 in QEventLoop::exec (this=0xbfd7c7c0, flags={i = -1076377656}) at kernel/qeventloop.cpp:194
#56 0xb717e7b2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#57 0xb76c7e54 in QApplication::exec () from /usr/lib/libQtGui.so.4
#58 0xb80228d1 in kdemain () from /usr/lib/libkdeinit4_kate.so
#59 0x0804856f in _start ()
}}}}}}}}}}}}}}}}}}}
Comment 1 Shlomi Fish 2009-02-05 20:49:38 UTC
Created attachment 30998 [details]
A text file that exhibits the crash. Contains an imaginary phone number.

This is a text file that after being opened using /usr/bin/kate test1.txt and File -> Quit immediately causes Kate to crash. I'm using Kate 4.2.0 on Mandriva Linux Cooker from the Mandriva RPMs.
Comment 2 Dario Andres 2009-02-05 21:59:41 UTC
Can you reproduce the crash after editing another file ?
Did you changed some Toolbars option in Kate?
Thanks
Comment 3 Shlomi Fish 2009-02-05 22:50:29 UTC
(In reply to comment #2)
> Can you reproduce the crash after editing another file ?

I can - sometimes. The crashes don't seem to be always consistent. But editing the file and doing Alt+F;Q; causes it to crash more often than not. 

> Did you changed some Toolbars option in Kate?

I don't think I did.

> Thanks
> 

Regards,

-- Shlomi Fish
Comment 4 Christoph Cullmann 2009-04-30 12:32:21 UTC
SVN commit 961550 by cullmann:

fix crash on exit, not that beautiful, but works
BUG: 185708


 M  +6 -0      katemainwindow.cpp  
 M  +1 -0      katemainwindow.h  


--- trunk/KDE/kdesdk/kate/app/katemainwindow.cpp #961549:961550
@@ -509,6 +509,12 @@
 
 void KateMainWindow::slotFileQuit()
 {
+  // delay real shutdown outside of this, as we are inside menu action handling
+  QTimer::singleShot(0, this, SLOT(slotFileQuitDelayed()));
+}
+
+void KateMainWindow::slotFileQuitDelayed()
+{
   KateApp::self()->shutdownKate (this);
 }
 
--- trunk/KDE/kdesdk/kate/app/katemainwindow.h #961549:961550
@@ -181,6 +181,7 @@
     void slotOpenWithMenuAction(QAction* a);
 
     void slotFileQuit();
+    void slotFileQuitDelayed();
     void slotEditToolbars();
     void slotNewToolbarConfig();
     void slotWindowActivated ();
Comment 5 Shlomi Fish 2009-04-30 14:46:04 UTC
(In reply to comment #4)
> SVN commit 961550 by cullmann:
> 
> fix crash on exit, not that beautiful, but works
> BUG: 185708
> 

Thanks for fixing this bug!

Regards,

-- Shlomi Fish

> 
>  M  +6 -0      katemainwindow.cpp  
>  M  +1 -0      katemainwindow.h  
>