Getting runtime exception while generating build on El-capitan - ios

I have an mac application by which i am generating ipa and apk builds.This application was running fine without any exceptions when it was on yosemite OS.Now when upgraded to El-Capitan it is giving some unhandled exceptions.I am using xbuild command to generate the build for both android and ios.I am using nstask to execute the commands.Here is the code i am using to generate build.
NSTask *task=[[NSTask alloc]init];
task.launchPath=#"/library/Frameworks/Mono.Framework/Commands/xbuild";
task.arguments= #[#"/p:Configuration=AppStore",#"/p:Platform=iPhone",#"/p:BuildIpa=true",#"/target:Build",[NSString stringWithFormat:#"%#/xyz/xyz.sln",NSHomeDirectory() ]];
[task launch];
[task waitUntilExit];
Here is the exceptions i am getting
Unhandled Exception:
Nested exception detected.
Original Exception: at (wrapper managed-to-native)
object.__icall_wrapper_mono_object_new_fast (intptr) <0x0004f>at Mono.XBuild.CommandLine.MainClass.Main (string[]) <0x00013>
Nested exception:at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool) <0x0006b>
at System.RuntimeType.ToString () <0x0002d>
at System.Exception.get_ClassName () <0x0002a>
at System.Exception.ToString () <0x0001f>
[ERROR] FATAL UNHANDLED EXCEPTION: Nested exception detected.
Original Exception: at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x0004f>at Mono.XBuild.CommandLine.MainClass.Main (string[]) <0x00013>
Nested exception:at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool) <0x0006b>
at System.RuntimeType.ToString () <0x0002d>
at System.Exception.get_ClassName () <0x0002a>
at System.Exception.ToString () <0x0001f>
This is coming only when i upgraded to El-capitan OS.Previously on Yosemite this code was running fine.
I have already disabled the System Integrity Protection but inspite of that the problem is not going.I don't know where this exception is coming from.
Note:When i generate the build through command line tool then it works fine without any exception means exception is coming only when i try to generate the build using code.Thanks

Related

Visual Studio Xamarin Android System.Net.WebException: Error: ConnectFailure (Network is unreachable)

my Android app created in Xamarin has problem with internet connection, below is error code.
Time Device Name Type PID Tag Message
10-09 05:04:52.256 Genymotion Samsung Galaxy S7 - 6.0.0 - API 23 - 1440x2560 Error 1453 AndroidRuntime android.runtime.JavaProxyThrowable: System.Net.WebException: Error: ConnectFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000b6] in <6c708cf596db438ebfc6b7e012659eee>:0
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0016d] in <6c708cf596db438ebfc6b7e012659eee>:0
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x000a7] in <3f9824dbe67544e1805773e0a3dbdf6b>:0
at GWAWE.localhost.Service1.Get_Data () [0x00001] in <1baad81b40d64c6886bf076df034661f>:0
at (wrapper remoting-invoke-with-check) GWAWE.localhost.Service1:Get_Data ()
at gwawe.MainActivity.BuildLayout () [0x00031] in <1baad81b40d64c6886bf076df034661f>:0
at gwawe.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x0004e] in <1baad81b40d64c6886bf076df034661f>:0
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <9663139ab15947a89e15a6bcd9621f68>:0
at (wrapper dynamic-method) System.Object:e6ea694d-cf84-4098-a161-481a5ad1d4ae (intptr,intptr,intptr)
at md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity.n_onCreate(Native Method)
at md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity.onCreate(MainActivity.java:29)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Force finishing activity GWAWE.gwawe/md5a9dcb246785c0066d52ff25b77e1a72d.MainActivity
I'm using Visual Studio 2017 with Xamarin and Genymotion. Visual Studio, Xamarin and Genymotion are up to date. App is created only for Android 6.0.
In android manifest I added android.permission.RECEIVE_BOOT_COMPLETED.
I'm using "Wi-Fi" on emulator.
Application have to autostart after device boot up and error show only when I reboot emulator. If I run application manually everything works fine.
The application connects to IIS web service.
Does anybody have a clue what is going on here?
Well from what i understand either the internet permission isn't granted in your Android application or you do not have an internet connection, in case you don't have the permission all you have to do is add this line in your manifest.
<uses-permission android:name="android.permission.INTERNET" />

mvvmcross 5.0 Fatal signal 11 (SIGSEGV)

After updating mvvmcross to version 5.0.1 application crashes during start with exception
No native Android stacktrace (see debuggerd output).
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
Fatal signal 11 (SIGSEGV), code 2, fault addr 0xc5c3ff70 in tid 9451 (Thread-5)
No any stacktrace or error message appeared
What changed on this framework version?

Trying to run MVC 3 website plus EntityFramework with Mono gives MissingMethodException

