0
我想在Linux上的Mono上運行一個C#應用程序。我使用EF6,它有一些映射到枚舉的類型。在此基礎上的第一次我的應用程序查詢DB(VistaDB的)我得到以下堆棧跟蹤(其實際上要大得多......)SIGSEGV在System.MonoEnumInfo.get_enum_info
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.MonoEnumInfo.get_enum_info (System.Type,System.MonoEnumInfo&) <IL 0x0000e, 0xffffffff>
at System.MonoEnumInfo.GetInfo (System.Type,System.MonoEnumInfo&) [0x00076] in /build/buildd/mono-3.2.8+dfsg/mcs/class/corlib/System/Enum.cs:176
at System.Enum.GetNames (System.Type) [0x0002d] in /build/buildd/mono-3.2.8+dfsg/mcs/class/corlib/System/Enum.cs:334
at System.Data.Entity.Core.Metadata.Edm.EnumType..ctor (System.Type) <IL 0x00056, 0x001eb>
at System.Data.Entity.Core.Metadata.Edm.ClrEnumType..ctor (System.Type,string,string) <IL 0x00002, 0x00027>
at System.Data.Entity.Core.Metadata.Edm.OSpaceTypeFactory.TryCreateEnumType (System.Type,System.Data.Entity.Core.Metadata.Edm.EnumType,System.Data.Entity.Core.Metadata.Edm.EdmType&) <IL 0x00027, 0x0009f>
at System.Data.Entity.Core.Metadata.Edm.OSpaceTypeFactory.TryCreateType (System.Type,System.Data.Entity.Core.Metadata.Edm.EdmType) <IL 0x0003b, 0x000eb>
at System.Data.Entity.Core.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() <IL 0x0006c, 0x0010c>
at System.Data.Entity.Core.Metadata.Edm.ObjectItemAssemblyLoader.Load() <IL 0x00007, 0x0001f>
at System.Data.Entity.Core.Metadata.Edm.ObjectItemAssemblyLoader.LoadAssemblies (System.Collections.Generic.IEnumerable`1<System.Reflection.Assembly>,System.Data.Entity.Core.Metadata.Edm.ObjectItemLoadingSessionData) <IL 0x00019, 0x00072>
at System.Data.Entity.Core.Metadata.Edm.ObjectItemAssemblyLoader.LoadClosureAssemblies() <IL 0x00011, 0x00023>
at System.Data.Entity.Core.Metadata.Edm.ObjectItemAssemblyLoader.Load() <IL 0x00013, 0x00031>
...
Native stacktrace:
mono() [0x4b73d8]
mono() [0x50f13b]
mono() [0x423d22]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7fd7577c0340]
mono(mono_class_from_mono_type+0x6) [0x525736]
mono() [0x5428a4]
[0x41d0d6f3]
...
=================================================================
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.
=================================================================
我懷疑是單聲道的問題。我使用Mono 3.2.8運行Ubuntu 14(使用apt-get安裝)。有沒有其他人遇到過這個問題?如果我從EF中移除枚舉映射,那麼這會解決問題嗎?
更新
我試圖運行上運行的單聲道3.4我的MacBook一樣的,我得到了同樣的錯誤。所以我懷疑這是Mono的一個錯誤。