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 397265 - Image loading for new contact requires restarting Evolution
Image loading for new contact requires restarting Evolution
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Milan Crha
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-01-16 14:39 UTC by Aiman Baharna
Modified: 2009-10-26 12:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
proposed evo patch (18.70 KB, patch)
2009-07-24 15:24 UTC, Milan Crha
reviewed Details | Review
proposed evo patch ][ (18.82 KB, patch)
2009-09-23 10:53 UTC, Milan Crha
committed Details | Review

Description Aiman Baharna 2007-01-16 14:39:23 UTC
Please describe the problem:

After adding a new contact to any of the local addressbooks, HTML image loading does not work for emails from that contact when Evolution is set to load images only in emails from contacts

Steps to reproduce:
1. Set Evolution to only load images from contacts. Select Evolution Preferences > Mail Preferences > HTML Mail > Load images in mail from contacts.
2. In the Mailer, highlight an email from a sender not in the address book.
3. Add the sender to the addressbook. Message > Add Sender to Address Book, or right click email address and select from the pop-up "Add to Address Book".

Actual results:
Images are not displayed in the selected email in either the preview area or when opening the selected email in a new window. Images are not displayed as long as Evolution is running. Evolution must be restarted for image loading for the newly-added sender to work.

Expected results:
Selected email from a contact will successfully load images when that contact is added to address book. There will be no need to restart Evolution.

Does this happen every time?
Yes.

Other Information:
No proxies are in place or firewalls to block images.
I am not sure why restarting Evolution fixes the problem.
Using Gnome Evolution 2.8.1 on Gnome 2.16.1 (Ubuntu Edgy).
Thanks for whoever did the template.
Comment 1 Milan Crha 2009-07-24 15:24:56 UTC
Created attachment 139164 [details] [review]
proposed evo patch

for evolution;

The "problem" is with the memory cache of known contacts. It had there the information about the address not in your address book, thus adding it didn't help. It's pretty the same with this patch, except of that when you add the contact to your address book by right-click over the address in the mail preview, then the cache is also updated later (of course, only if your address book is checked for this operation).

I changed here couple things apart of that, there is a cache of photos for the contact, up to 10 photos can be in memory, and it's using the same function as an em_utils_in_addressbook.

Also, the EBooks are not closed when finished, they are kept in memory for later use. I hope it'll help a bit with bug #557613 too.
Comment 2 Chenthill P 2009-09-09 11:18:57 UTC
Matt, is it safe to take this patch for 2.28, especially looking at the number of duplicates at bug #557613 ?
Comment 3 Chenthill P 2009-09-22 09:15:42 UTC
The changes made a reasonable. It would be good to destroy the global objects when evolution quits. Please update the patch to apply to master. I would like to test the patch before approving the same.
Comment 4 Milan Crha 2009-09-23 10:53:51 UTC
Created attachment 143780 [details] [review]
proposed evo patch ][

for evolution;

Updated to master. Though note other issues there:
 - checking new address books for autocompletion isn't saved
 - saving the contact reports an error about local addressbook being read-only

Nonetheless, there are couple workarounds to check validity of this patch.
Note I changed also G_LOCK_DEFINE to G_LOCK_DEFINE_STATIC.
Comment 5 Akhil Laddha 2009-10-09 04:59:24 UTC
Just curious, will this patch work for bug 203286 ?
Comment 6 Milan Crha 2009-10-09 07:53:11 UTC
(In reply to comment #5)
> Just curious, will this patch work for bug 203286 ?

Nope, the other bug is about Edit->Preferences->... change to invoke reload of preview/message view windows to load images immediately, instead of waiting for next message render. I like the bug #203286 comment #3 there, the end of it, "when time permits". From my point of view close that bug, time didn't permit for last 8 years. :)
Comment 7 Milan Crha 2009-10-26 12:13:29 UTC
Created commit 57712e8 in evo gnome-2-28 (2.28.2+) as I was told on IRC by Chen.
The same committed Chen to master in commit 12cb5975 (2.29.1+) few hours ago.