PC Review


Reply
Thread Tools Rate Thread

ArgumentNullException went passing remoted ManualResetEvent to WaitAny

 
 
Lee Chapman
Guest
Posts: n/a
 
      7th Feb 2007
Hi,

I'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)

 
Reply With Quote
 
 
 
 
Oliver Sturm
Guest
Posts: n/a
 
      12th Feb 2007
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
 
Reply With Quote
 
Lee Chapman
Guest
Posts: n/a
 
      13th Feb 2007
On Feb 12, 3:41 pm, "Oliver Sturm" <oli...@sturmnet.org> wrote:
> 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


Okay - thanks.

- Lee

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ArgumentNullException Scott Toney Microsoft Dot NET Compact Framework 1 31st Jan 2006 05:18 PM
ManualResetEvent.WaitOne() and ManualResetEvent.Set() Kovan Akrei Microsoft C# .NET 2 22nd May 2004 10:32 AM
passing credentials to remoted object =?Utf-8?B?VkJJU0tJTkc=?= Microsoft Dot NET Framework Forms 0 2nd Mar 2004 03:56 PM
Passing Credential to SOAP via a .NET remoted object Steve Drake Microsoft ASP .NET 1 13th Feb 2004 05:26 PM
ArgumentNullException Lloyd Dupont Microsoft Dot NET Compact Framework 1 1st Oct 2003 05:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:24 PM.