Bug 21778 - Link SDK Assemblies removes something in System.ServiceModel where iOS does not
Summary: Link SDK Assemblies removes something in System.ServiceModel where iOS does not
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.12.4
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2014-08-01 18:23 UTC by John Miller [MSFT]
Modified: 2014-10-17 11:43 UTC (History)
1 user (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 FIXED

Description John Miller [MSFT] 2014-08-01 18:23:59 UTC
### Overview: 

    Attached is a sample Xamarin.Forms iOS / Android project. Both the platform projects have Link SDK Assemblies set. When running the iOS version, it works fine. On Android it crashes possibly due to the linker removing parts of System.ServiceModel. 

### Steps to Reproduce: 

    1. Run the iOS project.
    2. Enter anything for username / password. 
    3. Press the login button. 
    4. Login Successful is shown. 
    5. Repeat steps 1, but this time with the Android project. 

### Actual Results: 

    The Android project crashes:

> [MonoDroid] UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
> [MonoDroid] at System.ServiceModel.MonoInternal.ClientRuntimeChannel..ctor > (System.ServiceModel.Dispatcher.ClientRuntime,System.ServiceModel.Description.ContractDescription,System.TimeSpan,System.TimeSpan> ,System.ServiceModel.Channels.IChannel,System.ServiceModel.Channels.IChannelFactory,System.ServiceModel.Channels.MessageVersion,S> ystem.ServiceModel.EndpointAddress,System.Uri) <0x00471>
> [MonoDroid] at System.ServiceModel.MonoInternal.ClientRuntimeChannel..ctor > (System.ServiceModel.Description.ServiceEndpoint,System.ServiceModel.ChannelFactory,System.ServiceModel.EndpointAddress,System.Ur> i) <0x000b3>
> [MonoDroid] at System.ServiceModel.ClientBase`1/ChannelBase`1<XamarinTestApp.ISoapService, > XamarinTestApp.ISoapService>.get_Inner () <0x00073>
> [MonoDroid] at System.ServiceModel.ClientBase`1/ChannelBase`1<XamarinTestApp.ISoapService, > XamarinTestApp.ISoapService>.BeginInvoke (string,object[],System.AsyncCallback,object) <0x0005b>
> [MonoDroid] at XamarinTestApp.SoapServiceClient/SoapServiceClientChannel.BeginLogin > (XamarinTestApp.LoginRequest,System.AsyncCallback,object) <0x0004f>
> [MonoDroid] at XamarinTestApp.SoapServiceClient.XamarinTestApp.ISoapService.BeginLogin > (XamarinTestApp.LoginRequest,System.AsyncCallback,object) <0x0002a>
> [MonoDroid] at XamarinTestApp.SoapServiceClient.BeginLogin (string,string,string,System.AsyncCallback,object) <0x000ab>
> [MonoDroid] at XamarinTestApp.SoapServiceClient.OnBeginLogin (object[],System.AsyncCallback,object) <0x00097>
> [MonoDroid] at System.ServiceModel.ClientBase`1<XamarinTestApp.ISoapService>.InvokeAsync > (System.ServiceModel.ClientBase`1/BeginOperationDelegate<XamarinTestApp.ISoapService>,object[],System.ServiceModel.ClientBase`1/E> ndOperationDelegate<XamarinTestApp.ISoapService>,System.Threading.SendOrPostCallback,object) <0x001ac>
> [MonoDroid] at XamarinTestApp.SoapServiceClient.LoginAsync (string,string,string,object) <0x0029b>
> [MonoDroid] at XamarinTestApp.SoapServiceClient.LoginAsync (string,string,string) <0x0001b>
> [MonoDroid] at XamarinTestApp.LoginViewModel.Login (object) <0x00035>
> [MonoDroid] at XamarinTestApp.DelegateCommand`1<object>.Execute (object) <0x0004a>
> [MonoDroid] at Xamarin.Forms.Button.SendClicked () <0x0003d>
> [MonoDroid] at Xamarin.Forms.Platform.Android.ButtonRenderer/ButtonClickListener.OnClick (Android.Views.View) <0x00057>
> [MonoDroid] at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) <0x0004a>
> [MonoDroid] at (wrapper dynamic-method) object.361a0534-ba41-4bea-96e9-3e7b12fa7fc6 (intptr,intptr,intptr) <0x0001f>

### Expected Results: 

    That the Link Assemblies would not cause an issue on Android that it does not create on iOS.

### Build Date & Platform: 

   XA 4.12.6
   XI 7.2.5
Comment 2 Radek Doulik 2014-10-17 11:43:36 UTC
I am unable to replicate on master => suppose it is fixed.