Closed GoogleCodeExporter closed 9 years ago
When ContactCardCompleted occurs, did you check e.Error ?
If e.Error is not null, ContactCard is null. Some users haven't contact card.
Original comment by hepha...@gmail.com
on 20 Mar 2009 at 7:25
ContactCardCompletedHandler never gets called.
The exception is thrown inside the MSNPSharp, and i cannot catch it and move-on.
So basically i call "contact.GetContactCard(contact.Mail)" and MSNPSharp blows
up.
and I tried to put try/catch arounf GetContactCard, and no luck.
Here is my code ContactCardCompletedHandler code:
----------------------
private void ContactCardCompletedHandler(object sender,
ContactCardCompletedEventArgs e)
{
try
{
String email = "";
if (e.ContactCard != null)
{
email = e.ContactCard.Mail;
}
TraceMessage("ContactCardCompletedHandler, " + email);
if (email.Length != 0)
{
...
}
}
catch (Exception ex)
{
TraceException("ContactCardCompletedHandler", ex);
}
}
Original comment by johnpaul...@gmail.com
on 20 Mar 2009 at 8:20
Here is the code and stack-trace (attached as files)
i think its a particular contact that is a corner-case here.
cause i am avoid those null contact occurences...
i just want to be able to catch this corner case and move on..
thanks
Original comment by johnpaul...@gmail.com
on 20 Mar 2009 at 8:28
Attachments:
I found the issue:
This:
e.Result.GetXmlFeedResult.contactCard.elements.element
is null
here is the offending code is MSNPSharp:
foreach (elementType element in
e.Result.GetXmlFeedResult.contactCard.elements.element)
{
...
}
Original comment by johnpaul...@gmail.com
on 20 Mar 2009 at 10:16
ok, I've committed a fix in trunk, try it. If it works, I will close this issue.
Original comment by freezing...@gmail.com
on 21 Mar 2009 at 5:15
Original comment by freezing...@gmail.com
on 22 Mar 2009 at 7:15
Original comment by hepha...@gmail.com
on 24 Mar 2009 at 2:13
Original issue reported on code.google.com by
johnpaul...@gmail.com
on 20 Mar 2009 at 7:09