https://bugs.kde.org/show_bug.cgi?id=335113 Bug ID: 335113 Summary: kmail crashes when searching in quick filter Classification: Unclassified Product: kmail2 Version: 4.13.0 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: crash Priority: NOR Component: search Assignee: kdepim-bugs@kde.org Reporter: hausmann@kde.org CC: me@vhanda.in In kmail's debug output I see the following: "" Qt has caught an exception thrown from an event handler. Throwing exceptions from an event handler is not supported in Qt. You must reimplement QApplication::notify() and catch all exceptions there. terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct null not valid "" The backtrace at that point naturally doesn't give anything away. I noticed however on akonadi startup the following also: "" akonadi_baloo_indexer(16245): Failed to create email indexer: "Error opening table `/home/shausman/.local/share/baloo/email//record.': Couldn't open /home/shausman/.local/share/baloo/email//record.baseA: No such file or directory Unable to read revision from /home/shausman/.local/share/baloo/email//record.baseB "" as well as "" Executing search "kmail2-869657646-SearchSession" akonadiserver(16196): Xapian Database does not exist at "/home/shausman/.local/share/baloo/email/" Search done "kmail2-869657646-SearchSession" (without remote search) Result: 0 matches "" In order to get something more useful from gdb I did a "catch throw" to find out where the exception was throw. The first throw was here, where it looks like it can't open that database: "" Catchpoint 2 (exception thrown), 0x00007ffff5825a30 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt #0 0x00007ffff5825a30 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007fffe38b99a1 in ChertTable::basic_open(bool, unsigned int) () from /usr/lib/libxapian.so.22 #2 0x00007fffe38bd978 in ChertTable::do_open_to_read(bool, unsigned int) () from /usr/lib/libxapian.so.22 #3 0x00007fffe3898ce1 in ?? () from /usr/lib/libxapian.so.22 #4 0x00007fffe389d770 in ?? () from /usr/lib/libxapian.so.22 #5 0x00007fffe3843086 in Xapian::Database::Database(std::string const&) () from /usr/lib/libxapian.so.22 #6 0x00007fffea95b46b in Baloo::PIM::EmailQuery::exec() () from /usr/lib/libbaloopim.so.4 #7 0x00007ffff112a3e6 in MessageList::Core::Filter::setSearchString (this=0x1e021d0, search=..., options=...) at ../../messagelist/core/filter.cpp:122 #8 0x00007ffff116ece9 in MessageList::Core::Widget::searchTimerFired (this=0xbce250) at ../../messagelist/core/widgetbase.cpp:989 #9 0x00007ffff5c5c87a in QMetaObject::activate (sender=0x1dec6c0, m=, local_signal_index=, argv=0x0) at kernel/qobject.cpp:3539 #10 0x00007ffff5c60a31 in QObject::event (this=0x1dec6c0, e=) at kernel/qobject.cpp:1156 #11 0x00007ffff6179e2c in QApplicationPrivate::notify_helper (this=this@entry=0x6c20f0, receiver=receiver@entry=0x1dec6c0, e=e@entry=0x7fffffffd6c0) at kernel/qapplication.cpp:4567 #12 0x00007ffff61804a0 in QApplication::notify (this=this@entry=0x7fffffffdce0, receiver=receiver@entry=0x1dec6c0, e=e@entry=0x7fffffffd6c0) at kernel/qapplication.cpp:4353 #13 0x00007ffff79b4baa in KApplication::notify (this=0x7fffffffdce0, receiver=0x1dec6c0, event=0x7fffffffd6c0) at ../../kdeui/kernel/kapplication.cpp:311 #14 0x00007ffff5c484dd in QCoreApplication::notifyInternal (this=0x7fffffffdce0, receiver=0x1dec6c0, event=0x7fffffffd6c0) at kernel/qcoreapplication.cpp:953 #15 0x00007ffff5c78323 in sendEvent (event=, receiver=) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #16 QTimerInfoList::activateTimers (this=0x6b9f40) at kernel/qeventdispatcher_unix.cpp:621 #17 0x00007ffff5c75629 in timerSourceDispatch (source=) at kernel/qeventdispatcher_glib.cpp:193 #18 idleTimerSourceDispatch (source=) at kernel/qeventdispatcher_glib.cpp:240 #19 0x00007fffed369e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007fffed36a048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007fffed36a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007ffff5c757a1 in QEventDispatcherGlib::processEvents (this=0x607b20, flags=...) at kernel/qeventdispatcher_glib.cpp:434 #23 0x00007ffff621bbb6 in QGuiEventDispatcherGlib::processEvents (this=, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #24 0x00007ffff5c470af in QEventLoop::processEvents (this=this@entry=0x7fffffffd930, flags=...) at kernel/qeventloop.cpp:149 #25 0x00007ffff5c473a5 in QEventLoop::exec (this=this@entry=0x7fffffffd930, flags=...) at kernel/qeventloop.cpp:204 #26 0x00007ffff5c4cb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225 #27 0x00007ffff617837c in QApplication::exec () at kernel/qapplication.cpp:3828 #28 0x0000000000402d18 in main (argc=, argv=) at ../../kmail/main.cpp:146 "" But it seems that exception was caught. However the next one wasn't caught: "" #0 0x00007ffff5825a30 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x00007ffff5877357 in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #2 0x00007ffff5882b61 in char* std::string::_S_construct(char const*, char const*, std::allocator const&, std::forward_iterator_tag) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00007ffff5882ef8 in std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007fffea95dd00 in Baloo::PIM::EmailQuery::exec() () from /usr/lib/libbaloopim.so.4 #5 0x00007ffff112a3e6 in MessageList::Core::Filter::setSearchString (this=0x1e021d0, search=..., options=...) at ../../messagelist/core/filter.cpp:122 #6 0x00007ffff116ece9 in MessageList::Core::Widget::searchTimerFired (this=0xbce250) at ../../messagelist/core/widgetbase.cpp:989 #7 0x00007ffff5c5c87a in QMetaObject::activate (sender=0x1dec6c0, m=, local_signal_index=, argv=0x0) at kernel/qobject.cpp:3539 #8 0x00007ffff5c60a31 in QObject::event (this=0x1dec6c0, e=) at kernel/qobject.cpp:1156 #9 0x00007ffff6179e2c in QApplicationPrivate::notify_helper (this=this@entry=0x6c20f0, receiver=receiver@entry=0x1dec6c0, e=e@entry=0x7fffffffd6c0) at kernel/qapplication.cpp:4567 #10 0x00007ffff61804a0 in QApplication::notify (this=this@entry=0x7fffffffdce0, receiver=receiver@entry=0x1dec6c0, e=e@entry=0x7fffffffd6c0) at kernel/qapplication.cpp:4353 #11 0x00007ffff79b4baa in KApplication::notify (this=0x7fffffffdce0, receiver=0x1dec6c0, event=0x7fffffffd6c0) at ../../kdeui/kernel/kapplication.cpp:311 #12 0x00007ffff5c484dd in QCoreApplication::notifyInternal (this=0x7fffffffdce0, receiver=0x1dec6c0, event=0x7fffffffd6c0) at kernel/qcoreapplication.cpp:953 #13 0x00007ffff5c78323 in sendEvent (event=, receiver=) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #14 QTimerInfoList::activateTimers (this=0x6b9f40) at kernel/qeventdispatcher_unix.cpp:621 #15 0x00007ffff5c75629 in timerSourceDispatch (source=) at kernel/qeventdispatcher_glib.cpp:193 #16 idleTimerSourceDispatch (source=) at kernel/qeventdispatcher_glib.cpp:240 #17 0x00007fffed369e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #18 0x00007fffed36a048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #19 0x00007fffed36a0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007ffff5c757a1 in QEventDispatcherGlib::processEvents (this=0x607b20, flags=...) at kernel/qeventdispatcher_glib.cpp:434 #21 0x00007ffff621bbb6 in QGuiEventDispatcherGlib::processEvents (this=, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #22 0x00007ffff5c470af in QEventLoop::processEvents (this=this@entry=0x7fffffffd930, flags=...) at kernel/qeventloop.cpp:149 #23 0x00007ffff5c473a5 in QEventLoop::exec (this=this@entry=0x7fffffffd930, flags=...) at kernel/qeventloop.cpp:204 #24 0x00007ffff5c4cb79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225 #25 0x00007ffff617837c in QApplication::exec () at kernel/qapplication.cpp:3828 #26 0x0000000000402d18 in main (argc=, argv=) at ../../kmail/main.cpp:146 "" Reproducible: Always Steps to Reproduce: 1. Start kmail 2. Select a folder with emails 3. Begin typing in the quick search field Actual Results: A crash is observed Expected Results: I think kmail2 (or baloo) should gracefully handle the situation where the database doesn't exist and most certainly not crash. BTW, how do I create the database? :) -- You are receiving this mail because: You are watching all bug changes.