gpt4 book ai didi

Mono32 不起作用,Mono64 会抛出错误

转载 作者:行者123 更新时间:2023-12-02 20:45:40 25 4
gpt4 key购买 nike

您好,我正在尝试让一个开源 Windows 程序在我的 Mac 上运行。

工具 https://github.com/Quandra/PokemonSunMoonRNGTool

我通过网站而不是brew.sh安装了mono,

这是日志:

WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all
Stacktrace:

at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Windows.Forms.XplatUICarbon.CGDisplayBounds (intptr) [0x00009] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
at System.Windows.Forms.XplatUICarbon.get_WorkingArea () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:2263
at System.Windows.Forms.XplatUICarbon.get_VirtualScreen () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUICarbon.cs:2257
at System.Windows.Forms.XplatUI.get_VirtualScreen () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUI.cs:420
at System.Windows.Forms.Screen..cctor () [0x00034] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Screen.cs:53
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001f] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0
at <unknown> <0xffffffff>
at System.Windows.Forms.Form.get_CreateParams () [0x00157] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:1368
at System.Windows.Forms.Control.CreateHandle () [0x0002a] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:4214
at System.Windows.Forms.Form.CreateHandle () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:1913
at System.Windows.Forms.Control.CreateControl () [0x00039] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:3529
at System.Windows.Forms.Control.SetVisibleCore (bool) [0x0003a] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:4770
at System.Windows.Forms.Form.SetVisibleCore (bool) [0x00065] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs:2380
at System.Windows.Forms.Control.set_Visible (bool) [0x00009] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs:3200
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.set_Visible (bool) [0x00033] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) [0x00053] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:795
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) [0x00011] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:696
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs:679
at PokemonSunMoonRNGTool.Program.Main () [0x0000e] in /Users/af/Downloads/PokemonSunMoonRNGTool-master/PokemonSunMoonRNGTool/Program.cs:16
at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0004d] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0

Native stacktrace:

0 mono 0x000000010382e061 mono_handle_native_crash + 257
1 mono 0x0000000103893ec6 altstack_handle_and_restore + 70
2 SkyLight 0x000000010f0097a1 SLDisplayBounds + 68
3 ??? 0x00000001150a6b2e 0x0 + 4647971630
4 ??? 0x000000010afe432f 0x0 + 4479402799
5 mono 0x0000000103784505 mono_jit_runtime_invoke + 2245
6 mono 0x0000000103985d48 do_runtime_invoke + 88
7 mono 0x0000000103981cdd mono_runtime_class_init_full + 1021
8 mono 0x000000010377defa mono_jit_compile_method_inner + 2442
9 mono 0x000000010378084a mono_jit_compile_method_with_opt + 714
10 mono 0x000000010383066f common_call_trampoline + 1199
11 mono 0x0000000103830189 mono_magic_trampoline + 73
12 ??? 0x000000010abc539e 0x0 + 4475081630
13 ??? 0x0000000111119205 0x0 + 4581331461
14 ??? 0x0000000110b1b4e7 0x0 + 4575048935
15 ??? 0x0000000110b1b1b0 0x0 + 4575048112

Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.gJkwLh'
Executing commands in '/tmp/mono-gdb-commands.gJkwLh'.
(lldb) process attach --pid 22301
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/libglib-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 22301 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00000001055c33ee libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
-> 0x1055c33ee <+10>: jae 0x1055c33f8 ; <+20>
0x1055c33f0 <+12>: movq %rax, %rdi
0x1055c33f3 <+15>: jmp 0x1055bbcd4 ; cerror
0x1055c33f8 <+20>: retq

