[Kde-pim] KMail opening by message serial number abaility

Mathieu Dupuy mdupuy at mandriva.com
Fri Oct 23 16:56:08 BST 2009


Hello Everyone.
I'm working with Trueg on adding Nepomuk features into some parts of 
KDE. One of this feature
It's mostly a proof of concept, and something else cleaner and more 
powerful will be done once akonadi will be ready, but for now we need it 
to work with KMail.

What I need is kmail messages uniques Id which I can retrieve from 
message and especially with which I can open kmail with. For retrieving, 
I use KMMsgBase::getMsgSerNum(), no problem on this this side.
For opening KMail with the serial Number as argument, I hade to patch 
KMail following McGuire intructions, and following the --view option 
implementation.  It works well, but It crashes when closing the kmail 
mail window .Tom has no idea of what could cause it, I searched a lot, 
and I cannot understand why it crashes ; so here am I soliciting kde-pim 
mailing-list help.

Here is join my patch ; I had an  --viewid (yes id is not well choosen 
but it's shorter than --viewByMsgSerNum) option following the --view one 
; the code is short & simple.

Tom suggests that it crashes because kmfolder remain open ; but I can't 
close it currently (I made a slot for closing it on KMReaderWindow 
deletion, but it crashes before the slot could be called)

Here is a crash gdb core dump : 
http://myfreefilehosting.com/f/b582ff3324_3.89MB
and the backtrace :

#0  0x0e000028 in ?? ()
#1  0xb6c20788 in KMMsgBase::syncIndexString (this=0x9536c78)
   at /home/mdupuy/dev/kmail-patch/kdepim/kmail/kmmsgbase.cpp:1209
#2  0xb6dadf8b in KMFolderIndex::updateIndex (this=0x94e4140, 
aboutToClose=true)
   at /home/mdupuy/dev/kmail-patch/kdepim/kmail/kmfolderindex.cpp:57
#3  0xb6c94818 in KMFolderMaildir::reallyDoClose (this=0x94e4140)
   at /home/mdupuy/dev/kmail-patch/kdepim/kmail/kmfoldermaildir.cpp:199
#4  0xb6bacb6d in FolderStorage::close (this=0x954ef80, aForced=128)
   at /home/mdupuy/dev/kmail-patch/kdepim/kmail/folderstorage.cpp:110
#5  0xb6b7a216 in KMFolder::close (this=0x94de960, owner=0xb706a416 
"kmkernel", force=<value optimized out>)
   at /home/mdupuy/dev/kmail-patch/kdepim/kmail/kmfolder.cpp:543
#6  0xb6cb35a3 in KMKernel::cleanup (this=0xbfb44a84) at 
/home/mdupuy/dev/kmail-patch/kdepim/kmail/kmkernel.cpp:1733
#7  0x0804a63c in main (argc=4, argv=0xbfb44cf4) at 
/home/mdupuy/dev/kmail-patch/kdepim/kmail/main.cpp:148


Thanks in advance.
-- 

Dupuy Mathieu
Mandriva Intern
R&D Department

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kmail-view-by-sernum.diff
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20091023/b432a836/attachment.ksh>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list