.NETFramework,Version=v4.5.1
(net451)を使用してWebApiアプリケーションをLinux上で実行しようとしています。私がyeomanを使ってWebApiプロジェクトを作成すると、基本的な例がうまく動作します。しかし、.NETFramework 4.5.1を使用している私の大きなプロジェクトは、実際の実行で失敗します。.NETFrameworkでMonoが失敗するドットネット4.5.1
私が使用しているMonoのバージョンは、OSXとLinux(Ubuntu Server 14.04 LTS)の両方で4.2.3です。私は次に不安定なチャンネルに行くことを試みるかもしれませんが、私はこれを引き起こすように思われるSystem.Diagnostics
の依存関係を失うことができる何らかの方法があることを望んでいます。(私はそのパッケージを直接持っていませんが) 。
以前使用していたdnx451を使用しても、この問題は発生しません。私は新しい道具に切り換えようとしてきました。それが私が最初にこの道を歩いた理由です。
$ dotnet run
Project MyProject.Models (.NETFramework,Version=v4.5.1) was previously compiled. Skipping compilation.
Project MyProject.Api (.NETFramework,Version=v4.5.1) was previously compiled. Skipping compilation.
Stacktrace:
* Assertion at metadata.c:1017, condition `idx >= 0' not met
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Diagnostics.StackTrace.get_trace (System.Exception,int,bool) <IL 0x0000f, 0xffffffff>
at System.Diagnostics.StackTrace..ctor (System.Exception,int,bool) [0x0002e] in /private/tmp/mono20160330-58397-jmwbb9/mono-4.2.3/mcs/class/corlib/System.Diagnostics/StackTrace.cs:129
at System.Exception.get_StackTrace() [0x0001f] in /private/tmp/mono20160330-58397-jmwbb9/mono-4.2.3/mcs/class/corlib/System/Exception.cs:202
at System.Exception.ToString() [0x0007f] in /private/tmp/mono20160330-58397-jmwbb9/mono-4.2.3/mcs/class/corlib/System/Exception.cs:276
at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00058, 0xffffffff>
Native stacktrace:
0 mono 0x0000000103463975 mono_handle_native_sigsegv + 271
1 libsystem_platform.dylib 0x00007fff8cc2552a _sigtramp + 26
2 ??? 0x0000000000000003 0x0 + 3
3 libsystem_c.dylib 0x00007fff915ac6e7 abort + 129
4 mono 0x00000001035c79be monoeg_g_log + 0
5 mono 0x00000001035c7943 monoeg_g_logv + 83
6 mono 0x00000001035c7ae8 monoeg_assertion_message + 143
7 mono 0x0000000103509ab6 mono_metadata_decode_row + 233
8 mono 0x00000001034d881d get_docinfo + 61
9 mono 0x00000001034d832a mono_ppdb_lookup_location + 155
10 mono 0x000000010352047e mono_debug_lookup_source_location + 130
11 mono 0x00000001034611a1 ves_icall_get_trace + 482
12 ??? 0x00000001077f30e5 0x0 + 4420743397
13 mono 0x00000001033d68ca mono_jit_runtime_invoke + 1463
14 mono 0x0000000103553c97 mono_runtime_invoke + 110
15 mono 0x0000000103558e63 mono_print_unhandled_exception + 176
16 mono 0x0000000103462be3 mono_handle_exception_internal + 3312
17 mono 0x0000000103461eef mono_handle_exception + 24
18 mono 0x00000001034b1267 mono_amd64_throw_exception + 113
19 ??? 0x0000000103987607 0x0 + 4355290631
20 ??? 0x0000000103be8f33 0x0 + 4357787443
21 mono 0x00000001033d68ca mono_jit_runtime_invoke + 1463
22 mono 0x0000000103553c97 mono_runtime_invoke + 110
23 mono 0x0000000103558915 mono_runtime_exec_main + 379
24 mono 0x0000000103439800 mono_main + 6785
25 libdyld.dylib 0x00007fff98ec15ad start + 1
Debug info from gdb:
(lldb) command source -s 0 '/tmp/mono-gdb-commands.6WMaVv'
Executing commands in '/tmp/mono-gdb-commands.6WMaVv'.
(lldb) process attach --pid 24146
Process 24146 stopped
* thread #1: tid = 0x45e53, 0x00007fff8ba79582 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00007fff8ba79582 libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
-> 0x7fff8ba79582 <+10>: jae 0x7fff8ba7958c ; <+20>
0x7fff8ba79584 <+12>: movq %rax, %rdi
0x7fff8ba79587 <+15>: jmp 0x7fff8ba737f2 ; cerror
0x7fff8ba7958c <+20>: retq
Executable module set to "/usr/local/bin/mono".
Architecture set to: x86_64h-apple-macosx.
(lldb) thread list
Process 24146 stopped
* thread #1: tid = 0x45e53, 0x00007fff8ba79582 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x45e55, 0x00007fff8ba78db6 libsystem_kernel.dylib`__psynch_cvwait + 10
thread #3: tid = 0x45e56, 0x00007fff8ba72fae libsystem_kernel.dylib`semaphore_wait_trap + 10
thread #4: tid = 0x45e57, 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
thread #5: tid = 0x45e58, 0x00007fff8ba79efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
thread #6: tid = 0x45e59, 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) thread backtrace all
* thread #1: tid = 0x45e53, 0x00007fff8ba79582 libsystem_kernel.dylib`__wait4 + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fff8ba79582 libsystem_kernel.dylib`__wait4 + 10
frame #1: 0x0000000103463a0b mono`mono_handle_native_sigsegv + 421
frame #2: 0x00007fff8cc2552a libsystem_platform.dylib`_sigtramp + 26
frame #3: 0x00007fff8ba78f07 libsystem_kernel.dylib`__pthread_kill + 11
frame #4: 0x00007fff93e784ec libsystem_pthread.dylib`pthread_kill + 90
frame #5: 0x00007fff915ac6e7 libsystem_c.dylib`abort + 129
frame #6: 0x00000001035c79be mono`monoeg_log_default_handler + 105
frame #7: 0x00000001035c7943 mono`monoeg_g_logv + 83
frame #8: 0x00000001035c7ae8 mono`monoeg_assertion_message + 143
frame #9: 0x0000000103509ab6 mono`mono_metadata_decode_row + 233
frame #10: 0x00000001034d881d mono`get_docinfo + 61
frame #11: 0x00000001034d832a mono`mono_ppdb_lookup_location + 155
frame #12: 0x000000010352047e mono`mono_debug_lookup_source_location + 130
frame #13: 0x00000001034611a1 mono`ves_icall_get_trace + 482
frame #14: 0x00000001077f30e5
frame #15: 0x00000001033d68ca mono`mono_jit_runtime_invoke + 1463
frame #16: 0x0000000103553c97 mono`mono_runtime_invoke + 110
frame #17: 0x0000000103558e63 mono`mono_print_unhandled_exception + 176
frame #18: 0x0000000103462be3 mono`mono_handle_exception_internal + 3312
frame #19: 0x0000000103461eef mono`mono_handle_exception + 24
frame #20: 0x00000001034b1267 mono`mono_amd64_throw_exception + 113
frame #21: 0x0000000103987607
frame #22: 0x0000000103be8f33
frame #23: 0x00000001033d68ca mono`mono_jit_runtime_invoke + 1463
frame #24: 0x0000000103553c97 mono`mono_runtime_invoke + 110
frame #25: 0x0000000103558915 mono`mono_runtime_exec_main + 379
frame #26: 0x0000000103439800 mono`mono_main + 6785
frame #27: 0x00007fff98ec15ad libdyld.dylib`start + 1
frame #28: 0x00007fff98ec15ad libdyld.dylib`start + 1
thread #2: tid = 0x45e55, 0x00007fff8ba78db6 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #0: 0x00007fff8ba78db6 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x00007fff93e76728 libsystem_pthread.dylib`_pthread_cond_wait + 767
frame #2: 0x000000010359e811 mono`thread_func + 273
frame #3: 0x00007fff93e7599d libsystem_pthread.dylib`_pthread_body + 131
frame #4: 0x00007fff93e7591a libsystem_pthread.dylib`_pthread_start + 168
frame #5: 0x00007fff93e73351 libsystem_pthread.dylib`thread_start + 13
thread #3: tid = 0x45e56, 0x00007fff8ba72fae libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #0: 0x00007fff8ba72fae libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x00000001035bb3dc mono`mono_sem_wait + 29
frame #2: 0x0000000103551fa4 mono`finalizer_thread + 124
frame #3: 0x0000000103533ed1 mono`start_wrapper + 410
frame #4: 0x00000001035c1bf9 mono`inner_start_thread + 197
frame #5: 0x00007fff93e7599d libsystem_pthread.dylib`_pthread_body + 131
frame #6: 0x00007fff93e7591a libsystem_pthread.dylib`_pthread_start + 168
frame #7: 0x00007fff93e73351 libsystem_pthread.dylib`thread_start + 13
thread #4: tid = 0x45e57, 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x00007fff93e75578 libsystem_pthread.dylib`_pthread_wqthread + 1283
frame #2: 0x00007fff93e73341 libsystem_pthread.dylib`start_wqthread + 13
thread #5: tid = 0x45e58, 0x00007fff8ba79efa libsystem_kernel.dylib`kevent_qos + 10, queue = 'com.apple.libdispatch-manager'
frame #0: 0x00007fff8ba79efa libsystem_kernel.dylib`kevent_qos + 10
frame #1: 0x00007fff8cace165 libdispatch.dylib`_dispatch_mgr_invoke + 216
frame #2: 0x00007fff8cacddcd libdispatch.dylib`_dispatch_mgr_thread + 52
thread #6: tid = 0x45e59, 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #0: 0x00007fff8ba795e2 libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x00007fff93e75578 libsystem_pthread.dylib`_pthread_wqthread + 1283
frame #2: 0x00007fff93e73341 libsystem_pthread.dylib`start_wqthread + 13
(lldb) detach
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Process 24146 detached
(lldb) quit
が含まれているために起こるバグレポートでは、その例外がどこか別の場所で表示され、何か(ロガーは?)その例外でToStringメソッドを呼び出したとき - この新しい例外が発生します。このエラーは、.NETでコンパイルされたdllの_debug_バージョンをmonoにデプロイしたときに表示されました。デバッグバージョンも実行しますか?はいの場合は、リリースモードでコンパイルして再試行してください。 – Evk
メタデータのアサーション:1017、条件 'idx> = 0'が満たされていません。ほとんど常にモノのバグです。http://bugzilla.xamarin.com/ – knocte
に適切に報告してください。4.5にダウングレードしてください。 –