This project is read-only.


Windows Vista Bug: prevHost.exe crashes when reading windows contact


I am experiencing a bug that causes windows explorer to hang whilst viewing contacts created with Contacts.Net.
How to reproduce:
1) Create a contact with an email that has more then one custom label
2) Open Windows Contacts folder
3) Select a the contact (only single click to trigger the prevHost to generate a preview)
If you kill prevHost.exe you will notice that windows contacts continues to function with out the preview windows and the contact is completely valid and can be view or edited.
I believe that either Contact.NET is producing an invalid contact that the prevHost cant handle or prevHost has a bug that cant handle the contacts with emails with more then one label. Either way I thought this is an issue that needs to be considered for Contacts.NET.
I have attached an test example that causes this error. If anyone could suggest a work round that would allow me to embed unique id tags to email address that can be read through please let me know

file attachments

Closed May 31, 2011 at 9:15 PM by JoeCastro
This is very likely not getting fixed by Windows. It's not worth tracking in this project.


JoeCastro wrote Jan 25, 2008 at 7:00 PM

Thanks for reporting this.
It's a bug in the previewer. Not actually prevhost, but the previewer that it loads for displaying Contacts.

There is a workaround. It's less than ideal, I'll think more about whether there's an appropriate way I can hide callers from it...
I should probably caveat it up-front that this isn't official Microsoft support, and what I'm about to suggest relies on undocumented behavior and shouldn't be relied upon in future versions of Windows.

The previewer pulls all its details from the registry. It's looking for how to display the labels but since the mapping is missing it's returning an error code out to prevhost. You can add a string value under "HKCU\Software\Microsoft\WAB\Resources\Labels" where the value name is your label, and the value is however you want it to display in the previewer. If you want it to be hidden then just leave the value blank.
If you need a reference sample of what this looks like, there's a similar set of values under "HKLM\Software\Microsoft\WAB\Resources\Labels" for pre-defined labels. The HKLM key is using indirect resource strings for localization, but you can just put string literals and it will work.

What's happening is the previewer is bugging out because it doesn't find the value for the label and it's incorrectly returning an error code to prevhost. Not sure why prevhost is responding that way to the error.

Better solutions are I can re-implement the preview pane without this bug in Contacts.Net and include it in the installer, which I wanted to do anyways to add support for groups and businesses, but if you send this contact to someone who doesn't have the updated preview handler then they'll still get this behavior.

JoeCastro wrote Jan 25, 2008 at 7:41 PM

Changing some tags to indicate that this is a problem with Windows rather than Contacts.Net

wrote Jan 25, 2008 at 7:41 PM

wrote May 31, 2011 at 9:15 PM

wrote Feb 14, 2013 at 1:27 AM

wrote May 16, 2013 at 5:50 AM