[Mono-bugs] [Bug 683223] New: Service Reference initialization error in 2.10.1. Works fine in 2.8.1

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 28 17:13:33 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=683223

https://bugzilla.novell.com/show_bug.cgi?id=683223#c0


           Summary: Service Reference initialization error in 2.10.1.
                    Works fine in 2.8.1
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.10.x
          Platform: i686
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: remoting
        AssignedTo: lluis at novell.com
        ReportedBy: bcorbin at wms.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=421773)
 --> (http://bugzilla.novell.com/attachment.cgi?id=421773)
app.config

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101
Firefox/4.0

When newing up a service client, getting an unhandled exception.

"using (BuildServerSvc.Service1Client jobClient = new
BuildServerSvc.Service1Client())" throw an exception in 2.10.1.

BuildServerSvc is a Service Reference generated in Visual Studio.  

This works fine in 2.8.1.  Doesn't work in 2.10.1.


Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
Parameter name: key
  at
System.Collections.Generic.Dictionary`2[System.Type,System.ServiceModel.ServiceContractAttribute].ContainsKey
(System.Type key) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.Description.ContractDescriptionGenerator.GetContractInternal
(System.Type givenContractType, System.Type givenServiceType, System.Type
serviceTypeForCallback) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type givenContractType, System.Type givenServiceType, System.Type
serviceTypeForCallback) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type givenContractType, System.Type givenServiceType) [0x00000] in
<filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type contractType) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescription.GetContract
(System.Type contractType) [0x00000] in <filename unknown>:0
  at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String
endpointConfig) [0x00000] in <filename unknown>:0
  at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String
endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
[0x00000] in <filename unknown>:0
  at
System.ServiceModel.ChannelFactory`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.String endpointConfigurationName, System.ServiceModel.EndpointAddress
remoteAddress) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1].Initialize
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
[0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.ServiceModel.InstanceContext instance) [0x00000] in <filename
unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor ()
[0x00000] in <filename unknown>:0
  at BuildServer.BuildServerSvc.Service1Client..ctor () [0x00000] in <filename
unknown>:0


Reproducible: Always

Steps to Reproduce:
1. Create a simple WCF service with basic contracts.  I used .net/windows for
this.
2. Create a separate project and add a service reference to the WCF service via
Visual Studio 2010.
3. Call the generated ctor for the Service Client.  IE: using
(BuildServerSvc.Service1Client jobClient = new BuildServerSvc.Service1Client())
Actual Results:  
Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
Parameter name: key
  at
System.Collections.Generic.Dictionary`2[System.Type,System.ServiceModel.ServiceContractAttribute].ContainsKey
(System.Type key) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.Description.ContractDescriptionGenerator.GetContractInternal
(System.Type givenContractType, System.Type givenServiceType, System.Type
serviceTypeForCallback) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type givenContractType, System.Type givenServiceType, System.Type
serviceTypeForCallback) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type givenContractType, System.Type givenServiceType) [0x00000] in
<filename unknown>:0
  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract
(System.Type contractType) [0x00000] in <filename unknown>:0
  at System.ServiceModel.Description.ContractDescription.GetContract
(System.Type contractType) [0x00000] in <filename unknown>:0
  at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String
endpointConfig) [0x00000] in <filename unknown>:0
  at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String
endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
[0x00000] in <filename unknown>:0
  at
System.ServiceModel.ChannelFactory`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.String endpointConfigurationName, System.ServiceModel.EndpointAddress
remoteAddress) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1].Initialize
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
[0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.ServiceModel.InstanceContext instance, System.String
endpointConfigurationName) [0x00000] in <filename unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor
(System.ServiceModel.InstanceContext instance) [0x00000] in <filename
unknown>:0
  at
System.ServiceModel.ClientBase`1[BuildServer.BuildServerSvc.IService1]..ctor ()
[0x00000] in <filename unknown>:0
  at BuildServer.BuildServerSvc.Service1Client..ctor () [0x00000] in <filename
unknown>:0


Expected Results:  
I expect this to not throw an exception, since it worked fine in 2.8.1.  It
should create the service client so I can then communicate with the service.

app.config attached

Using Mono 2.10.1 on Centos 5.1.  Built with xbuild on mono 2.10.1.

The reason I upgraded to 2.10.1 is because this exact same statement is leaking
memory like a sieve on 2.8.1 and it's wrapped in a using statement.  I even
tried calling the GC.collect() immediately after closing the using statement,
but still leaked.

-- 
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