I built an ASP.NET MVC 3 web application on Windows 7 using Visual Studio 2012. My application builds and runs without any issues in Visual Studio. I want to edit and run that web application using Xamarin Studio 4.0 with Mono 3.0.4 on OS X 10.8.2. Here is what I've tried so far:
Opened my .sln in Xamarin Studio.
Deleted references to System.Data.Entity and System.Web.Entity.
Copied System.Web.Helpers (version 1.0.0.0), System.Web.Mvc (version 3.0.0.0), and System.Web.WebPages (version 1.0.0.0) .dlls to bin folder.
Removed old references to System.Web.Helpers, System.Web.Mvc, and System.Web.Webpages.
Replaced "using System.Data.*" with "using System.Data.Entity.Core.*" in my *.Designer.cs files.
Deleted reference to EntityFramework (version 4.x).
Deleted EntityFramework.dll and EntityFramework.xml from my bin folder.
Added a reference to /Library/Frameworks/Mono.framework/Libraries/mono/4.5/EntityFramework.dll (version 6.0.0.0).
Click run.
After I click run, I get the following exception:
Exception rethrown at [0]:
---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Web.Configuration.HostingEnvironmentSection ---> System.MissingMethodException: Method not found: 'System.Configuration.ConfigurationProperty..ctor'.
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000b9] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/corlib/System.Reflection/MonoMethod.cs:524
--- End of inner exception stack trace ---
at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x002fb] in /Users/duncan/git/mono/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.4/_build/mono-3.0.4.git/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs:244
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x0003a] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer/VPathToHost.cs:150
at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00775] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer.XSP/main.cs:486
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00025] in /Users/builder/data/lanes/mono-mac-ui-refresh-master/3108f76b/source/bockbuild/profiles/mono-mac-release/build-root/xsp-2.11/_build/mono-xsp-d3e2f80/src/Mono.WebServer.XSP/main.cs:264
I've Googled the exception, but I haven't found a solution. Am I missing a reference? Is there a working example project anywhere that uses MVC 3 or 4 and Entity Framework 4 or 6 that runs under Mono?

Catching wcf-exceptions on iPhone with MonoTouch

i've been running into problems with exceptions thrown on the server and catching them on the client (iPhone).
The interface of the service has a method declared with the
[FaultContract(typeof(SecurityException))]
In the method I throw a SecurityException. On the phone I get the following error:
{System.Net.WebException: Error getting response stream (ReadDone1): ReceiveFailure
---> System.IO.IOException: EndRead failure
---> System.Net.Sockets.SocketException: Connection reset by peer
at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x0002d] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1979
at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x0002f] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:338 --- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult ar) [0x0003d] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/NetworkStream.cs:340
at System.Net.WebConnection.ReadDone (IAsyncResult result) [0x0002a] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnection.cs:429 --- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x0005e] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:852
at System.ServiceModel.Channels.HttpRequestChannel.GotResponse (IAsyncResult result) [0x0001f] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:218 }
Now I browsed through the questions about this, and it seems that this bug was reported already and fixed in a version of monotouch. I am using the latest (6.0.4) version of monotouch, but still experience the error.
Any ideas what I may be doing wrong?

Emgu CV for Android throwing Exception Java.Lang.UnsatisfiedLinkError

I am using Mono for Android and followed the instructions mentioned on this page: http://file.emgu.com/wiki/index.php/Emgu_CV_for_Android but when I run the application on the emulator, it throws the following exception:
Java.Lang.UnsatisfiedLinkError has been thrown Cannot load library:
find_library[1199]: 37 'libopencv_highgui.so' failed to load
previously
Java.Lang.UnsatisfiedLinkError: Cannot load library:
find_library[1199]: 37 'libopencv_highgui.so' failed to load
previously at Android.Runtime.JNIEnv.CallStaticVoidMethod (IntPtr
jclass, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00023] in
/Users/builder/data/lanes/monodroid-mac-monodroid-4.2.4-branch/9f7cbd60/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:973
at Java.Lang.JavaSystem.LoadLibrary (System.String libName)
[0x00034] in
/Users/builder/data/lanes/monodroid-mac-monodroid-4.2.4-branch/9f7cbd60/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Java.Lang.JavaSystem.cs:253
at Emgu.CV.CvInvoke..cctor () [0x00000] in :0
--- End of managed exception stack trace ---
java.lang.UnsatisfiedLinkError: Cannot load library:
find_library[1199]: 37 'libopencv_highgui.so' failed to load
previously
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at
mono.android.view.View_OnClickListenerImplementor.n_onClick(Native
Method)
at
mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
at android.view.View.performClick(View.java:3511)
at android.view.View$PerformClick.run(View.java:14105)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Here is a screenshot of OpenCV-2.4.2 reference

Resources