[Bug 169048] Crashes when applying all filters on IMAP folder [KMail::ActionScheduler::actionMessage, KMail::ActionScheduler::filterMessage]

2010-06-11 Thread Clement
https://bugs.kde.org/show_bug.cgi?id=169048


Siu Chung (Clement) Cheung clement...@gmail.com changed:

   What|Removed |Added

 CC||clement...@gmail.com




--- Comment #25 from Siu Chung (Clement) Cheung clement cc gmail com  
2010-06-11 23:32:32 ---
Hi,

This crash is due to you all having a rule with no actions but having stop
processing here to make certain emails immune to subsequent rules. (see
Michal's filter #1) Kmail currently chokes on that.

I have already debugged this crash and attached a fix in bug 169646. Please see
comments and attachment there for full explanation of this crash. I notice now
that the bug is already closed when I posted due to lack of feedback, which is
probably why nobody noticed my patch. Sorry about that. Should have searched
more.

Can someone try my patch and see if it works for you and maybe have someone
from the kmail team take a look? There have been so many reports of this bug
already. The crash is fully reproducible. But you must have *NEW* email
matching the no action rule to trigger this crash. So if you rerun kmail
immediately after the crash, it no longer happens due to the mail being no
longer new. This is probably why people are saying the crash is random. To
reproduce the bug consistently, simply make a no action rule matching your own
email address and send an email to yourself.

As a workaround, add a sound action to your empty rule. If you find the barrage
of sound annoying, simply record one second of silence and use that as your
sound.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 169646] Kmail crashes when applying filter with no rules

2010-04-16 Thread Clement
https://bugs.kde.org/show_bug.cgi?id=169646


Siu Chung (Clement) Cheung clement...@gmail.com changed:

   What|Removed |Added

 CC||clement...@gmail.com




--- Comment #4 from Siu Chung (Clement) Cheung clement cc gmail com  
2010-04-17 05:41:45 ---
This bug is still happening.

kmail 1.13.2
KDE 4.4.2
linux kernel 2.6.33-gentoo-r1 (x86_64)
Gentoo packages.

Interestingly, my other setup with 32-bit linux on Sabayon Linux doesn't crash
using exact same rule. Not sure why.

Backtrace:
Thread 1 (Thread 0x7f457240c750 (LWP 11155)):
[KCrash Handler]
#5  0x7f4570dbfb62 in
KMail::ActionScheduler::actionMessage(KMFilterAction::ReturnCode) () from
/usr/lib64/libkmailprivate.so.4
#6  0x7f4570dbfe1a in KMail::ActionScheduler::filterMessage() () from
/usr/lib64/libkmailprivate.so.4
#7  0x7f4570dc05ba in
KMail::ActionScheduler::qt_metacall(QMetaObject::Call, int, void**) () from
/usr/lib64/libkmailprivate.so.4
#8  0x7f456ccb7147 in QMetaObject::activate(QObject*, QMetaObject const*,
int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x7f456ccb3bd3 in QObject::event(QEvent*) () from
/usr/lib64/qt4/libQtCore.so.4

Liberal sprinkling of debug statements in the area reveals that the variable
action is pointing at 0x21, an invalid but non-zero address which passes the
mFilterAction check in actionMessage(). This causes a segfault when accessed
later.

How does that happen? Here's the current code that checks for the end of the
action list:
498  KMFilterAction *action = mFilterAction;
499 // mFilterAction = (*mFilterIt).actions()-next();
500 if ( ++mFilterActionIt == (*mFilterIt)-actions()-end() )
501 mFilterAction = 0;
502 else mFilterAction = (*mFilterActionIt);
503 action-processAsync( *mMessageIt );
504 }

The problem is we're checking if the *NEXT* action is the end. What about the
*CURRENT* one? Sure it's supposed to be already checked when we advance the
pointer there. Except that the first action isn't assigned by this iterator
advancing code. It's initialized in filterMessage():
  mFilterActionIt = (*mFilterIt)-actions()-begin();
  mFilterAction = (*mFilterActionIt);
  actionMessage();

What's happening here is that begin() == end() since the list is empty. We
didn't verify that mFilterActionIt isn't end (and therefore invalid) before
dereferencing it. Since this is an iterator, not a pointer, we won't crash --
yet. But mFilterAction will get random garbage. If said random garbage happens
to be non-zero, actionMessage() will then try to dereference it as a pointer
and hence the crash.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 169646] Kmail crashes when applying filter with no rules

2010-04-16 Thread Clement
https://bugs.kde.org/show_bug.cgi?id=169646





