TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

Uncaught Exception in AddContactToList method #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I received an uncaught NullReferenceException in MSNPsharp, here is the 
corresponding StackTrace :

at MSNPSharp.ContactService.<>c__DisplayClass3c.<AddContactToList>b__3b
(Object service, AddMemberCompletedEventArgs e)
   at 
MSNPSharp.MSNWS.MSNABSharingService.SharingServiceBinding.OnAddMemberOperationCo
mpleted
(Object arg)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object 
state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)

I didn't manage to reproduce the problem, when it happened, it was when I 
closed my client, after having invited a new contact.
I think the problem comes from the delegate :
sharingService.AddMemberCompleted += delegate(object service, 
AddMemberCompletedEventArgs e)

What version of the product are you using? On what operating system?
Release 2.5.3 on Windows Vista

Please provide any additional information below.
well, I'm sorry but I don't have any other information to give you. If I 
manage to reproduce the bug I'll tell you how 

Original issue reported on code.google.com by adh...@gmail.com on 30 Jan 2009 at 10:49

GoogleCodeExporter commented 9 years ago
Hi,

Please provide debug information for NullReferenceException.

Open: Visual Studio
Menu: Debug - Exceptions - Common Language Runtime Exceptions
Find: System - NullReferenceException
Do: Tick thrown, untick user-unhandled
Run: AddMember

Thanks..

Original comment by hepha...@gmail.com on 30 Jan 2009 at 10:58

GoogleCodeExporter commented 9 years ago
I didn't reproduce the bug, but I received the same kind of exception on the 
RemoveContactFromList method

Here is the complete stacktrace :
   at MSNPSharp.ContactService.handleServiceHeader(ServiceHeader sh, Type 
requestType)
   at MSNPSharp.ContactService.<>c__DisplayClass3f.<RemoveContactFromList>b__3e
(Object service, DeleteMemberCompletedEventArgs e)
   at 
MSNPSharp.MSNWS.MSNABSharingService.SharingServiceBinding.OnDeleteMemberOperatio
nCompleted
(Object arg)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup
(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext 
executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, 
ContextCallback callback, Object state)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal
(_ThreadPoolWaitCallback tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

When handleServiceHeader is called, PreferredHosts is null and the exception 
happens 
at the line :
PreferredHosts[requestType.ToString()] = sh.PreferredHostName;

I still don't manage to reproduce the bug every time, but it always happen when 
I 
close my client

Original comment by adh...@gmail.com on 2 Feb 2009 at 2:40

GoogleCodeExporter commented 9 years ago
I think, when you add a new contact then logout immediately or you aren't wait
complete :)
Fixed.

Original comment by hepha...@gmail.com on 16 Feb 2009 at 1:43