Building Unity from Batch file using Node.js - node.js

I have my the command working when i type it into a regular command prompt. But when i run the command from a batch file using Node.js (child_process) i get a error. I compared the the log files and I got this error.
ArgumentException: Key duplication when adding: PATH
at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00137] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs:831
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs:474
at System.Collections.Specialized.ProcessStringDictionary.Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at System.Diagnostics.ProcessStartInfo.get_EnvironmentVariables () [0x00000] in <filename unknown>:0
at UnityEditor.WebGL.Emscripten.EmccArguments.SetEnvironmentVariable (System.Diagnostics.ProcessStartInfo startInfo, System.String environmentVariable, System.String value) [0x0001f] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Emscripten/EmccArguments.cs:32
at UnityEditor.WebGL.Emscripten.EmccArguments.SetupDefaultEmscriptenEnvironment (System.Diagnostics.ProcessStartInfo startInfo) [0x00011] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Emscripten/EmccArguments.cs:14
at UnityEditor.WebGL.Il2Cpp.WebGLIl2CppNativeCodeBuilder.SetupEnvironment (System.Diagnostics.ProcessStartInfo startInfo) [0x00002] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/Il2Cpp/WebGLIL2CppNativeCodeBuilder.cs:102
at UnityEditorInternal.Il2CppNativeCodeBuilder.SetupStartInfo (System.Diagnostics.ProcessStartInfo startInfo) [0x0000e] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\Il2CppNativeCodeBuilder.cs:109
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) [0x00034] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:64
at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) [0x0008b] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:380
at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) [0x002dc] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:361
at UnityEditorInternal.IL2CPPBuilder.Run () [0x00099] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:178
at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:42
at UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (BuildPostProcessArgs args) [0x000fb] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:367
at UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x002de] in /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:936
at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00003] in C:\buildslave\unity\build\Editor\Mono\Modules\DefaultBuildPostprocessor.cs:27
at UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x000d9] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:287
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:359)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:254)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:237)
LGDBuildScript:BuildWebProject() (at Assets\Editor\LGDBuildScript.cs:16)
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections/Hashtable.cs Line: 831)
I have read all of the child_process documentation and Unity Command Line Arguments documentation and i still can't figure it out.
I'm hoping to have the Unity.exe build my game from my Node.js app.

Related

ServiceStack.LicenseException with a valid License Key

I am trying to register the license key by the Application_Start method. When I execute Licensing.RegisterLicense("{LicenseKey}"), the method LicenseUtils.ActivatedLicenseFeatures() returns the value "Text". But when I execute new AppHost().Init(), it gives me the following error:
Application Exception
ServiceStack.LicenseException
The free-quota limit on '10 ServiceStack Operations' has been reached. Please see https://servicestack.net to upgrade to a commercial license or visit https://github.com/ServiceStackV3/ServiceStackV3 to revert back to the free ServiceStack v3.
Description: HTTP 500. Error processing request.
Details: Non-web exception. Exception origin (name of application or object): ServiceStack.Text.
Exception stack trace:
at ServiceStack.LicenseUtils.ApprovedUsage (LicenseFeature licenseFeature, LicenseFeature requestedFeature, Int32 allowedUsage, Int32 actualUsage, System.String message) [0x00026] in <filename unknown>:0
at ServiceStack.LicenseUtils.AssertValidUsage (LicenseFeature feature, QuotaType quotaType, Int32 count) [0x00118] in <filename unknown>:0
at ServiceStack.Host.ServiceMetadata.Add (System.Type serviceType, System.Type requestType, System.Type responseType) [0x002c9] in <filename unknown>:0
at ServiceStack.Host.ServiceController.RegisterService (ITypeFactory serviceFactoryFn, System.Type serviceType) [0x00137] in <filename unknown>:0
at ServiceStack.Host.ServiceController.Register (ITypeFactory serviceFactoryFn) [0x0001a] in <filename unknown>:0
at ServiceStack.Host.ServiceController.Init () [0x00016] in <filename unknown>:0
at ServiceStack.ServiceStackHost.Init () [0x00073] in <filename unknown>:0
at API.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00016] in API/Global.asax.cs:163
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-mac-4.2.0-branch-c6sr1/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
Version Information: 4.2.2 (explicit/996df3c Wed Jan 20 00:19:48 EST 2016); ASP.NET Version: 4.0.30319.17020
Powered by Mono
I already tried to update the ServiceStack package, with no success.
This is because you're using a ServiceStack.Text License which only covers usage for the ServiceStack.Text NuGet Package with packages from the full ServiceStack framework.

