|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ArgumentNullException went passing remoted ManualResetEvent to WaitAnyI'm creating a ManualResetEvent in one AppDomain and then passing it to a second AppDomain. (WaitHandle derives from MarshalByRefObject.) If I call WaitOne() on my wait handle's remoting proxy, it works just fine. If I pass the proxy to WaitHandle.WaitAny(), however, I get an ArgumentNullException (see below). The ManualResetEvent is obviously remoting okay because WaitOne() works. Does anyone know why I can't seemt to use the same object reference in a call to WaitHandle.WaitAny()? Thanks, - Lee System.ArgumentNullException: Value cannot be null. Parameter name: info at System.IntPtr.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) at System.Threading.WaitHandle.WaitMultiple(WaitHandle[] waitHandles, Int32 millisecondsTimeout, Boolean exitContext, Boolean WaitAll) at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles, Int32 millisecondsTimeout, Boolean exitContext) at System.Threading.WaitHandle.WaitAny(WaitHandle[] waitHandles) at App.Smtp.RelayThread.Run(EventWaitHandle shutdownEvent) in RelayThread.cs:line 43 at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) Hello Lee,
>Does anyone know why I can't seemt to use the same object No, sorry - there seems to be something rather weird going wrong with >reference in a call to WaitHandle.WaitAny()? serialization, judging from your stack trace. I'd suggest you might want to post this to microsoft.public.dotnet.framework.remoting, in case some expert can help with a reference to a known problem. Oliver Sturm On Feb 12, 3:41 pm, "Oliver Sturm" <oli***@sturmnet.org> wrote: Okay - thanks.> Hello Lee, > > >Does anyone know why I can't seemt to use the same object > >reference in a call to WaitHandle.WaitAny()? > > No, sorry - there seems to be something rather weird going wrong with > serialization, judging from your stack trace. I'd suggest you might want > to post this to microsoft.public.dotnet.framework.remoting, in case some > expert can help with a reference to a known problem. > > Oliver Sturm > --http://www.sturmnet.org/blog - Lee |
|||||||||||||||||||||||