Executable module set to "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono".
Architecture set to: x86_64-apple-macosx.
(lldb) thread list
Process 22301 stopped
* thread #1: tid = 0x213b1, 0x00000001055c33ee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
thread #2: tid = 0x213b2, 0x00000001055c2bf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
thread #3: tid = 0x213b3, 0x00000001055bb386 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
thread #4: tid = 0x213b4, 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
thread #5: tid = 0x213b5, 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
thread #6: tid = 0x213b8, 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) thread backtrace all
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00000001055c33ee libsystem_kernel.dylib`__wait4 + 10
frame #1: 0x000000010382e0ed mono`mono_handle_native_crash(signal="SIGSEGV", ctx=<unavailable>, info=<unavailable>) at mini-exceptions.c:2555 [opt]
frame #2: 0x0000000103893ec6 mono`altstack_handle_and_restore(ctx=0x00007fff5c48acf0, obj=0x0000000000000000, stack_ovf=0) at exceptions-amd64.c:795 [opt]
frame #3: 0x000000010f0097a1 SkyLight`SLDisplayBounds + 68
frame #4: 0x00000001150a6b2e
frame #5: 0x000000010afe432f
frame #6: 0x0000000103784505 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=0x0000000000000000, params=<unavailable>, error=<unavailable>) at mini-runtime.c:2549 [opt]
frame #7: 0x0000000103985d48 mono`do_runtime_invoke(method=0x00007f92e790f078, obj=0x0000000000000000, params=0x0000000000000000, exc=0x00007fff5c48b5c8, error=0x00007fff5c48b7c8) at object.c:2829 [opt]
frame #8: 0x0000000103981cdd mono`mono_runtime_class_init_full [inlined] mono_runtime_try_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=0x00007fff5c48b7c8) at object.c:2937 [opt]
frame #9: 0x0000000103981c9c mono`mono_runtime_class_init_full(vtable=0x00007f92e72a50d8, error=0x00007fff5c48b7c8) at object.c:471 [opt]
frame #10: 0x000000010377defa mono`mono_jit_compile_method_inner(method=<unavailable>, target_domain=<unavailable>, opt=<unavailable>, error=0x00007fff5c48b7c8) at mini.c:4365 [opt]
frame #11: 0x000000010378084a mono`mono_jit_compile_method_with_opt(method=<unavailable>, opt=<unavailable>, jit_only=0, error=<unavailable>) at mini-runtime.c:1889 [opt]
frame #12: 0x000000010383066f mono`common_call_trampoline(regs=0x00007fff5c48b8a8, code="H\x8b?H??\xa8H\x8b??8, m=<unavailable>, vt=0x0000000000000000, vtable_slot=0x0000000000000000, error=0x00007fff5c48b7c8) at mini-trampolines.c:704 [opt]
frame #13: 0x0000000103830189 mono`mono_magic_trampoline(regs=<unavailable>, code=<unavailable>, arg=<unavailable>, tramp=<unavailable>) at mini-trampolines.c:834 [opt]
frame #14: 0x000000010abc539e
frame #15: 0x0000000111119205
frame #16: 0x0000000110b1b4e7
frame #17: 0x0000000110b1b1b0

thread #2, name = 'SGen worker'
frame #0: 0x00000001055c2bf2 libsystem_kernel.dylib`__psynch_cvwait + 10
frame #1: 0x00000001057297fa libsystem_pthread.dylib`_pthread_cond_wait + 712
frame #2: 0x00000001039fcb55 mono`thread_func [inlined] mono_os_cond_wait(mutex=0x0000000103b52848) at mono-os-mutex.h:173 [opt]
frame #3: 0x00000001039fcb46 mono`thread_func(thread_data=0x0000000104989108) at sgen-thread-pool.c:130 [opt]
frame #4: 0x000000010572893b libsystem_pthread.dylib`_pthread_body + 180
frame #5: 0x0000000105728887 libsystem_pthread.dylib`_pthread_start + 286
frame #6: 0x000000010572808d libsystem_pthread.dylib`thread_start + 13

thread #3, name = 'Finalizer'
frame #0: 0x00000001055bb386 libsystem_kernel.dylib`semaphore_wait_trap + 10
frame #1: 0x000000010397e693 mono`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:91 [opt]
frame #2: 0x000000010397e688 mono`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-coop-semaphore.h:43 [opt]
frame #3: 0x000000010397e680 mono`finalizer_thread(unused=<unavailable>) at gc.c:866 [opt]
frame #4: 0x0000000103951a6b mono`start_wrapper [inlined] start_wrapper_internal at threads.c:829 [opt]
frame #5: 0x00000001039519d1 mono`start_wrapper(data=<unavailable>) at threads.c:891 [opt]
frame #6: 0x000000010572893b libsystem_pthread.dylib`_pthread_body + 180
frame #7: 0x0000000105728887 libsystem_pthread.dylib`_pthread_start + 286
frame #8: 0x000000010572808d libsystem_pthread.dylib`thread_start + 13

thread #4
frame #0: 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x0000000105728621 libsystem_pthread.dylib`_pthread_wqthread + 1426
frame #2: 0x000000010572807d libsystem_pthread.dylib`start_wqthread + 13

thread #5
frame #0: 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x0000000105728621 libsystem_pthread.dylib`_pthread_wqthread + 1426
frame #2: 0x000000010572807d libsystem_pthread.dylib`start_wqthread + 13

thread #6
frame #0: 0x00000001055c344e libsystem_kernel.dylib`__workq_kernreturn + 10
frame #1: 0x000000010572848e libsystem_pthread.dylib`_pthread_wqthread + 1023
frame #2: 0x000000010572807d libsystem_pthread.dylib`start_wqthread + 13
(lldb) detach

=================================================================
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.
=================================================================

我正在运行最新的 mac 操作系统,并从brew.sh 下载了大量的库

我是否可以将代码转换为不同的编译器,以便我可以使用它。提前致谢。

最佳答案

Carbon 未针对 64 位架构实现。您可以通过“arch”开关控制 Mono 的架构。尝试通过以下方式从终端运行您的应用程序:

mono --arch=32 your_app_name.exe

关于Mono32 不起作用,Mono64 会抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45776247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com