I've got a Xamarin Forms project using EF Core 2.2.4 with SQLite. In a number of different places in my code I get a transient error (maybe 1% of the time?) that seems like an EF Core bug, but I can't say for sure.
One sample of code where I get this is:
var context = new DatabaseContext();
var dbItem = await context.MobileErrors.FirstOrDefaultAsync(me => me.Id.Equals(item.Id)).ConfigureAwait(false);
DatabaseContext inherits from DbContext. The exception also happens with ToListAsync() and other EF calls. The exception is:
System.InvalidProgramException: Invalid IL code in (wrapper
dynamic-method) object:lambda_method
(System.Runtime.CompilerServices.Closure): method body is empty.
at (wrapper managed-to-native)
System.Delegate.CreateDelegate_internal(System.Type,object,System.Reflection.MethodInfo,bool)
at System.Delegate.CreateDelegate (System.Type type, System.Object
firstArgument, System.Reflection.MethodInfo method, System.Boolean
throwOnBindFailure, System.Boolean allowClosed) [0x002f0] in
<58604b4522f748968296166e317b04b4>:0 at
System.Delegate.CreateDelegate (System.Type type, System.Object
firstArgument, System.Reflection.MethodInfo method) [0x00000] in
<58604b4522f748968296166e317b04b4>:0 at
System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type
delegateType, System.Object target) [0x0001a] in
<58604b4522f748968296166e317b04b4>:0 at (wrapper dynamic-method)
System.Object.lambda_method(System.Runtime.CompilerServices.Closure,Microsoft.EntityFrameworkCore.Query.QueryContext)
at
Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteSingletonAsyncQuery[TResult]
(Microsoft.EntityFrameworkCore.Query.QueryContext queryContext,
System.Func2[T,TResult] compiledQuery,
Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger1[TLoggerCategory]
logger, System.Type contextType) [0x000d6] in
:0 at
Mobile.Services.MobileErrorsService.UpdateLocalAsync
(Mobile.Data.Models.DatabaseContext context,
Mobile.Data.Models.MobileError item) [0x00133] in
:0 at
Mobile.Services.MobileErrorsService+<>c__DisplayClass8_0.b__0 ()
[0x00115] in :0
Any ideas of changes I could try to resolve this issue? Thanks!
Related
Sometimes an exception is thrown from inside the Xamarin.Forms external library and it would be extremely helpful to view the pertinent local variables in the debugger as we would in our own code.
Here is the stacktrace of my current Android iOS project headache:
System.InvalidCastException: Specified cast is not valid.
at Xamarin.Forms.BindableLayoutController.CreateItemView (System.Object item, Xamarin.Forms.DataTemplate dataTemplate) [0x00003] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:261
at Xamarin.Forms.BindableLayoutController.CreateItemView (System.Object item, Xamarin.Forms.Layout`1[T] layout) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:254
at Xamarin.Forms.BindableLayoutController.CreateChildren () [0x00040] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:234
at Xamarin.Forms.BindableLayoutController.SetItemTemplate (Xamarin.Forms.DataTemplate itemTemplate) [0x0005a] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:180
at Xamarin.Forms.BindableLayoutController.set_ItemTemplate (Xamarin.Forms.DataTemplate value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:127
at Xamarin.Forms.BindableLayout+<>c.<.cctor>b__19_1 (Xamarin.Forms.BindableObject b, System.Object o, System.Object n) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:16
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:463
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:311
at Xamarin.Forms.BindableLayout.SetItemTemplate (Xamarin.Forms.BindableObject b, Xamarin.Forms.DataTemplate value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableLayout.cs:45
at SecretProjectName.Views.YourAmazingClassPage..ctor () [0x0005b] in C:\Users\UserName\source\repos\SecretProjectName\SecretProjectName\SecretProjectName\Views\YourAmazingClassPage.xaml.cs:20
at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:936
Is there any other way to do this than forking Xamarin.Forms source code into my project?
DLLs are always compiled, thus you can't step in. They don't contain your (or someone elses) code in its source, it is modified by the process of compilation.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
What I'm trying to do is convert a JSON file into arrays that I can utilize later on in the C# script but for some reason, I can't get it to work. Either the JSON lib doesn't want to load or when I do get it to load I get these errors, no matter how simple the JSON file is.
The worst part is that I've got this to work in another script but for some reason, it refuses to work here. I've gone through the old one trying to figure out what I'm missing but I can't find it.
So instead of trying to just read a simple JSON file I'll give you the full thing I need to do and hopefully someone can help me out in here.
Code:
public List<string> PostalCodes = new List<string>();
public Client()
{
try
{
string postals = LoadResourceFile(GetCurrentResourceName(), "new-postals.json");
Debug.WriteLine(postals); // Outputs properly, actually can see the stuff
dynamic array = JsonConvert.DeserializeObject(postals); //Newtonsoft.Json
Debug.WriteLine(array[0]); // Not working at all.
}
catch (Exception e)
{
Debug.WriteLine($"^3[DEBUG] ^0Error info: {e.Message.ToString()}\r\n\r\n");
throw;
}
}
JSON File:
[
{
"x":2325.4345703125,
"y":5147.21484375,
"code":"2000"
},
{
"x":2151.2138671875,
"y":5166.0888671875,
"code":"2001"
},
// And so on.
]
If you wonder what LoadResourceFile it's loading and reading the file for me in one line of code.
Edit:
First, let me start by apologizing. As I'm still new to this I didn't include the whole error message as the rest that was given to me didn't look like it was useful.
[DEBUG] ^0Error info: The type initializer for 'Newtonsoft.Json.Serialization.DefaultSerializationBinder' threw an exception.
MainThrd/ Failed to instantiate instance of script Client: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Newtonsoft.Json.Serialization.DefaultSerializationBinder' threw an exception. ---> System.MethodAccessException: Error verifying Newtonsoft.Json.Serialization.DefaultSerializationBinder:.ctor (): Method System.Runtime.Serialization.SerializationBinder:.ctor () is not accessible at 0x0001
MainThrd/ at Newtonsoft.Json.Serialization.DefaultSerializationBinder..cctor () [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ --- End of inner exception stack trace ---
MainThrd/ at Newtonsoft.Json.JsonSerializer.Create () [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonSerializer.Create (Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonSerializer.CreateDefault () [0x00011] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonSerializer.CreateDefault (Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0000b] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in <836484b0267d488c8d30f28b57efebd9>:0
MainThrd/ at Client..ctor () [0x00071] in <7b9b05cb23034b40bf8a5d2ade61e392>:0
MainThrd/ at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
MainThrd/ at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ --- End of inner exception stack trace ---
MainThrd/ at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at System.Activator.CreateInstance (System.Type type) [0x00000] in <74fbbe963b7e417b8d715b858c5c584f>:0
MainThrd/ at CitizenFX.Core.InternalManager.CreateAssemblyInternal (System.String assemblyFile, System.Byte[] assemblyData, System.Byte[] symbolData) [0x000b1] in C:\gl\builds\edf06b9b\0\cfx\fivem\code\client\clrcore\InternalManager.cs:134
I did, however, get it to work with the answer below and changing the project reference. I did try the code first but it didn't resolve anything, I read a bit more about the problem and I decided to change the project reference after and just gave it a test run. It works perfectly now. Thank you all so much for all the help. Greatly appreciated!
Project Reference (CSPROJ)
// FROM
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
// TO
<PackageReference Include="Newtonsoft.Json" Version="12.0.0" ExcludeAssets="Compile" GeneratePathProperty="true" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll</HintPath>
</Reference>
Welcome to C#!
My first suggestion would be to avoid dynamic unless you have a good use case for it. In this scenario, I'd create a class to match your data
public class Data
{
public double X { get; set; }
public double Y { get; set; }
public string Code { get; set; }
}
Then use the generic version of DeserializeObject to type your deserialization, such as
var array = JsonConvert.DeserializeObject<List<Data>>(postals);
I have had this weird problem with my Xamarin Forms app. It seems to crash on startup. I have tried changing the Android Linker settings but regardless of the settings it still seems to crash. It used to work on Debug mode but not working anymore. I have tried deleting the bin and obj files. I have tried deleting and updating the NuGet packages. Any help would be appreciated. I have checked in the "Main Activity" method for any missing constructors but there doesn't seem to be any missing.
Here is the stack trace below:
[ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Could not activate JNI Handle 0xbfe1bd38 (key_handle 0xfcb6ecf) of Java type 'md5a4d2fdb8e3028a798e3d0ab6628e2c4b/MainActivity' as managed type 'TeaTotal.Droid.MainActivity'. ---> System.TypeInitializationException: The type initializer for 'TeaTotal.Droid.MainActivity' threw an exception. ---> System.MissingMethodException: Default constructor not found for type Microsoft.WindowsAzure.MobileServices.CurrentPlatform
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00085] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:171
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0001a] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0002a] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/rttype.cs:5638
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00040] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Microsoft.WindowsAzure.MobileServices.Platform.get_Instance () [0x00054] in <77043900ca604149b85ba57dba9fe35b>:0
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient.GetApplicationInstallationId () [0x00004] in <77043900ca604149b85ba57dba9fe35b>:0
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..ctor (System.Uri applicationUri, System.String applicationKey, System.Net.Http.HttpMessageHandler[] handlers) [0x00028] in <77043900ca604149b85ba57dba9fe35b>:0
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..ctor (System.Uri applicationUri, System.String applicationKey) [0x00000] in <77043900ca604149b85ba57dba9fe35b>:0
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..ctor (System.Uri applicationUri) [0x00000] in <77043900ca604149b85ba57dba9fe35b>:0
at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..ctor (System.String applicationUrl) [0x00007] in <77043900ca604149b85ba57dba9fe35b>:0
at TeaTotal.Droid.MainActivity..cctor () [0x00000] in C:\TT\Droid\MainActivity.cs:31
I have problems creating own control: I'm trying to make grid view similar to list view. The problem is in xaml file of the page - when I'm initializing my component app crashes on that page with file not found exception.
Error says: System.IO.FileNotFoundException Could not load file or assembly 'FastFood' or one of its dependencies. The system cannot
find the file specified.
Callstack:
_at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity)
[0x00081] in
/Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System/AppDomain.cs:706
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in
/Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System/AppDomain.cs:674
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in
/Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/Assembly.cs:551
at Xamarin.Forms.Xaml.XamlParser.GetElementType (Xamarin.Forms.Xaml.XmlType xmlType, IXmlLineInfo xmlInfo,
System.Reflection.Assembly currentAssembly,
Xamarin.Forms.Xaml.XamlParseException& exception) [0x00133] in :0
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, INode parentNode) [0x0002a] in
:0
at Xamarin.Forms.Xaml.ElementNode.Accept (IXamlNodeVisitor visitor, INode parentNode) [0x000b1] in :0
at Xamarin.Forms.Xaml.ElementNode.Accept (IXamlNodeVisitor visitor, INode parentNode) [0x00089] in :0
at Xamarin.Forms.Xaml.RootNode.Accept (IXamlNodeVisitor visitor, INode parentNode) [0x00064] in :0
at Xamarin.Forms.Xaml.XamlLoader.Load (Xamarin.Forms.BindableObject view, System.String xaml) [0x000a4] in
:0
at Xamarin.Forms.Xaml.XamlLoader.Load (Xamarin.Forms.BindableObject view, System.Type callingType) [0x0002e]
in :0
at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[CategoryPage] (FastFood.CategoryPage view, System.Type callingType) [0x00000] in :0
at FastFood.CategoryPage.InitializeComponent () [0x0000c] in /Users/Slider/Coffetab/iOS/obj/iPhoneSimulator/Debug/FastFood.iOS..Users.Slider.Coffetab.FastFood.CategoryPage.xaml.g.cs:33
at FastFood.CategoryPage..ctor () [0x0001a] in /Users/Slider/Coffetab/FastFood/CategoryPage.xaml.cs:25
at FastFood.MenuPage..ctor () [0x0004b] in /Users/Slider/Coffetab/FastFood/MenuPage.xaml.cs:14
at FastFood.MainPage.OnLogin (System.Object sender, System.EventArgs e) [0x0002f] in
/Users/Slider/Coffetab/FastFood/MainPage.xaml.cs:29
at Xamarin.Forms.Button.Xamarin.Forms.IButtonController.SendClicked ()
[0x00020] in :0
at Xamarin.Forms.Platform.iOS.ButtonRenderer.OnButtonTouchUpInside (System.Object sender, System.EventArgs eventArgs) [0x0000e] in :0
at UIKit.UIControlEventProxy.Activated () [0x00007] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIControl.cs:37
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in
/Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in
/Users/builder/data/lanes/2320/1f068b49/source/maccore/src/UIKit/UIApplication.cs:61
at FastFood.iOS.Application.Main (System.String[] args) [0x0001a] in /Users/Slider/Coffetab/iOS/Main.cs:23_
What I'm doing wrong?
Years later (for you) but I found a solution on a forum.
I've encountered this some other times with other components and NuGet
packages. You'll probably have to live with the fact that you have to
include a dummy line of code which instantiates the ExtendedSlider. It
doesn't have to do anything, just reference it somewhere.
When you're using it in just XAML the compiler doesn't detect the
reference and thus excludes the needed dll. Until the creator of the
component finds some fix for this you'll have to use this workaround.
Source: https://forums.xamarin.com/discussion/comment/187222/#Comment_187222
So just add a random var foo = new YourComponentFromTheAssemblyInQuestion(); anywhere in your code and it shouldn't complain anymore.
Maybe this will help others stumbling upon the same issue later on like I did.
I am creating a net.tcp based WCF service to control one of our backend applications. During development and testing on a Windows machine everything worked as expected.
However when I tried to run the very same application using Mono on either the same Windows box (Mono 2.10.6) or on Debian Squeeze (with Mono 2.10.5), I suddenly get a TypeLoadException in the ChannelFactory.
In the end it comes down to just this call that fails:
controlHost = ChannelFactory<IControlServiceContract>.CreateChannel(
new NetTcpBinding(SecurityMode.None),
new EndpointAddress(endpointAddress)
);
With this definition for IControlServiceContract in another assembly:
[ServiceContract]
public interface IControlServiceContract
{
[OperationContract(IsOneWay = true)]
void Ping ();
[OperationContract(IsOneWay = true)]
void Shutdown ();
[OperationContract]
int GetCommandCount ();
}
Which runs fine when started directly (i.e. using .NET).
When executed using mono --debug --runtime=v4.0 though it crashes with this super sweet stack trace:
! Ein Fehler ist beim Erzeugen des Kanals auf net.tcp://localhost:34684/watchdog/watchdog.ctrl/ aufgetreten
A type load exception has occurred.
at System.Linq.Enumerable.Union[Object] (IEnumerable`1 first, IEnumerable`1 second, IEqualityComparer`1 comparer) [0x00014] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.Core\System.Linq\Enumerable.cs:2948
at System.Linq.Enumerable.Union[Object] (IEnumerable`1 first, IEnumerable`1 second) [0x00007] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.Core\System.Linq\Enumerable.cs:2938
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 C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\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) [0x00131] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel.Description\ContractDescriptionGenerator.cs:240
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContractInternal (System.Type givenContractType, System.Type givenServiceType, System.TypeserviceTypeForCallback) [0x00296] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\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 C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel.Description\ContractDescriptionGenerator.cs:136
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel.Description\ContractDescriptionGenerator.cs:131
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type contractType) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel.Description\ContractDescriptionGenerator.cs:101
at System.ServiceModel.Description.ContractDescription.GetContract (System.Type contractType) [0x00017] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel.Description\ContractDescription.cs:66
at System.ServiceModel.ChannelFactory`1[com.derixx.dll.controlservicehost.ServiceBase.IControlServiceContract].CreateDescription () [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel\ChannelFactory_1.cs:185
at System.ServiceModel.ChannelFactory`1[com.derixx.dll.controlservicehost.ServiceBase.IControlServiceContract]..ctor (System.Type type) [0x00033] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel\ChannelFactory_1.cs:56
at System.ServiceModel.ChannelFactory`1[com.derixx.dll.controlservicehost.ServiceBase.IControlServiceContract]..ctor (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory`1[com.derixx.dll.controlservicehost.ServiceBase.IControlServiceContract].CreateChannel (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress address) [0x00000] in C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.6\mcs\class\System.ServiceModel\System.ServiceModel\ChannelFactory_1.cs:130
at applicationframework.ControlApplicationBase.ConnectionCreate (IControlServiceContract& controlHost, System.String endpointHost, Int32 endpointPort, System.String endpointPath) [0x00000] in <filename unknown>:0
All assemblies used int his project are either our own ones targeted at Framework 4.0, core assemblies and log4net 1.2.10/2.0.50727.
Does anyone have a clue what this could be and where I should start digging?
Well, if it works on .NET and not Mono it's definitely a bug.
I would go ahead and first thing submit it in http://bugzilla.xamarin.com/
Then maybe hangout in irc://irc.gnome.org/mono , and poke Atsushi Enomoto (nick "eno") which is the maintainer of WCF, to see what he thinks.