[Mono-bugs] [Bug 599466] New: IpcChannel constructor throws a non descriptive exception when passed a long port name.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Apr 24 06:17:21 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=599466

http://bugzilla.novell.com/show_bug.cgi?id=599466#c0


           Summary: IpcChannel constructor throws a non descriptive
                    exception when passed a long port name.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: stephen.anderson at ruralcoder.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US)
AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2

The following code thrown an exception

IpcChannel newChannel = new IpcChannel
("01234567890123456789012345678901234567890123456789012345678901234567890123456789");

System.Reflection.TargetInvocationException ( System.IndexOutOfRangeException )


Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
System.IndexOutOfRangeException: Array index is out of range.
  at (wrapper managed-to-native) System.Net.Sockets.Socket:Bind_internal
(intptr,System.Net.SocketAddress,int&)
  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00038]
in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System/System.Net.Sockets/Socket.cs:1785 
  at Mono.Unix.UnixListener.Init (Mono.Unix.UnixEndPoint ep) [0x0005f] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/Mono.Posix/Mono.Unix/UnixListener.cs:60 
  at Mono.Unix.UnixListener..ctor (System.String path) [0x00022] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/Mono.Posix/Mono.Unix/UnixListener.cs:69 
  at (wrapper remoting-invoke-with-check) Mono.Unix.UnixListener:.ctor (string)
  at Mono.Remoting.Channels.Unix.UnixServerChannel.StartListening
(System.Object data) [0x00000] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixServerChannel.cs:214 
  at Mono.Remoting.Channels.Unix.UnixServerChannel.Init
(IServerChannelSinkProvider serverSinkProvider) [0x0004d] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixServerChannel.cs:82 
  at Mono.Remoting.Channels.Unix.UnixServerChannel..ctor (IDictionary
properties, IServerChannelSinkProvider serverSinkProvider) [0x00125] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixServerChannel.cs:109 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke
(object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[] activationAttributes)
[0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args,
System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args)
[0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Ipc.Unix.IpcServerChannel..ctor
(IDictionary properties, IServerChannelSinkProvider serverSinkProvider)
[0x00040] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Unix/IpcServerChannel.cs:103 
  at System.Runtime.Remoting.Channels.Ipc.Unix.IpcChannel..ctor (IDictionary
properties, IClientChannelSinkProvider clientSinkProvider,
IServerChannelSinkProvider serverSinkProvider) [0x000a1] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc.Unix/IpcChannel.cs:82 
  at System.Runtime.Remoting.Channels.Ipc.Unix.IpcChannel..ctor (System.String
portName) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Ipc.IpcChannel..ctor (System.String
portName) [0x00010] in
/private/tmp/monobuild/build/BUILD/mono-2.6.3/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcChannel.cs:64 


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Exception occurs which is not informative and incorrect with an also cryptic
inner exception System.IndexOutOfRangeException

Expected Results:  
No exception to be thrown (according to the MS reference documentation on
IpcChannel) and if there is one on the Mac platform, then an appropriate
exception should be thrown instead.

Limiting the size of the channel name eliminates this problem, so this
avoidable.

RARE, AVOIDABLE, LOW PRIORITY

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list