--- Comment #6 from Siu Chung (Clement) Cheung clement cc gmail com  
2010-04-17 05:54:55 ---
As a temporary work around, people like me who need this to set a stop
processing here rule with no action and matching sender =
my_b...@my_company.com to make sure important messages doesn't get filtered can
assign a sound as action.

That action will have no effect except being extremely irritating when a whole
bunch of messages matching the rule arrives. This can be avoided by recording a
wav file of silence and using it as the action.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 174278] New: Closing of the application

2008-11-04 Thread Demongeot Clement
http://bugs.kde.org/show_bug.cgi?id=174278

   Summary: Closing of the application
   Product: kontact
   Version: unspecified
  Platform: Ubuntu Packages
OS/Version: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: general
AssignedTo: kdepim-bugs@kde.org
ReportedBy: [EMAIL PROTECTED]


Version:(using KDE 4.1.2)
OS:Linux
Installed from:Ubuntu Packages

Application : Kontact (kontact), signal SIGSEGV
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb4c366c0 (LWP 5828)]
[KCrash handler]
#6  0xb0b09252 in Akregator::FeedList::findByID ()
   from /usr/lib/kde4/akregatorpart.so
#7  0xb0b2f079 in ?? () from /usr/lib/kde4/akregatorpart.so
#8  0xb0b2f1ae in ?? () from /usr/lib/kde4/akregatorpart.so
#9  0xb7719a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0xb771a7e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb771fdb7 in ?? () from /usr/lib/libQtCore.so.4
#12 0xb771fedc in ?? () from /usr/lib/libQtCore.so.4
#13 0xb771453f in QObject::event () from /usr/lib/libQtCore.so.4
#14 0xb6df58ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#15 0xb6dfd76e in QApplication::notify () from /usr/lib/libQtGui.so.4
#16 0xb7bd372d in KApplication::notify () from /usr/lib/libkdeui.so.5
#17 0xb7704e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#18 0xb7732d81 in ?? () from /usr/lib/libQtCore.so.4
#19 0xb772f520 in ?? () from /usr/lib/libQtCore.so.4
#20 0xb55216f8 in IA__g_main_context_dispatch (context=0x8745238)
at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#21 0xb5524da3 in g_main_context_iterate (context=0x8745238, block=1, 
dispatch=1, self=0x8742fa0)
at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2778
#22 0xb5524f61 in IA__g_main_context_iteration (context=0x8745238, 
may_block=1) at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2841
#23 0xb772f478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#24 0xb6e8fee5 in ?? () from /usr/lib/libQtGui.so.4
#25 0xb770352a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#26 0xb77036ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#27 0xb7262907 in QDialog::exec () from /usr/lib/libQtGui.so.4
#28 0xb6426402 in KIO::PasswordDialog::getNameAndPassword ()
   from /usr/lib/libkio.so.5
#29 0xb1721743 in ?? () from /usr/lib/libkmailprivate.so.4
#30 0xb163a775 in KMail::AccountManager::processNextCheck ()
   from /usr/lib/libkmailprivate.so.4
#31 0xb163b250 in KMail::AccountManager::singleCheckMail ()
   from /usr/lib/libkmailprivate.so.4
#32 0xb163b6d4 in KMail::AccountManager::checkMail ()
   from /usr/lib/libkmailprivate.so.4
#33 0xb17fd6f8 in KMMainWidget::slotCheckMail ()
   from /usr/lib/libkmailprivate.so.4
#34 0xb182601c in KMMainWidget::qt_metacall ()
   from /usr/lib/libkmailprivate.so.4
#35 0xb7719a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#36 0xb771a7e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#37 0xb771fdb7 in ?? () from /usr/lib/libQtCore.so.4
#38 0xb771fedc in ?? () from /usr/lib/libQtCore.so.4
#39 0xb771453f in QObject::event () from /usr/lib/libQtCore.so.4
#40 0xb6df58ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#41 0xb6dfd76e in QApplication::notify () from /usr/lib/libQtGui.so.4
#42 0xb7bd372d in KApplication::notify () from /usr/lib/libkdeui.so.5
#43 0xb7704e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#44 0xb7732d81 in ?? () from /usr/lib/libQtCore.so.4
#45 0xb772f520 in ?? () from /usr/lib/libQtCore.so.4
#46 0xb55216f8 in IA__g_main_context_dispatch (context=0x8745238)
at /build/buildd/glib2.0-2.18.2/glib/gmain.c:2144
#47 0xb5524da3 in g_main_context_iterate