I try to run the sample ASP.NET5 MVC application from aspnet/Home sample. (kpm build runs without errors). When i try to run k kestrel i got the following error :
Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.dlopen (string,int) <0xffffffff>
at Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.LoadLibrary (string) <0x0001b>
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (string) <0x0002e>
at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (Microsoft.Framework.Runtime.ILibraryManager) <0x0038f>
at Kestrel.ServerFactory.Start (Microsoft.AspNet.Builder.IServerInformation,System.Func`2<object, System.Threading.Tasks.Task>) <0x0011f>
at Microsoft.AspNet.Hosting.HostingEngine.Start (Microsoft.AspNet.Hosting.HostingContext) <0x001d4>
at Microsoft.AspNet.Hosting.Program.Main (string[]) <0x00312>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost,string,string[]) <0x001eb>
at Microsoft.Framework.ApplicationHost.Program.Main (string[]) <0x0035b>
at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
at kre.host.Bootstrapper.Main (string[]) <0x002c3>
at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
at kre.hosting.RuntimeBootstrapper.ExecuteAsync (string[]) <0x0139f>
at kre.hosting.RuntimeBootstrapper.Execute (string[]) <0x0004b>
at EntryPoint.Main (string[]) <0x00143>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
mono(mono_handle_native_sigsegv+0xf3) [0x811b9b3]
mono(mono_arch_handle_altstack_exception+0xb4) [0x8167054]
mono(mono_sigsegv_signal_handler+0x107) [0x8096627]
[0xb779b40c]
/lib/ld-linux.so.2(+0xe9f6) [0xb77aa9f6]
/lib/ld-linux.so.2(+0x11ba8) [0xb77adba8]
/usr/lib/i386-linux-gnu/libdl.so(+0xc2b) [0xb4963c2b]
/lib/ld-linux.so.2(+0xdde6) [0xb77a9de6]
/usr/lib/i386-linux-gnu/libdl.so(+0x10bc) [0xb49640bc]
/usr/lib/i386-linux-gnu/libdl.so(dlopen+0x41) [0xb4963b61]
[0xb4987a0c]
[0xb4987994]
[0xb4987607]
[0xb4986f50]
[0xb4986918]
[0xb5272275]
[0xb562bc5b]
[0xb562b8ed]
mono() [0x8096101]
Debug info from gdb:
System is Debian 7.8 (x86)
libuv v1.0.0-rc2 installed and mono 4.1
I getting crazy on the try to get this running. I checked the permission for the libuv lib, the lib is readable by anyone.
I use the beta3 Version of aspnet5.
Has anybody an idea what goes wrong here? I am searching for an hint where to look for the Problem.
if you have mono 4.1, install dnvm instead of k. Mono 3.12 works with k, 4.1 with dnvm as far as i know
Related
I am getting the below exception from the Xam.Plugin.LatestVersion plugin on my xamarin forms app:
Plugin.LatestVersion.LatestVersionException: Error comparing current app version number with latest.
I found the same issue reported over here and here on GitHub. Also, the same issue is reported on the stack. I tried the solutions suggested on the above thread, but no luck.
I have updated my plugin version to the latest(2.1.0), but the same exception is showing. Any solution for this issue? The issue is only on the Android platform.
Update:
I have tried the 2.1.1-beta.107 version, now getting another exception.
Plugin.LatestVersion.LatestVersionException: Error parsing content from the Play Store. Url=play store url&hl=en. ---> Jurassic.JavaScriptException: TypeError: undefined cannot be converted to an object
at Jurassic.TypeConverter.ToObject (Jurassic.ScriptEngine engine, System.Object value, System.Int32 lineNumber, System.String sourcePath, System.String functionName) [0x00037] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[])
at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.anonymous(Jurassic.Compiler.ExecutionContext,object[])
at Jurassic.Library.UserDefinedFunction.CallLateBound (System.Object thisObject, System.Object[] argumentValues) [0x00014] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.Library.FunctionInstance.CallWithStackTrace (System.String path, System.String function, System.Int32 line, System.Object thisObject, System.Object[] argumentValues) [0x0000f] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at (wrapper dynamic-method) Jurassic.Compiler.MethodGenerator.eval(Jurassic.Compiler.ExecutionContext)
at Jurassic.Compiler.GlobalOrEvalMethodGenerator.Execute (Jurassic.ScriptEngine engine, Jurassic.Compiler.RuntimeScope parentScope, System.Object thisObject) [0x00030] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.ScriptEngine.Evaluate (Jurassic.ScriptSource source) [0x000a7] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Jurassic.ScriptEngine.Evaluate (System.String code) [0x00007] in <018e8bf6db3d46cd85eb0a9bc95f4b3f>:0
at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x001ff] in <7361502664264164a28b556feec777a7>:0
--- End of inner exception stack trace ---
at Plugin.LatestVersion.LatestVersionImplementation.GetLatestVersionNumber () [0x0023d] in <7361502664264164a28b556feec777a7>:0
I've gone through the example event-tracing projects located at https://github.com/microsoft/eventtracing-processing-samples and successfully built the projects. I'm running into missing dll's. For instance when running the CountProcesses example, I run into the following stack trace:
mono CountProcesses.exe test.etl
Unhandled Exception:
System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: msi.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Windows.EventTracing.NativeMethods.MsiGetSummaryInformationW(uint,string,uint,uint&)
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetRevisionNumber (System.String msiPath) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.GetOrCreateDefaultToolkitPath (System.IO.TextWriter output) [0x00054] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.ToolkitTraceProcessingEngine.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings, Microsoft.Windows.EventTracing.ITraceProcessorSettings& effectiveSettings) [0x000a8] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path, Microsoft.Windows.EventTracing.ITraceProcessorSettings settings) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Microsoft.Windows.EventTracing.TraceProcessor.Create (System.String path) [0x00000] in <bdfe3783769b4c6f90b3788d264e0262>:0
at Program.Run (System.String tracePath) [0x00001] in <2e2989aba7be4139841be131a5e978bb>:0
at Program.Main (System.String[] args) [0x00027] in <2e2989aba7be4139841be131a5e978bb>:0
Before digging too deeply into the missing libraries, is traceprocessing intended to be cross-platform? Or does it rely on platform dependent libs in Windows?
System Setup:
OS: macOS Catalina 10.15.4
Mono JIT compiler version 6.8.0.105 (2019-10/82fffe07497 Tue Feb 4 10:09:51 EST 2020)
.NET Core SDK (3.1.201)
(I am a developer at Microsoft who works on the TraceProcessor project.)
Currently, the library relies on some Windows-only components and cannot be run on a Mac.
We are using Entity Framework Core 2.2.4 together with an SQLite database targeting .NET Framework 4.7.2. Following Nuget packages were installed:
Microsoft.Data.Sqlite
Microsoft.EntityFrameworkCore.Sqlite
Microsoft.EntityFrameworkCore.Tools
On my development machine (Windows 10) everything works fine but when trying to run the application with Mono on our 32-bit Linux machine, the following exception occurs:
FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type
initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.DllNotFoundException: e_sqlite3
at (wrapper managed-to-native)
SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <61bb3ca1db9c41ea88f280f0b1600d58>:0
at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <3d4b21fb9c764efbb11f6e3b02efff52>:0
at SQLitePCL.Batteries_V2.Init () [0x00005] in <f5d9c86a14864b5d99b8bdece1b8292c>: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, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize () [0x0002f] in <b46e232ade014524baa458345f270c50>:0
at Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in <b46e232ade014524baa458345f270c50>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection () [0x00006] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1[T].get_Value () [0x00008] in <adf771f92e754fe1bb85c5850cd0c16b>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection () [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Exists () [0x0000c] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.Exists () [0x0000b] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate (System.String targetMigration) [0x00012] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate (Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade) [0x00010] in <69f795dffc844780bfcfff4ff8415a92>:0
at TestEfCorePlusSqlite.Program.Main (System.String[] args) [0x0000e] in <c4fad569c9a241ef887b5b2ddbc0225f>:0
Since the application is built with Any CPU configuration, x86 and x64 folders are created in bin/Debug, both containing an e_sqlite3.dll. I already tried to copy the x86 dll to bin/Debug but the error still occurred.
What I've tried so far:
installing Microsoft.EntityFrameworkCore.Sqlite.Core together with
SQLitePCLRaw.bundle_e_sqlite3 as suggested here
installing Microsoft.EntityFrameworkCore.Sqlite (or
Microsoft.Data.Sqlite or SQLitePCLRaw.bundle_green) as suggested here
different combinations of SQLitePCLRaw.* packages
What do I have to do to get EF Core and SQlite running on Mono?
After a refreshing weekend I took another glance at the problem. I found the official Mono documentation regarding DllNotFoundException and used MONO_LOG_LEVEL=debug mono YourApp.exe to find out which lib Mono is trying to load. It was /usr/lib/libe_sqlite3.so which was not available on my system. All I did was to copy the available /usr/lib/libsqlite3.so and rename it to libe_sqlite3.so. I'm not sure if this is the preferred way but my application works.
I have built a Xamarin forms app with PCL.
The application crashes sometimes for unknown reason : either while scrolling though any of the picker on some pages of the application or while resuming the app after some period of inactivity (may be after 10-15 mins).
I am using Crittercism to report crash logs. I am not getting any stack trace or crash log for this crashes.
Details
Xamarin Studio : 5.9.5(biuld 9)
Xamarin.iOS : Version: 8.10.4.46 (Enterprise Edition)
Xamarin.Android : Version: 5.1.5.3 (Enterprise Edition).
Note : When I was checking in debug mode with device connected : I got 2 kinds of crashes which says :
1.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/mono/external/referencesource/mscorlib/system/throwhelper.cs:70
at System.Collections.Generic.Dictionary`2[System.String,Xamarin.Forms.AnimationExtensions+Info].get_Item (System.String key) [0x00000] in :0
at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated (System.Object o, System.EventArgs args) [0x00012] in :0
at Xamarin.Forms.Tweener.b__0 (Int64 step) [0x00037] in :0
at Xamarin.Forms.Ticker.SendSignals (Int32 timestep) [0x00063] in :0
at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker.b__0 () [0x00000] in :0
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/Foundation/NSAction.cs:56
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/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:63
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Users/builder/data/lanes/1977/2c66d2fe/source/maccore/src/UIKit/UIApplication.cs:46
at eRedbook.iOS.Application.Main (System.String[] args) [0x00008] in /Users/s.chandraganesh/Documents/TFS_New/eRedbook/Development/Source/Mobile/iOS/Main.cs:39
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Please help me to narrow down this issue.
This should be fixed in Xamarin.Forms 1.5.1.6471. Which version are you running on? Upgrading may fix the issue.
Why can't I add None to a System.Collections.Generic.Dictionary of Option? Is it an expected behavior or a bug in Mono?
F# Interactive for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
For help type #help;;
> open System.Collections.Generic;;
> let d1 = new Dictionary<int option, int>();;
val d1 : Dictionary<int option,int> = dict []
> d1.Add(None, 1);;
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException (ExceptionArgument argument) in <filename unknown>:line 0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value, Boolean add) in <filename unknown>:line 0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value) in <filename unknown>:line 0
at <StartupCode$FSI_0004>.$FSI_0004.main# () in <filename unknown>:line 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) in <filename unknown>:line 0
Stopped due to error
> d1.Add(Some 10, 1);;
val it : unit = ()
I'm using Mono on OS X.
$ mono --version
Mono JIT compiler version 4.2.0 (Stable 4.2.0.179/a224653 Tue Oct 6 11:28:25 PDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Its not a bug. Option<'T> uses the attribute [CompilationRepresentation(CompilationRepresentationFlags.UseNullAsTrueValue) which causes None to be represented as null.
So you actually are adding a null as a key to a Dictionary which as you know is not allowed.
For reference:
UseNullAsTrueValue:
Permit the use of null as a representation for nullary discriminators in a discriminated union.
More information here Why is None represented as null?