[Mono-bugs] [Bug 355905] New: TcpChannel does not accept null reference as first parameter (IDictionary)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Jan 24 06:48:02 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=355905
Summary: TcpChannel does not accept null reference as first
parameter (IDictionary)
Product: Mono: Runtime
Version: 1.2.6
Platform: x86
OS/Version: Windows XP
Status: NEW
Severity: Minor
Priority: P5 - None
Component: remoting
AssignedTo: lluis at novell.com
ReportedBy: lars.g.kjellberg at get2net.dk
QAContact: mono-bugs at lists.ximian.com
Found By: Other
Description of Problem:
The constructor:
System.Runtime.Remoting.Channels.Tcp.TcpChannel (IDictionary,
IClientChannelSinkProvider, IServerChannelSinkProvider)
does not accept null as the first parameter. That causes a null reference
exception. This is in contrast to Microsoft's implementation, and it also
differs from Mono's implementation of the corresponding IpcChannel constructor.
Using a null parameter should yield the same behaviour as if supplying an empty
dictionary.
Supplying an empty dictionary is an easy workaround, but just for completeness,
I think the implementation should behave identically. Even despite the fact
that Microsoft's documentation doesn't state how a null parameter should be
interpreted.
Steps to reproduce the problem:
1.
Run the program:
using System.Runtime.Remoting.Channels.Tcp;
public class Program
{
public static void Main(string[] args)
{
TcpChannel myChannel = new TcpChannel(null, null, null);
}
}
2.
Actual Results:
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Runtime.Remoting.Channels.Tcp.TcpClientChannel..ctor (IDictionary
pr operties, IClientChannelSinkProvider sinkProvider) [0x00000]
at System.Runtime.Remoting.Channels.Tcp.TcpChannel.Init (IDictionary
properties, IClientChannelSinkProvider clientSink, IServerChannelSinkProvider
serverSink) [0x00000]
at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor (IDictionary
properties, IClientChannelSinkProvider clientSinkProvider,
IServerChannelSinkProvider serverSinkProvider) [0x00000]
at Program.Main (System.String[] args) [0x00000]
Expected Results:
None.
How often does this happen?
Always
Additional Information:
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list