Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I noticed a crash when using an Task.FromAsync style WCF call in my release build (no crash in debug). The proxy classes were created with slsvcutil as per the instructions on the site.
Changing Linking to None makes it not crash.
Here's a bit of the call stack window
0x14A in System.ServiceModel.MonoInternal.ClientRuntimeChannel..ctor C#
0x2F in System.ServiceModel.MonoInternal.ClientRuntimeChannel..ctor C#
0x24 in System.ServiceModel.ClientBase<MyApp.Portable.Services.EventsService.IEventsService>.ChannelBase<MyApp.Portable.Services.EventsService.IEventsService>.get_Inner C#
0x3D in System.ServiceModel.ClientBase<MyApp.Portable.Services.EventsService.IEventsService>.ChannelBase<MyApp.Portable.Services.EventsService.IEventsService>.BeginInvoke C#
> 0x15 in MyApp.Portable.Services.EventsService.EventsServiceClient.EventsServiceClientChannel.BeginCheckToken at c:\files\MyApp.Portable\Services\EventsService\EventsService.cs:694 C#
0xA in MyApp.Portable.Services.EventsService.EventsServiceClient.MyApp.Portable.Services.EventsService.IEventsService.BeginCheckToken at c:\files\MyApp.Portable\Services\EventsService\EventsService.cs:362 C#
0x70 in System.Threading.Tasks.TaskFactory<bool>.FromAsyncBeginEnd<MyApp.Portable.Services.EventsService.MyAppToken> C#
0x7 in System.Threading.Tasks.TaskFactory<bool>.FromAsync<MyApp.Portable.Services.EventsService.MyAppToken> C#
0xC in System.Threading.Tasks.TaskFactory<bool>.FromAsync<MyApp.Portable.Services.EventsService.MyAppToken> C#
0x60 in MyApp.Droid.LoginActivity.CheckToken at c:\files\MyApp.Android\LoginActivity.cs:176 C#
If I go back to the debug build (which works) and change linking to Sdk Assemblies Only and untick Use Shared Runtime it also crashes.
Those tests all use Compile using 18, min target 15, target 18.
More from case:
I was looking at making a minimal example, but you’ve already made one!
No need to run the service. Just run the Android app (haven’t tried iOS).
Clicking the “Say Hello World” button…
· Debug mode
o “Waiting for WCF”
· Release mode
Tried to file this on bugzilla but it never sent me a new account email.
I’m fairly certain this used to work so I’m going to try an older version.
Here’s version info you asked for.
Microsoft Visual Studio Professional 2013
Version 12.0.30110.00 Update 1
Microsoft .NET Framework
Installed Version: Professional
Microsoft Office Developer Tools for Visual Studio 2013 ENU 06177-004-0447006-02727
Microsoft Office Developer Tools for Visual Studio 2013 ENU
Team Explorer for Visual Studio 2013 06177-004-0447006-02727
Microsoft Team Explorer for Visual Studio 2013
Visual Basic 2013 06177-004-0447006-02727
Microsoft Visual Basic 2013
Visual C# 2013 06177-004-0447006-02727
Microsoft Visual C# 2013
Visual C++ 2013 06177-004-0447006-02727
Microsoft Visual C++ 2013
Visual F# 2013 06177-004-0447006-02727
Microsoft Visual F# 2013
Visual Studio 2013 Code Analysis Spell Checker 06177-004-0447006-02727
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
ASP.NET and Web Tools 2013.1.41009
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure
ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.0.11213.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.0
Provides common services for use by Azure Mobile Services and Windows Azure Tools.
Intel(R) Visual Fortran Package ID: w_fcompxe_2013_sp1.1.139
Intel(R) Visual Fortran Composer XE 2013 SP1 Update 1 Integration for Microsoft Visual Studio* 2013, 14.0.0074.12, Copyright (C) 2002-2013 Intel Corporation
* Other names and brands may be claimed as the property of others.
JetBrains ReSharper C++ EAP C# Edition build 220.127.116.119 on 2014-02-24T15:32:20
JetBrains ReSharper C++ EAP package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2014 JetBrains, Inc.
NuGet Package Manager 2.8.50126.477
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 12.0.30919.1
Microsoft SQL Server Data Tools
Windows Azure Mobile Services Tools 1.0
Windows Azure Mobile Services Tools
Windows Azure Remote Debugging 1.0
Windows Azure Remote Debugging Community Technology Preview
Windows Azure Tools 2.2
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.2.11003.1601
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
Xamarin.Android 4.12.01000 (0deb0164)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS 1.10.39 (e0334707)
Visual Studio extension to enable development for Xamarin.iOS
More form case:
Hi I downgraded mono android and rebuilt. Going in back and forth between these fixes and breaks the linking.
Working: mono-android-4.10.02014.msi (Feb 4th)
Broken: mono-android-4.12.01000.msi (Feb 24th)
Frankly I feel this broke it https://bugzilla.xamarin.com/show_bug.cgi?id=13370
But that’s just my gut feel ☺
As posted on #18239, this is a workaround:
Step 1: Create a new file called System.ServiceModel.xml in the root of the
Step 2: Change the build action of that file to: "LinkDescription".
Step 3: Add the following to the contents of System.ServiceModel.xml
Step 4: Ensure Linker settings are set to Link SDK Assemblies only.
Will this workaround affect the Debug build too or Debug still should be set as NoLink?
You need that workaround whenever you do SDK linking, regardless of Debug/Release.
I am using WCF in PCL. Anything should be done in PCL or just in Android project? What about iOS? This is my next step. Should it work there without any changes?
This issue is basically only related to linking. Anywhere where linking is available (Android, iOS, Mac, ...) can potentially have this issue. PCL is largely unrelated.
The linker descriptor file should be put in the library where you're using WCF, if you have such a library. Otherwise, just the application project.
I am using WCF in PCL which is linked to Android and IOS project. Where should I put the file?
So, from what I discovered. You should put the file in Android project (PCL project doesn't have a build option for LinkDescription anyway).
I spoke too soon :-( It works in simulator but on real device I get an error
"No constructor found for System.ServiceModel.FaultException`1"
I am stuck. Should I roll back to version 10? Please reply ASAP. Thank you.
After rolling back to mono-android-4.10.02014 I get an error DataMember property 'System.StringMessage' on type 'System.ServiceModel.ExceptionDetail' must have both getter and setter.
I need to release a new version of my app and completely stack. Please advice what should I do ASAP.
(In reply to comment #13)
> I spoke too soon :-( It works in simulator but on real device I get an error
> "No constructor found for System.ServiceModel.FaultException`1"
> I am stuck. Should I roll back to version 10? Please reply ASAP. Thank you.
I would need a project that reproduces this issue in order to suggest a workaround. You can email me one at alexrp at xamarin dot com.
Hi Alex. It is funny. When I create a new project NullPointerException doesn't happen. I don't even need to add link xml file, it works without it. Unfortunately I cannot send you my full project which causing an error. Meantime I just specified in link to skip System.ServiceModel library and it works. Any ideas why new created project doesn't cause the problem?
I was able to reproduce the problem and sent to Alex the project with a screen shot. The workaround is to set linker to skip System.ServiceModel library. Then you don't need to include linker description file but it would be nice to get the fix.
Fixed in XA master.
Note that there may be other WCF/linking bugs lurking, so please open bugs if you run into any!
*** Bug 19411 has been marked as a duplicate of this bug. ***
I am working with Xamarin Forms for the first time and I come across the similar issue while building my Xamarin Forms project with WCF services for Android.
It works fine when I run my application in debug mode but it gives below error while I run it in release mode:
System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:paramsDictionary. The InnerException message was 'Error in line 1 position 333. 'EndElement' 'KeyValueOfstringstring' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Expecting element 'Key'.'. Please see InnerException for more details.
System.Object.__icall_wrapper_mono_delegate_end_invoke(object, intptr)(wrapper managed-to-native)
at (wrapper delegate-end-invoke) <Module>:end_invoke_object__this___object&_IAsyncResult (object&,System.IAsyncResult)
System.ServiceModel.MonoInternal.ClientRuntimeChannel.EndProcess(MethodBase method, string operationName, object parameters, IAsyncResult result)
System.ServiceModel.ClientBase<TChannel>.ChannelBase<T>.EndInvoke(string methodName, object args, IAsyncResult result)
System.Threading.Tasks.TaskFactory<TResult>.FromAsyncCoreLogic(IAsyncResult iar, Func<_,_> endFunction, Action<_> endAction, Task<_> promise, bool requiresSynchronization)
I have tried the solution provided by Alex for adding XML file and changing build action to Link Description but it doesn't seem to work for me.
Can you please guide me of how can I set linker to skip System.ServiceModel library or do I need to upgrade something in my Android project?
Let me know if you need any further information.
Thanks in advance.
Hi Ronak, I will answer directly to your email. This is not a forum :-)