Bug 7040 - WCF NullReferenceException at System.ServiceModel.Description.ContractDescriptionGenerator.GetOrCreateOperation
Summary: WCF NullReferenceException at System.ServiceModel.Description.ContractDescrip...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.4.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-10 10:56 UTC by uwantfries
Modified: 2013-12-05 18:35 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description uwantfries 2012-09-10 10:56:00 UTC
Our App (currently in the store) uses background mode to update a server with the users location in the background. 
As of updating to 5.4 and rebuilding the app now crashes in background mode after a few calls. Last version built with 5.3.12 (If I remember correctly) worked fine for days on end.


Dump from console attached.

Several Calls to TimedLocationUpdateAction() have been made prior to this crash in background mode.

>>>>>>>>

Mon Sep 10 15:41:13 steveks-iPod-Touch Spray[727] <Warning>: 10 September 2012 _ 15:41:13 [11]  :LOC - TimedLocationUpdateAction(): Update location timer fired. BackgroundTimeRemaining=541.150701458333


Mon Sep 10 15:41:13 steveks-iPod-Touch Spray[727] <Warning>: 10 September 2012 _ 15:41:13 [11]  :LOC - FinishedLaunching(): Unhandled errorSystem.NullReferenceException: Object reference not set to an instance of an object
	  at System.ServiceModel.Description.ContractDescriptionGenerator.GetOrCreateOperation (System.ServiceModel.Description.ContractDescription cd, System.Reflection.MethodInfo mi, System.Reflection.MethodInfo serviceMethod, System.ServiceModel.OperationContractAttribute oca, System.Type asyncReturnType, Boolean isCallback, System.Type givenServiceType) [0x001f2] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:314 
	  at System.ServiceModel.Description.ContractDescriptionGenerator.FillOperationsForInterface (System.ServiceModel.Description.ContractDescription cd, System.Type exactContractType, System.Type givenServiceType, Boolean isCallback) [0x00125] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:240 
	  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContractInternal (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x0027e] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:197 
	  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:136 
	  at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:131 
	  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 /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs:64 
	  at System.ServiceModel.ChannelFactory`1[ISpray].CreateDescription () [0x00000] in <filename unknown>:0 
	  at System.ServiceModel.ChannelFactory`1[ISpray]..ctor (System.Type type) [0x00000] in <filename unknown>:0 
	  at System.ServiceModel.ChannelFactory`1[ISpray]..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
	  at System.ServiceModel.ClientBase`1[ISpray].Initialize (System.ServiceModel.InstanceContext instance, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
	  at System.ServiceModel.ClientBase`1[ISpray]..ctor (System.ServiceModel.InstanceContext instance, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
	  at System.ServiceModel.ClientBase`1[ISpray]..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
	  at SprayClient..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 
	  at Spray.ProxyFactory.CreateProxy () [0x00000] in <filename unknown>:0 
	  at Spray.SprayUtils..ctor () [0x00000] in <filename unknown>:0 
	  at Spray.AppDelegate.TimedLocationUpdateAction () [0x00000] in <filename unknown>:0 
	  at Spray.AppDelegate.backgroundUpdate () [0x00000] in <filename unknown>:0 
	  at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSAction.cs:50 
	  at MonoTouch.Foundation.NSRunLoop.Run () [0x00003] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSRunLoop.g.cs:126 
	  at Spray.AppDelegate.<backgroundUpdate>m__7 () [0x00000] in <filename unknown>:0 
	  at MonoTouch.CoreFoundation.DispatchQueue.static_dispatcher_to_managed (IntPtr context) [0x0001a] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreFoundation/Dispatch.cs:277 
	  at (wrapper native-to-managed) MonoTouch.CoreFoundation.DispatchQueue:static_dispatcher_to_managed (intptr)


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescriptionGenerator.GetOrCreateOperation (System.ServiceModel.Description.ContractDescription cd, System.Reflection.MethodInfo mi, System.Reflection.MethodInfo serviceMethod, System.ServiceModel.OperationContractAttribute oca, System.Type asyncReturnType, Boolean isCallback, System.Type givenServiceType) [0x001f2] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:314 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescriptionGenerator.FillOperationsForInterface (System.ServiceModel.Description.ContractDescription cd, System.Type exactContractType, System.Type givenServiceType, Boolean isCallback) [0x00125] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:240 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Descrip


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: tion.ContractDescriptionGenerator.GetContractInternal (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x0027e] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:197 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:136 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:131 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type contractType) [0x00000] in <fi


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: lename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.Description.ContractDescription.GetContract (System.Type contractType) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs:64 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ChannelFactory`1[ISpray].CreateDescription () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ChannelFactory`1[ISpray]..ctor (System.Type type) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ChannelFactory`1[ISpray]..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ClientBase`1[ISpray].Initialize (System.ServiceModel.InstanceContext instance, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ClientBase`1[ISpray]..ctor (System.ServiceModel.InstanceContext instance, System.ServiceModel.Channels.Bindi


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: ng binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at System.ServiceModel.ClientBase`1[ISpray]..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at SprayClient..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spray.ProxyFactory.CreateProxy () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spray.SprayUtils..ctor () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spray.AppDelegate.TimedLocationUpdateAction () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spray.AppDelegate.backgroundUpdate () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at MonoTouch.Foundation.NSActionDispatcher.Apply () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSAction.cs:50 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at MonoTouch.Foundation.NSRunLoop.Run () [0x00003] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSRunLoop.g.cs:126 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spr


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: ay.AppDelegate.<backgroundUpdate>m__7 () [0x00000] in <filename unknown>:0 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at MonoTouch.CoreFoundation.DispatchQueue.static_dispatcher_to_managed (IntPtr context) [0x0001a] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreFoundation/Dispatch.cs:277 


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at (wrapper native-to-managed) MonoTouch.CoreFoundation.DispatchQueue:static_dispatcher_to_managed (intptr)


Mon Sep 10 15:41:13 steveks-iPod-Touch Spray[727] <Critical>: Terminating runtime due to unhandled exception


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: Stacktrace:


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:43


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at Spray.Application.Main (string[]) <IL 0x00001, 0x0009f>


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>


Mon Sep 10 15:41:13 steveks-iPod-Touch UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727] <Notice>: Native stacktrace:


Mon Sep 10 15:41:14 steveks-iPod-Touch ReportCrash[735] <Notice>: Formulating crash report for process Spray[727]


Mon Sep 10 15:41:14 steveks-iPod-Touch SpringBoard[28] <Warning>: notify_suspend_pid() failed with error 1000000


Mon Sep 10 15:41:14 steveks-iPod-Touch SpringBoard[28] <Warning>: pid_suspend failed for [727]: Operation not permitted, Unknown error: -1


Mon Sep 10 15:41:14 steveks-iPod-Touch com.apple.launchd[1] (UIKitApplication:uk.co.solvd.sprayv2[0x99b1][727]) <Warning>: (UIKitApplication:uk.co.solvd.sprayv2[0x99b1]) Job appears to have crashed: Abort trap


Mon Sep 10 15:41:14 steveks-iPod-Touch SpringBoard[28] <Warning>: Application 'sprayv2' exited abnormally with signal 6: Abort trap


Mon Sep 10 15:41:14 steveks-iPod-Touch ReportCrash[735] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/Spray_2012-09-10-154113_steveks-iPod-Touch.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-09-10 17:11:24 UTC
Could you please add a test case we can use to reproduce this ourselves (or even your entire project if you're ok with that)?
Comment 2 PJ 2013-11-19 17:05:19 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 PJ 2013-12-05 18:35:39 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.