Running SignalR self-host samples throws exception with latest mono dev branch

Using Mono on Linux, the sample Microsoft.AspNet.SignalR.Mono found at https://github.com/SignalR/SignalR seems to work using the stable release of mono but not with the latest development branch (3.99). Anyone encounter this? I get the following exception:
Unhandled Exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.InvalidProgramException: Invalid IL code
in (wrapper delegate-invoke)
<Module>:invoke_callvirt_CancellationTokenRegistration_CancellationToken&_Action`1<object>_object
(System.Threading.CancellationToken&,System.Action`1<object>,object): IL_004f:
castclass 0x00000007
at
Microsoft.AspNet.SignalR.Infrastructure.CancellationTokenExtensions.SafeRegister
(CancellationToken cancellationToken, System.Action`1 callback, System.Object
state) [0x00000] in <filename unknown>:0
at
Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeResolverDispose
(IDependencyResolver resolver, CancellationToken hostShutdownToken) [0x00000]
in <filename unknown>:0
at
Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeHost
(IDependencyResolver resolver, System.String instanceName, CancellationToken
hostShutdownToken) [0x00000] in <filename unknown>:0
at Owin.OwinExtensions.UseSignalRMiddleware[PersistentConnectionMiddleware]
(IAppBuilder builder, System.Object[] args) [0x00000] in <filename unknown>:0
at Owin.OwinExtensions.RunSignalR (IAppBuilder builder, System.Type
connectionType, Microsoft.AspNet.SignalR.ConnectionConfiguration configuration)
[0x00000] in <filename unknown>:0
at Owin.OwinExtensions.RunSignalR[RawConnection] (IAppBuilder builder,
Microsoft.AspNet.SignalR.ConnectionConfiguration configuration) [0x00000] in
<filename unknown>:0
at Owin.OwinExtensions.RunSignalR[RawConnection] (IAppBuilder builder)
[0x00000] in <filename unknown>:0
at Microsoft.AspNet.SelfHost.Samples.Startup.<Configuration>b__0 (IAppBuilder
map) [0x00000] in <filename unknown>:0
at Owin.MapExtensions.Map (IAppBuilder app, PathString pathMatch,
System.Action`1 configuration) [0x00000] in <filename unknown>:0
at Owin.MapExtensions.Map (IAppBuilder app, System.String pathMatch,
System.Action`1 configuration) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.SelfHost.Samples.Startup.Configuration (IAppBuilder app)
[0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000] in <filename unknown>:0
at Owin.Loader.DefaultLoader+<>c__DisplayClass12.<MakeDelegate>b__b
(IAppBuilder builder) [0x00000] in <filename unknown>:0
at Owin.Loader.DefaultLoader+<>c__DisplayClass1.<LoadImplementation>b__0
(IAppBuilder builder) [0x00000] in <filename unknown>:0
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveApp
(Microsoft.Owin.Hosting.Engine.StartContext context) [0x00000] in <filename
unknown>:0
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start
(Microsoft.Owin.Hosting.Engine.StartContext context) [0x00000] in <filename
unknown>:0
at Microsoft.Owin.Hosting.Starter.DirectHostingStarter.Start
(Microsoft.Owin.Hosting.StartOptions options) [0x00000] in <filename unknown>:0
at Microsoft.Owin.Hosting.Starter.HostingStarter.Start
(Microsoft.Owin.Hosting.StartOptions options) [0x00000] in <filename unknown>:0
at Microsoft.Owin.Hosting.WebApp.StartImplementation (IServiceProvider
services, Microsoft.Owin.Hosting.StartOptions options) [0x00000] in <filename
unknown>:0
at Microsoft.Owin.Hosting.WebApp.Start (Microsoft.Owin.Hosting.StartOptions
options) [0x00000] in <filename unknown>:0
at Microsoft.Owin.Hosting.WebApp.Start[Startup]
(Microsoft.Owin.Hosting.StartOptions options) [0x00000] in <filename unknown>:0
at Microsoft.Owin.Hosting.WebApp.Start[Startup] (System.String url) [0x00000]
in <filename unknown>:0
at Microsoft.AspNet.SelfHost.Samples.Program.Main (System.String[] args)
[0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.InvalidProgramException: Invalid IL code in (wrapper delegate-invoke)
<Module>:invoke_callvirt_CancellationTokenRegistration_CancellationToken&_Action`1<object>_object
(System.Threading.CancellationToken&,System.Action`1<object>,object): IL_004f:
castclass 0x00000007
This looks like a bug in later versions of Mono. I reported this on Friday: http://bugzilla.xamarin.com/show_bug.cgi?id=29665
That issue is already reported on SignalIR repo. Try pulling the latest version of the dev branch, ASP.NET team have commented out the code throwing that exception as a workaround for now.
What I eventually went with was to return the fallback register in ResolveRegisterDelegate() if IsRunningMono is true:
if (MonoUtility.IsRunningMono)
return fallback;
try
{
methodInfo = typeof(CancellationToken).GetMethod("InternalRegisterWithoutEC",
BindingFlags.NonPublic | BindingFlags.Instance,
binder: null,
types: new[] { typeof(Action<object>), typeof(object) },
modifiers: null);
}
catch
{
// Swallow this exception. Being extra paranoid, we don't want anything to break in case this dirty
// reflection hack fails for any reason
}
I noticed that this was happening in the earlier stable release of mono because the GetMethod("InternalRegisterWithoutEC") was returning null and did NOT return null with the latest dev branch of mono.

PostFileWithRequest error since using Monodroid PCL

I'm having a problem with using the Monodroid PCL libraries. All calls are working except this one:
client.PostFileWithRequest<DtoResponse>("createimage", ms, fileName, new Dto{ Id = id});
The error is as follows:
Object reference not set to an instance of an object at ServiceStack.Pcl.StringEqualityComparer.GetHashCode (System.String obj) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[System.String,System.Object].get_Item (System.String key) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.NameObjectCollectionBase.FindFirstMatchedItem (System.String name) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.NameObjectCollectionBase.BaseGet (System.String name) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.NameValueCollection.Add (System.String name, System.String value) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.HttpUtility.ParseQueryString (System.String query, System.Text.Encoding encoding, ServiceStack.Pcl.NameValueCollection result) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.HttpUtility.ParseQueryString (System.String query, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
at ServiceStack.Pcl.HttpUtility.ParseQueryString (System.String query) [0x00000] in <filename unknown>:0
at ServiceStack.AndroidPclExportClient.ParseQueryString (System.String query) [0x00000] in <filename unknown>:0
at ServiceStack.ServiceClientBase+<>c__DisplayClass1b`1[Lodestone.Pcl.Infrastucture.Responses.ChildImage.ChildImageResponse].<PostFileWithRequest>b__18 () [0x00000] in <filename unknown>:0
at ServiceStack.ServiceClientBase.PostFileWithRequest[ChildImageResponse] (System.String relativeOrAbsoluteUrl, System.IO.Stream fileToUpload, System.String fileName, System.Object request, System.String fieldName) [0x00000] in <filename unknown>:0 "
We didn't have this problem prior to this. We were using the 3.9.71 monodroid compiled dlls.They were not PCL. This has only stated with the v4 PCL versions.Has anyone encountered this before and how did you solve it?
A fix for this issue has been deployed to MyGet:
https://github.com/ServiceStack/ServiceStack/wiki/MyGet
Available in the next v4.0.16+ release on NuGet.

System.ArgumentNullException: missing source event info in MvxWeakEventSubscription

We are using data binding in our Xamarin.IOS project using MvvmCross(Hot Tuna version) as specified in the sample app “N-39-CrossLight-Touch”.
The sample app as well as our project works fine on simulator(IOS7) but on device(IOS7) it throws the below exception while binding.
System.ArgumentNullException: missing source event info in
MvxWeakEventSubscription Parameter name: sourceEventInfo at
Cirrious.CrossCore.WeakSubscription.MvxWeakEventSubscription2[System.ComponentModel.INotifyPropertyChanged,System.ComponentModel.PropertyChangedEventArgs]..ctor
(INotifyPropertyChanged source, System.Reflection.EventInfo
sourceEventInfo, System.EventHandler1 targetEventHandler) [0x00000] in
:0 at
Cirrious.CrossCore.WeakSubscription.MvxNotifyPropertyChangedEventSubscription..ctor
(INotifyPropertyChanged source, System.EventHandler1
targetEventHandler) [0x00000] in :0 at
Cirrious.CrossCore.WeakSubscription.MvxWeakSubscriptionExtensionMethods.WeakSubscribe
(INotifyPropertyChanged source, System.EventHandler1 eventHandler)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.MvxPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxLeafPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Leaf.MvxSimpleLeafPropertyInfoSourceBinding..ctor
(System.Object source, System.Reflection.PropertyInfo propertyInfo)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxPropertySourceBindingFactoryExtension.CreateLeafBinding
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
propertyToken) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxPropertySourceBindingFactoryExtension.TryCreateBinding
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
currentToken, System.Collections.Generic.List1 remainingTokens,
IMvxSourceBinding& result) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.TryCreateBindingFromExtensions
(System.Object source,
Cirrious.MvvmCross.Binding.Parse.PropertyPath.PropertyTokens.MvxPropertyToken
propertyToken, System.Collections.Generic.List1 remainingTokens,
IMvxSourceBinding& result) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.CreateBinding
(System.Object source, IList1 tokens) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.Source.Construction.MvxSourceBindingFactory.CreateBinding
(System.Object source, System.String combinedPropertyName) [0x00000]
in :0 at
Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxPathSourceStep.OnDataContextChanged
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.SourceSteps.MvxSourceStep.set_DataContext
(System.Object value) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.CreateSourceBinding
(System.Object source) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding..ctor
(Cirrious.MvvmCross.Binding.MvxBindingRequest bindingRequest)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder.BindSingle
(Cirrious.MvvmCross.Binding.MvxBindingRequest bindingRequest)
[0x00000] in :0 at
Cirrious.MvvmCross.Binding.Binders.MvxFromTextBinder+<>c_DisplayClass1.b_0
(Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription
description) [0x00000] in :0 at
System.Linq.Enumerable+c__Iterator102[Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription,Cirrious.MvvmCross.Binding.Bindings.IMvxUpdateableBinding].MoveNext
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBindings
(IMvxBindingContextOwner view, IEnumerable1 bindings, System.Object
clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBindings
(IMvxBindingContextOwner view, System.Object target, IEnumerable1
bindingDescriptions, System.Object clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBindingContextOwnerExtensions.AddBinding
(IMvxBindingContextOwner view, System.Object target,
Cirrious.MvvmCross.Binding.Bindings.MvxBindingDescription
bindingDescription, System.Object clearKey) [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxBaseFluentBindingDescription1[MonoTouch.UIKit.UITextField].Apply
() [0x00000] in :0 at
Cirrious.MvvmCross.Binding.BindingContext.MvxFluentBindingDescriptionSet2[CrossLightTouch.MyViewController,CrossLightTouch.ViewModels.MyViewModel].Apply
() [0x00000] in :0 at CrossLightTouch.MyViewController.ViewDidLoad ()
[0x0024f] in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/MyViewController.cs:81
at at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr) at
MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00008] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIWindow.g.cs:129
at CrossLightTouch.AppDelegate.FinishedLaunching
(MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary
options) [0x00042] in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/AppDelegate.cs:25
at at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain
(int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main
(System.String[] args, System.String principalClassName, System.String
delegateClassName) [0x0004c] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIApplication.cs:38
at CrossLightTouch.Application.Main (System.String[] args) [0x00008]
in
/Users/admin/Downloads/N-39-CrossLight-Touch/CrossLightTouch/Main.cs:17
By setting the IOS build options -> Link Behavior -> Don’t link , it works on device as expected, but the binary size has been doubled.
You can reproduce this issue with “N-39-CrossLight-Touch” sample.
Is there a fix or alternative for this?
If you don't already have a LinkerPleaseInclude file, copy the one from here into your project:
https://github.com/MvvmCross/MvvmCross/blob/6ab1baa9ca128921208efa994890039edf398474/TestProjects/Android-Support/Fragments/Example.Droid/LinkerPleaseInclude.cs
Also, add the following line to the Include(TextView text) method:
text.AfterTextChanged += (sender, args) => text.Text = "" + text.Text;
If that doesn't solve it, look for other events that may be used in the Mvx bindings and add those to the LinkerPleaseInclude file.
This issue is caused by the dynamic nature of Mvx binding on Android. Because the bindings are resolved at runtime, the Xamarin linker thinks the UI events they reference are not being used so they are removed from the final build. Adding references in the LinkerPleaseInclude file forces them to be included.

EMGU library OPENCV problem with native memroy management - does really work with mono?

we are working in a project involving the use of EMGU and in particoular the SVM functions of OpenCV and we have a problem using Mono on a Ubuntu platform and we don't have this problem on windows. The problem appears when we call the Emgu.CV.ML.SVM.Train method. All the parameters are correct and we canno't debug the wrapped code...
We have tried to increase the Shared Memory and other tricks but it doesn't work.
Do you have any idea?
Thank you
Angelo
Unhandled Exception: Emgu.CV.CvException: OpenCV: requested size is negative or too big
at Emgu.CV.CvInvoke.CvErrorHandler (Int32 status, System.String funcName, System.String errMsg, System.String fileName, Int32 line, IntPtr userData) [0x00000]
at (wrapper native-to-managed) Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)
at (wrapper managed-to-native) Emgu.CV.ML.MlInvoke:CvSVMTrain (intptr,intptr,intptr,intptr,intptr,Emgu.CV.ML.Structure.MCvSVMParams)
at Emgu.CV.ML.SVM.Train (Emgu.CV.Matrix`1 trainData, Emgu.CV.Matrix`1 responses, Emgu.CV.Matrix`1 varIdx, Emgu.CV.Matrix`1 sampleIdx, Emgu.CV.ML.SVMParams parameters) [0x00000]
at Segmentation.ImageFeatures.LeafHog.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.ImageSegmentators.Composite.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.ImageSegmentators.CompositionMlpRprop.TrainModel (IDictionary`2 dicInOutImage) [0x00000]
at Segmentation.GeneticConfig.ChromoCreator.GetASegmentation (IConfigChromosome configChromosome, IDictionary`2 dicInOutImageTrain) [0x00000]
at Segmentation.GeneticConfig.ConfigChromoProvider.AddChromosomeIfNew (IConfigChromosome chromo) [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome.Generate () [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome..ctor (Int32 chromoLength, IConfigChromoProvider cProvider) [0x00000]
at Segmentation.GeneticConfig.ConfigChromosome.CreateNew () [0x00000]
at AForge.Genetic.Population..ctor (Int32 size, IChromosome ancestor, IFitnessFunction fitnessFunction, ISelectionMethod selectionMethod) [0x00000]
at SegmentationCLI.Program.Main (System.String[] args) [0x00000]

Resources