GNOME Bugzilla – Bug 528411
address autocomplete locks evolution
Last modified: 2013-09-13 00:59:34 UTC
Steps to reproduce: 1. forward a message 2. type in 3-4 chars of an address, hit enter for found address 3. type in 3-4 chars of another address 4. evo goes grey, never returns Stack trace: (gdb) bt
+ Trace 195382
Other information: glib Revision: 6851 libsoup Revision: 1136 gtkhtml Revision: 8824 evolution-data-server Revision: 8638 evolution Revision: 35370 evolution-exchange Revision: 1622 evolution-webcal Revision: 429
also -- hit reply to an email, then started to backspace out one of the addresses in the To: field. This caused evo to go gray and not return. These errors displayed on gdb console.. [New Thread 0xb17ffb90 (LWP 17032)] (evolution:16391): gtkhtml-editor-WARNING **: : No such language [New Thread 0xb2ef8b90 (LWP 17036)] [New Thread 0xb0657b90 (LWP 17038)] (evolution:16391): Gtk-CRITICAL **: gtk_widget_get_clipboard: assertion `gtk_widget_has_screen (widget)' failed [Thread 0xb0ffeb90 (LWP 17031) exited] [Thread 0xb3ffbb90 (LWP 17030) exited]
reply to an email - delete the email addr in the To: field; attempt to replace it with another email addr -> evo locked (gdb) bt
+ Trace 195391
can you do "thread apply all bt" please? It depends on the output of that, but probably a state of evolution-data-server in time of this hang can be also useful.
(gdb) cont Continuing. BBDB spinning up... [New Thread 0xb2717b90 (LWP 7994)] [New Thread 0xb2f18b90 (LWP 7995)] <memory>:1: Invalid color constant '(null)' Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkHTML::spell-error-color' of type `GdkColor' from rc file value ""(null)"" of type `gchararray' [New Thread 0xb4031b90 (LWP 7996)] [Thread 0xb2717b90 (LWP 7994) exited] [Thread 0xb4031b90 (LWP 7996) exited] [New Thread 0xb4031b90 (LWP 7998)] (evolution:7684): gtkhtml-editor-WARNING **: : No such language [New Thread 0xb2717b90 (LWP 8002)] [New Thread 0xb0060b90 (LWP 8004)] [Thread 0xb4031b90 (LWP 7998) exited] (evolution:7684): libebook-WARNING **: EBookView: Exception while releasing BookView [Thread 0xb2f18b90 (LWP 7995) exited] ^C Program received signal SIGINT, Interrupt. 0xb7f61410 in __kernel_vsyscall () (gdb) thread apply all bt
+ Trace 195560
evolution-data-server (gdb) thread apply all bt
+ Trace 195561
in ../sysdeps/unix/sysv/linux/poll.c (gdb)
Reid, what about evolution-exchange-storage? It that process by any chance crashing on you? If so can you post a backtrace of that? (sorry)
Attaching to program: /opt/evo/libexec/evolution/2.24/evolution-exchange-storage, process 19517 .....snip.... (gdb) thread apply all bt
+ Trace 195572
Thread 7 (Thread 0xb3bffb90 (LWP 19959))
Thread 1 (Thread 0xb62bc6e0 (LWP 19517))
Attaching to program: /opt/evo/libexec/evolution/2.24/evolution-exchange-storage, process 20670 Slightly more info -- a second trace: ??? DDD lists execution pointer at line 523 ???? -> not sure i'm reading this right...DDD pointer at line 523 521 do { 522 do { -> 523 w = write (fd, buf + written, n - written); 524 } while (w == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); 525 if (w > 0) 526 written += w; 527 } while (w != -1 && written < n); 528 } else { 529 #ifndef G_OS_WIN32 530 int errnosav, flags, fdmax; 531 fd_set rdset, wrset; 532 533 flags = fcntl (fd, F_GETFL); 534 fcntl (fd, F_SETFL, flags | O_NONBLOCK); 535 536 fdmax = MAX (fd, cancel_fd) + 1; 537 do { 538 struct timeval tv; (gdb) cont Continuing. [New Thread 0xb45fcb90 (LWP 21091)] [New Thread 0xb3dfbb90 (LWP 21097)] [New Thread 0xb2df9b90 (LWP 21098)] [Thread 0xb2df9b90 (LWP 21098) exited] [Thread 0xb45fcb90 (LWP 21091) exited] [Thread 0xb3dfbb90 (LWP 21097) exited] [New Thread 0xb3dfbb90 (LWP 21101)] [New Thread 0xb45fcb90 (LWP 21102)] [Thread 0xb45fcb90 (LWP 21102) exited] [New Thread 0xb45fcb90 (LWP 21104)] [Thread 0xb45fcb90 (LWP 21104) exited] ^C Program received signal SIGINT, Interrupt. [Switching to Thread 0xb62b56e0 (LWP 20670)] 0xb7fb1410 in ?? () (gdb) thread apply all bt
+ Trace 195573
Thread 6 (Thread 0xb3dfbb90 (LWP 21101))
(In reply to comment #6) > Reid, what about evolution-exchange-storage? It that process by any chance > crashing on you? If so can you post a backtrace of that? (sorry) > It's not visibly crashing -- the process is still running when evo greys out and locks. The traces above for evolution-exchange-storage were taken by interrupting the evolution-exchange-storage process via DDD/gdb while evo was locked.
Created attachment 109673 [details] proposed eex patch for evolution-exchange; Reid, I cannot reproduce this myself, I'm not sure why, but it works fine for me. But, just by chance, can you try apply this patch? I'm not sure how much is this related to this bug, but with a bit of luck it will help. Thanks in advance. If it will not help, then please run evolution-data-server and evolution-exchange on its own console and see what they print there would be interesting too, at least the error messages, and maybe if evolution-exchange doesn't claim on double free or something similar. It sometimes happen that in the double free it doesn't crash, but freezes. Anyway, this patch would protect from the double free I'm thinking of, even no clue whether it's the issue here.
rthompso@raker ~ $ /opt/evo/libexec/evolution-data-server-2.24 evolution-data-server-Message: Starting server e-data-server-Message: adding type `EBookBackendFileFactory' e-data-server-Message: adding type `EBookBackendVCFFactory' e-data-server-Message: adding type `EBookBackendLDAPFactory' e-data-server-Message: adding type `EBookBackendGroupwiseFactory' e-data-server-Message: adding type `ECalBackendFileTodosFactory' e-data-server-Message: adding type `ECalBackendFileEventsFactory' e-data-server-Message: adding type `ECalBackendFileJournalFactory' e-data-server-Message: adding type `ECalBackendGroupwiseTodosFactory' e-data-server-Message: adding type `ECalBackendGroupwiseEventsFactory' e-data-server-Message: adding type `ECalBackendGroupwiseJournalFactory' e-data-server-Message: adding type `ECalBackendHttpTodosFactory' e-data-server-Message: adding type `ECalBackendHttpEventsFactory' e-data-server-Message: adding type `ECalBackendHttpMemosFactory' e-data-server-Message: adding type `ECalBackendContactsEventsFactory' e-data-server-Message: adding type `ECalBackendWeatherEventsFactory' e-data-server-Message: adding type `ECalBackendCalDAVEventsFactory' e-data-server-Message: adding type `ECalBackendGoogleTodosFactory' e-data-server-Message: adding type `ECalBackendGoogleEventsFactory' in server_log_handler evolution-data-server-Message: Server up and running impl_GNOME_Evolution_Addressbook_BookFactory_getBook + file:///home/rthompso/.evolution/addressbook/local/system => 0x8056ec0 impl_GNOME_Evolution_Addressbook_Book_open (0x8056ec0) impl_GNOME_Evolution_Addressbook_BookFactory_getBook + gal://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/gal impl_GNOME_Evolution_Addressbook_BookFactory_getBook + exchange://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/;personal/Contacts (evolution-data-server-2.24:20748): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) e_data_book_respond_get_book_view book_view file uref -------------------------------------------------------------------------- impl_GNOME_Evolution_Addressbook_BookFactory_getBook + gal://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/gal => 0x80d2f80 impl_GNOME_Evolution_Addressbook_Book_open (0x80d2f80) offlin============== impl_GNOME_Evolution_Addressbook_BookFactory_getBook + exchange://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/;personal/Contacts => 0x80d2fb0 impl_GNOME_Evolution_Addressbook_Book_open (0x80d2fb0) authenticate_user(0x81506b0, 0x80d2f80, Reid.Thompson, Jak1e&magg1e, plain/password) (evolution-exchange-storage:20752): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) e_data_book_respond_get_book_view start book view Mode:Remote Not marked for offline or cache not there start_book_view (0x8c64490) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1824:start_book_view: (&(mail=*)(!(msExchHideFromAddressLists=TRUE))(|(displayName=jre*)(|(displayName=jre*)(sn=jre*)(givenName=jre*)(mailNickname=jre*))(mail=jre*)(mailNickname=jre*))) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1840:start_book_view: starting ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1851:start_book_view: 0 Connected and ldap is null sigh adding search_op (0x8c64490, 3) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1875:start_book_view: adding search (evolution-exchange-storage:20752): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) start_book_view: Setting op 0x8b0c938 in book 0x8c64490 e_data_book_respond_get_book_view looked up msgid 3, got op 0x8b0c938 ldap_search_handler (0x8c64490) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1603:ldap_search_handler: search handler ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1661:ldap_search_handler: o/p 0 0 ldap_search_dtor (0x8c64490) ldap_search_dtor: Setting null inplace of 0x8b0c938 in view 0x8c64490 stop_book_view (0x8c64490) STOP BOOK VIEW: Getting op (nil) from view 0x8c64490 stop_book_view (0x8c64490) STOP BOOK VIEW: Getting op (nil) from view 0x8c64490
(In reply to comment #10) > Created an attachment (id=109673) [edit] > proposed eex patch > > for evolution-exchange; > > Reid, I cannot reproduce this myself, I'm not sure why, but it works fine for > me. But, just by chance, can you try apply this patch? I'm not sure how much is > this related to this bug, but with a bit of luck it will help. Thanks in > advance. > > If it will not help, then please run evolution-data-server and > evolution-exchange on its own console and see what they print there would be > interesting too, at least the error messages, and maybe if evolution-exchange > doesn't claim on double free or something similar. It sometimes happen that in > the double free it doesn't crash, but freezes. Anyway, this patch would protect > from the double free I'm thinking of, even no clue whether it's the issue here. > Tried the patch - the issue is still there. The above terminal output from eds and eex are with the patch.
Hmm, first console info (from comment #4) contains text with exception while releasing book view, the latest doesn't, but it contains other funny part, "Connected and ldap is null sigh", which should not happen probably. I'm not sure, but I guess it should not. Can you try to revert patches from bug #303067 and see what happens, please? These patches touch the code near of this, so I wonder how much related it is for you. It is not related at all for my machine/setup, though.
reverted patches from bug #303067 rthompso@raker ~ $ /opt/evo/libexec/evolution-data-server-2.24 evolution-data-server-Message: Starting server e-data-server-Message: adding type `EBookBackendFileFactory' e-data-server-Message: adding type `EBookBackendVCFFactory' e-data-server-Message: adding type `EBookBackendLDAPFactory' e-data-server-Message: adding type `EBookBackendGroupwiseFactory' e-data-server-Message: adding type `ECalBackendFileTodosFactory' e-data-server-Message: adding type `ECalBackendFileEventsFactory' e-data-server-Message: adding type `ECalBackendFileJournalFactory' e-data-server-Message: adding type `ECalBackendGroupwiseTodosFactory' e-data-server-Message: adding type `ECalBackendGroupwiseEventsFactory' e-data-server-Message: adding type `ECalBackendGroupwiseJournalFactory' e-data-server-Message: adding type `ECalBackendHttpTodosFactory' e-data-server-Message: adding type `ECalBackendHttpEventsFactory' e-data-server-Message: adding type `ECalBackendHttpMemosFactory' e-data-server-Message: adding type `ECalBackendContactsEventsFactory' e-data-server-Message: adding type `ECalBackendWeatherEventsFactory' e-data-server-Message: adding type `ECalBackendCalDAVEventsFactory' e-data-server-Message: adding type `ECalBackendGoogleTodosFactory' e-data-server-Message: adding type `ECalBackendGoogleEventsFactory' in server_log_handler evolution-data-server-Message: Server up and running impl_GNOME_Evolution_Addressbook_BookFactory_getBook + file:///home/rthompso/.evolution/addressbook/local/system => 0x8056f80 impl_GNOME_Evolution_Addressbook_Book_open (0x8056f80) (evolution-data-server-2.24:31111): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((contains "x-evolution-any-field" "")) e_data_book_respond_get_book_view book_view file uref impl_GNOME_Evolution_Addressbook_BookFactory_getBook + file:///home/rthompso/.evolution/addressbook/local/system => 0x8076750 impl_GNOME_Evolution_Addressbook_Book_open (0x8076750) impl_GNOME_Evolution_Addressbook_BookFactory_getBook + gal://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/gal impl_GNOME_Evolution_Addressbook_BookFactory_getBook + exchange://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/;personal/Contacts (evolution-data-server-2.24:31111): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) e_data_book_respond_get_book_view book_view file uref --------------------------------------------------------------------- started exchange-storeage.... performed steps to cause lock .. snipped bunched of empty space output to terminal.... my scroll buffer is set to 2500 lines, and it scrolled off the startup messages.. (evolution-exchange-storage:31134): exchange-mail-WARNING **: GC lookup failed: for delegator_entry - could not unmangle sender field snipped bunches of empty space output to terminal.... impl_GNOME_Evolution_Addressbook_BookFactory_getBook + gal://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/gal => 0x80ec520 impl_GNOME_Evolution_Addressbook_Book_open (0x80ec520) offlin============== impl_GNOME_Evolution_Addressbook_BookFactory_getBook + exchange://Reid.Thompson;auth=Basic@sr002-2k3exc.ateb.com/;personal/Contacts => 0x80ec550 impl_GNOME_Evolution_Addressbook_Book_open (0x80ec550) authenticate_user(0x85b0838, 0x80ec520, Reid.Thompson, Jak1e&magg1e, plain/password) (evolution-exchange-storage:31134): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) e_data_book_respond_get_book_view start book view Mode:Remote Not marked for offline or cache not there start_book_view (0x80ec630) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1806:start_book_view: (&(mail=*)(!(msExchHideFromAddressLists=TRUE))(|(displayName=jre*)(|(displayName=jre*)(sn=jre*)(givenName=jre*)(mailNickname=jre*))(mail=jre*)(mailNickname=jre*))) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1820:start_book_view: starting ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1831:start_book_view: 0 Connected and ldap is null sigh adding search_op (0x80ec630, 3) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1853:start_book_view: adding search start_book_view: Setting op 0x88361d8 in book 0x80ec630 (evolution-exchange-storage:31134): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "file_as" "jre") (beginswith "full_name" "jre") (beginswith "email" "jre") (beginswith "nickname" "jre") )) e_data_book_respond_get_book_view looked up msgid 3, got op 0x88361d8 ldap_search_handler (0x80ec630) ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1591:ldap_search_handler: search handler ../../../evolution-exchange/addressbook/e-book-backend-gal.c:1646:ldap_search_handler: o/p 0 0 ldap_search_dtor (0x80ec630) ldap_search_dtor: Setting null inplace of 0x88361d8 in view 0x80ec630 stop_book_view (0x80ec630) STOP BOOK VIEW: Getting op (nil) from view 0x80ec630 stop_book_view (0x80ec630) STOP BOOK VIEW: Getting op (nil) from view 0x80ec630
Created attachment 109698 [details] evo-exchange-storage terminal output
Created attachment 109699 [details] eds terminal output
ran same test as before but redirected all terminal output to the above attached files
NOTE: on the attachment 109698 [details], you'll need to scroll down hundreds of "empty" lines to see all the output ( on initial load of the file as a web page it appears empty after the startup messages -- it's not ).
So I guess it didn't help, right? Hmm, it was just a thought, because it touched the probably-related code. Do I recall correctly, when you turn off autocompletion on the GAL address book, then everything works fine? I just want to know which direction look... (btw take care of your passwords, those output are sometimes very horrible in security question, I'm sorry) :(
Correct -- it did not help. If I turn off auto-complete on Contacts everything works fine. I can use autocomplete with any combination of Personal and Global Adddress List. It is Contacts that appears to trigger the issue. Contacts used alone, or in any combination with Personal and/or Global Address List results in a lockup. Yeah -- i've noticed that. Have had to change my password a couple of times because of it && I still keep forgetting to check debug output prior to posting
Can you use Contacts in Address book? I mean to normal work except autocompletion? These Contacts come from exchange, right?
arrrrgghhhh -- sorry, it looks like I messed up reverting the patches. It DOES appear that reverting the patches fixes the issue. With these diffs in EDS exchange-account.c and EEX exchange-storage.c, I can utilize autocomplete with Contacts again: rthompso@raker ~/evo-src/evolution-data-server $ svn -x-wb diff -r HEAD Index: servers/exchange/storage/exchange-account.c =================================================================== --- servers/exchange/storage/exchange-account.c (revision 8670) +++ servers/exchange/storage/exchange-account.c (working copy) @@ -71,6 +71,7 @@ GHashTable *hierarchies_by_folder, *foreign_hierarchies; ExchangeHierarchy *favorites_hierarchy; GHashTable *folders, *fresh_folders; + GStaticRecMutex folders_lock; char *uri_authority, *http_uri_schema; gboolean uris_use_email, offline_sync; @@ -154,6 +155,7 @@ account->priv->foreign_hierarchies = g_hash_table_new (g_str_hash, g_str_equal); account->priv->folders = g_hash_table_new (g_str_hash, g_str_equal); account->priv->fresh_folders = NULL; + g_static_rec_mutex_init (&account->priv->folders_lock); account->priv->discover_data_lock = g_mutex_new (); account->priv->account_online = UNSUPPORTED_MODE; account->priv->nt_domain = NULL; @@ -205,17 +207,19 @@ account->priv->hierarchies = NULL; } - if (account->priv->hierarchies_by_folder) { - g_hash_table_destroy (account->priv->hierarchies_by_folder); - account->priv->hierarchies_by_folder = NULL; - } - if (account->priv->foreign_hierarchies) { g_hash_table_foreach (account->priv->foreign_hierarchies, free_name, NULL); g_hash_table_destroy (account->priv->foreign_hierarchies); account->priv->foreign_hierarchies = NULL; } + g_static_rec_mutex_lock (&account->priv->folders_lock); + + if (account->priv->hierarchies_by_folder) { + g_hash_table_destroy (account->priv->hierarchies_by_folder); + account->priv->hierarchies_by_folder = NULL; + } + if (account->priv->folders) { g_hash_table_foreach (account->priv->folders, free_folder, NULL); g_hash_table_destroy (account->priv->folders); @@ -228,6 +232,8 @@ account->priv->fresh_folders = NULL; } + g_static_rec_mutex_unlock (&account->priv->folders_lock); + G_OBJECT_CLASS (parent_class)->dispose (object); } @@ -303,6 +309,8 @@ if (account->priv->discover_data_lock) g_mutex_free (account->priv->discover_data_lock); + g_static_rec_mutex_free (&account->priv->folders_lock); + g_free (account->priv); G_OBJECT_CLASS (parent_class)->finalize (object); @@ -320,6 +328,7 @@ g_return_if_fail (EXCHANGE_IS_ACCOUNT (account)); + g_static_rec_mutex_lock (&account->priv->folders_lock); if (account->priv->fresh_folders) { g_hash_table_foreach (account->priv->fresh_folders, free_folder, NULL); g_hash_table_destroy (account->priv->fresh_folders); @@ -339,6 +348,7 @@ toplevel, account->priv->account_online); exchange_hierarchy_rescan (account->priv->hierarchies->pdata[i]); } + g_static_rec_mutex_unlock (&account->priv->folders_lock); } /* @@ -354,6 +364,8 @@ e_folder_exchange_get_permanent_uri (folder); char *key; + g_static_rec_mutex_lock (&account->priv->folders_lock); + /* This makes the cleanup easier. We just unref it each time * we find it in account->priv->folders. */ @@ -411,8 +423,11 @@ { g_hash_table_insert (account->priv->hierarchies_by_folder, folder, hier); + g_static_rec_mutex_unlock (&account->priv->folders_lock); g_signal_emit (account, signals[NEW_FOLDER], 0, folder); + } else { + g_static_rec_mutex_unlock (&account->priv->folders_lock); } } @@ -420,9 +435,12 @@ hierarchy_removed_folder (ExchangeHierarchy *hier, EFolder *folder, ExchangeAccount *account) { + g_static_rec_mutex_lock (&account->priv->folders_lock); if (!g_hash_table_lookup (account->priv->folders, - e_folder_exchange_get_path (folder))) + e_folder_exchange_get_path (folder))) { + g_static_rec_mutex_unlock (&account->priv->folders_lock); return; + } g_hash_table_remove (account->priv->folders, e_folder_exchange_get_path (folder)); @@ -435,6 +453,7 @@ e_folder_exchange_get_internal_uri (folder)); } g_hash_table_remove (account->priv->hierarchies_by_folder, folder); + g_static_rec_mutex_unlock (&account->priv->folders_lock); g_signal_emit (account, signals[REMOVED_FOLDER], 0, folder); if (folder == hier->toplevel) @@ -451,11 +470,15 @@ get_folder (ExchangeAccount *account, const char *path, EFolder **folder, ExchangeHierarchy **hier) { + g_static_rec_mutex_lock (&account->priv->folders_lock); *folder = g_hash_table_lookup (account->priv->folders, path); - if (!*folder) + if (!*folder) { + g_static_rec_mutex_unlock (&account->priv->folders_lock); return FALSE; + } *hier = g_hash_table_lookup (account->priv->hierarchies_by_folder, *folder); + g_static_rec_mutex_unlock (&account->priv->folders_lock); if (!*hier) return FALSE; return TRUE; @@ -471,15 +494,19 @@ if (!name) return FALSE; + g_static_rec_mutex_lock (&account->priv->folders_lock); parent_path = g_strndup (*path, name - *path); *parent = g_hash_table_lookup (account->priv->folders, parent_path); g_free (parent_path); - if (!*parent) + if (!*parent) { + g_static_rec_mutex_unlock (&account->priv->folders_lock); return FALSE; + } *hier = g_hash_table_lookup (account->priv->hierarchies_by_folder, *parent); + g_static_rec_mutex_unlock (&account->priv->folders_lock); if (!*hier) return FALSE; @@ -845,15 +872,20 @@ { EFolder *folder; + g_static_rec_mutex_lock (&account->priv->folders_lock); folder = g_hash_table_lookup (account->priv->folders, old_uri); - if (!folder) + if (!folder) { + g_static_rec_mutex_unlock (&account->priv->folders_lock); return; + } g_hash_table_remove (account->priv->folders, old_uri); e_folder_exchange_set_internal_uri (folder, new_uri); g_hash_table_insert (account->priv->folders, (char *)e_folder_exchange_get_internal_uri (folder), folder); + + g_static_rec_mutex_unlock (&account->priv->folders_lock); } static void @@ -1858,11 +1890,17 @@ exchange_account_get_folder (ExchangeAccount *account, const char *path_or_uri) { + EFolder *folder; + g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL); if (!path_or_uri) return NULL; - return g_hash_table_lookup (account->priv->folders, path_or_uri); + g_static_rec_mutex_lock (&account->priv->folders_lock); + folder = g_hash_table_lookup (account->priv->folders, path_or_uri); + g_static_rec_mutex_unlock (&account->priv->folders_lock); + + return folder; } static int @@ -1930,11 +1968,13 @@ g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL); folders = g_ptr_array_new (); + g_static_rec_mutex_lock (&account->priv->folders_lock); /* if (account->priv->fresh_folders) g_hash_table_foreach (account->priv->fresh_folders, add_folder, folders); else */ g_hash_table_foreach (account->priv->folders, add_folder, folders); + g_static_rec_mutex_unlock (&account->priv->folders_lock); qsort (folders->pdata, folders->len, sizeof (EFolder *), folder_comparator); @@ -1975,11 +2015,13 @@ fld_tree->path = path; fld_tree->folders = folders; + g_static_rec_mutex_lock (&account->priv->folders_lock); /* if (account->priv->fresh_folders) g_hash_table_foreach (account->priv->fresh_folders, add_folder, folders); else */ g_hash_table_foreach (account->priv->folders, add_folder_tree, fld_tree); + g_static_rec_mutex_unlock (&account->priv->folders_lock); qsort (folders->pdata, folders->len, sizeof (EFolder *), folder_comparator); ----------------------------------------------------------------- rthompso@raker ~/evo-src/evolution-exchange $ svn -x-wb diff -r HEAD Index: ChangeLog =================================================================== --- ChangeLog (revision 1623) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2008-04-22 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #528411 + + * storage/exchange-storage.c: (account_new_folder): + Increase ref count on the folder when passing to storage. + 2008-04-17 Milan Crha <mcrha@redhat.com> ** Fix for bug #526740 Index: storage/exchange-storage.c =================================================================== --- storage/exchange-storage.c (revision 1623) +++ storage/exchange-storage.c (working copy) @@ -129,7 +129,11 @@ { const char *path = e_folder_exchange_get_path (folder); - e_storage_new_folder (storage, path, folder); + if (!e_storage_new_folder (storage, path, g_object_ref (folder))) { + g_object_unref (folder); + return; + } + if (e_folder_exchange_get_has_subfolders (folder)) { e_storage_declare_has_subfolders (storage, path, _("Searching..."));
Full stop. It appears that bringing all components back to HEAD does not break anything. I'm going to completely remove my build environment and rebuild. I'll post back the results from a completely new build from svn HEAD.
Issue does not appear to exist in completely noew build from svn head. Closing this ticket. Apparently an issue with my build or run environment. Not sure if this should should be closed as FIXED, or INVALID, or... I'll note it as FIXED, if it needs to be something else let me know.
Good it works now. I think because we didn't do anything in the code to fix this, then I'll suggest to change the resolution to NotABug.