After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608771 - evolution crashed while disabling the mapi account
evolution crashed while disabling the mapi account
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
0.29.x
Other Linux
: Normal critical
: ---
Assigned To: Milan Crha
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-02 08:10 UTC by Akhil Laddha
Modified: 2010-02-02 18:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
proposed ema patch (4.02 KB, patch)
2010-02-02 09:50 UTC, Milan Crha
committed Details | Review

Description Akhil Laddha 2010-02-02 08:10:28 UTC
evolution 2.29.6
libmapi 0.9 

I was disabling the account from preferences and just after disabling, evolution crashed.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xac4dcb70 (LWP 6816)]
0xb48fb136 in mapi_new_mail_fetch (session=0x80d2c48, msg=0xab2118c8)
    at camel-mapi-notifications.c:96
96		const gchar *folder_id = exchange_mapi_util_mapi_id_to_string (event->FID);
(gdb) t a a bt

Thread 13 (Thread 0xac4dcb70 (LWP 6816))

  • #0 mapi_new_mail_fetch
    at camel-mapi-notifications.c line 96
  • #1 session_thread_proxy
    at camel-session.c line 590
  • #2 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #3 g_thread_create_proxy
    at gthread.c line 635
  • #4 start_thread
    at pthread_create.c line 297
  • #5 ??
    at pthread_create.c line 216

Comment 1 Akhil Laddha 2010-02-02 08:31:44 UTC
Some times it appears when i disable the account and close evolution.
Comment 2 Milan Crha 2010-02-02 09:50:43 UTC
Created attachment 152819 [details] [review]
proposed ema patch

for evolution-mapi;

I caused that, my fault. This may fix it, just notice it'll be triggered only when some New Mail notification will be received.

I also fixed invalid read on messages with attachments:
==20057== Invalid read of size 4
==20057==    at 0x7B5456F: get_SPropValue (property.c:107)
==20057==    by 0x7AF1A47: exchange_mapi_util_find_SPropVal_array_propval (exchange-mapi-utils.c:141)
==20057==    by 0x5A8FBAA: mapi_folder_item_to_msg (camel-mapi-folder.c:1693)
==20057==    by 0x5A90148: mapi_folder_get_message (camel-mapi-folder.c:1826)
==20057==    by 0x43910A5: camel_folder_get_message (camel-folder.c:1114)
==20057==    by 0x54DC346: get_message_exec (mail-ops.c:1858)
==20057==    by 0x54D7C9E: mail_msg_proxy (mail-mt.c:459)
==20057==    by 0xBDA0E6: g_thread_pool_thread_proxy (gthreadpool.c:265)
==20057==    by 0xBD8A4F: g_thread_create_proxy (gthread.c:635)
==20057==    by 0xB29AB4: start_thread (pthread_create.c:297)
==20057==    by 0xA8083D: clone (clone.S:130)
==20057==  Address 0x4d647b0 is 0 bytes after a block of size 256 alloc'd
==20057==    at 0x4004F1B: calloc (vg_replace_malloc.c:418)
==20057==    by 0xBB664C: g_malloc0 (gmem.c:151)
==20057==    by 0x7AEA504: exchange_mapi_util_get_attachments (exchange-mapi-connection.c:701)
==20057==    by 0x7AEC71F: exchange_mapi_connection_fetch_item (exchange-mapi-connection.c:1475)
==20057==    by 0x5A900E0: mapi_folder_get_message (camel-mapi-folder.c:1813)
==20057==    by 0x43910A5: camel_folder_get_message (camel-folder.c:1114)
==20057==    by 0x54DC346: get_message_exec (mail-ops.c:1858)
==20057==    by 0x54D7C9E: mail_msg_proxy (mail-mt.c:459)
==20057==    by 0xBDA0E6: g_thread_pool_thread_proxy (gthreadpool.c:265)
==20057==    by 0xBD8A4F: g_thread_create_proxy (gthread.c:635)
==20057==    by 0xB29AB4: start_thread (pthread_create.c:297)
==20057==    by 0xA8083D: clone (clone.S:130)

I realized that get_SPropValue is traversing through all the properties until it stops on the lpProps[i].ulPropTag == 0, thus allocating buffer one element longer than necessary is fixing it. I'm not sure where everywhere it is required.
Comment 3 Milan Crha 2010-02-02 18:12:47 UTC
Created commit b432e3e in ema master (0.29.90+)

The gnome-2-28 doesn't have notification code, thus no need for it there.