javicabanas
javicabanas

Reputation: 527

Suave "Hello World!" program doesn't work with visual studio for Mac

I got runtime errors trying to execute the "Hello World!" program from Suave web page:

open Suave.Web open Suave.Successful

[<EntryPoint>]
let main argv =
    startWebServer defaultConfig (OK "Hello, Suave!")
    0

With this errors:

Loaded assembly: /Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/bin/Debug/SuaveRestApi.exe Loaded assembly: /Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/bin/Debug/FSharp.Core.dll [External] Loaded assembly: /Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/bin/Debug/Suave.dll [External] Loaded assembly: /Library/Frameworks/Mono.framework/Versions/5.18.0/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll [External] Loaded assembly: /Library/Frameworks/Mono.framework/Versions/5.18.0/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll [External] Method idx 6984 is greater than number of rows (6984) in PPDB MethodDebugInformation table, for method .$YoLo:.cctor in '/Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/bin/Debug/Suave.pdb'. Likely a malformed PDB file. Stacktrace:

at <0xffffffff> at (wrapper managed-to-native) object.__icall_wrapper_mono_generic_class_init (intptr) [0x00007] in <699ddfd029d348d1a69fb1f9fc28d7cb>:0 at YoLo/UTF8.get_utf8 () [0x00000] in /Users/ademar/Projects/release/suave/src/Suave/Utils/YoLo.fs:447 at Suave.Successful.OK (string) [0x00000] in /Users/ademar/Projects/release/suave/src/Suave/Combinators.fs:136 at App.main (string[]) [0x00000] in /Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/App.fs:6 at (wrapper runtime-invoke) .runtime_invoke_int_object (object,intptr,intptr,intptr) [0x00057] in <5c0abea33afd9276a7450383a3be0a5c>:0 Memory around native instruction pointer (0x7fff71ccc23e): 0x7fff71ccc22e ff ff c3 90 90 90 b8 48 01 00 02 49 89 ca 0f 05 .......H...I.... 0x7fff71ccc23e 73 08 48 89 c7 e9 6f a1 ff ff c3 55 48 89 e5 41 s.H...o....UH..A 0x7fff71ccc24e 57 41 56 41 55 41 54 53 48 81 ec 88 00 00 00 49 WAVAUATSH......I 0x7fff71ccc25e 89 f4 48 8d 05 01 c3 cb 32 48 8b 00 48 8d 9d 60 ..H.....2H..H..`

Native stacktrace:

0 mono 0x000000010ba29842 mono_dump_native_crash_info + 898 1 mono
0x000000010b9cd303 mono_handle_native_crash + 195 2
libsystem_platform.dylib 0x00007fff71d77b3d _sigtramp + 29 3 mono 0x000000010bcdf008 simple_lower_case_mapping_higharea_table0 + 20296 4
libsystem_c.dylib 0x00007fff71c351c9 abort + 127 5 mono 0x000000010bbf9c5f mono_log_write_logfile + 351 6 mono
0x000000010bc15dac monoeg_g_log + 204 7 mono
0x000000010bac9e68 mono_ppdb_get_seq_points + 1112 8 mono
0x000000010b93492f mono_method_to_ir + 1151 9 mono
0x000000010b91ade7 mini_method_compile + 3479 10 mono
0x000000010b91e32c mono_jit_compile_method_inner + 76 11 mono
0x000000010b921cc9 mono_jit_compile_method_with_opt + 2665 12 mono
0x000000010b925d8e mono_jit_runtime_invoke + 526 13 mono
0x000000010bb241d4 do_runtime_invoke + 84 14 mono
0x000000010bb201a8 mono_runtime_class_init_full + 872 15 mono
0x000000010b97a69c mono_generic_class_init + 28 16 ???
0x000000010beb7e2c 0x0 + 4494949932 17 mono
0x000000010b9261d3 mono_jit_runtime_invoke + 1619 18 mono
0x000000010bb241d4 do_runtime_invoke + 84 19 mono
0x000000010bb27cac do_exec_main_checked + 156 20 mono
0x000000010b98d19d mono_jit_exec + 349 21 mono
0x000000010b99037f mono_main + 11615 22 mono
0x000000010b915078 main + 264 23 libdyld.dylib
0x00007fff71b8ced9 start + 1 Pkilling 0x70000ed57000 from 0x1115795c0 Pkilling 0x70000eb54000 from 0x1115795c0 Entering thread summarizer pause from 0x1115795c0 Finished thread summarizer pause from 0x1115795c0.

Waiting for dumping threads to resume

Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.UoI26p' Executing commands in '/tmp/mono-gdb-commands.UoI26p'. (lldb) process attach --pid 1457 Process 1457 stopped * thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP frame #0: 0x00007fff71ccb2d2 libsystem_kernel.dylib__wait4 + 10 libsystem_kernel.dylib__wait4: -> 0x7fff71ccb2d2 <+10>: jae 0x7fff71ccb2dc ; <+20> 0x7fff71ccb2d4 <+12>: movq %rax, %rdi 0x7fff71ccb2d7 <+15>: jmp 0x7fff71cc6381 ; cerror 0x7fff71ccb2dc <+20>: retq Target 0: (mono) stopped.

Executable module set to "/Library/Frameworks/Mono.framework/Versions/5.18.0/bin/mono". Architecture set to: x86_64h-apple-macosx. (lldb) thread list Process 1457 stopped * thread #1: tid = 0xd6f5, 0x00007fff71ccb2d2 libsystem_kernel.dylib__wait4 + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP thread #2: tid = 0xd6f6, 0x00007fff71cc97de libsystem_kernel.dylib__psynch_cvwait + 10, name = 'SGen worker' thread #3: tid = 0xd6f8, 0x00007fff71cc61b6 libsystem_kernel.dylibsemaphore_wait_trap + 10, name = 'Finalizer'
thread #4: tid = 0xd6f9, 0x00007fff71cc93e6 libsystem_kernel.dylib
__recvfrom + 10, name = 'Debugger agent'
thread #5: tid = 0xd700, 0x00007fff71cc7b6a libsystem_kernel.dylib__workq_kernreturn + 10 thread #6: tid = 0xd701, 0x00007fff71cc7b6a 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: 0x00007fff71ccb2d2 libsystem_kernel.dylib__wait4 + 10 frame #1: 0x000000010ba299b6 monomono_dump_native_crash_info at mini-posix.c:1079 [opt] frame #2: 0x000000010ba29862 monomono_dump_native_crash_info(signal="SIGABRT", ctx=0x00007ffee42eb0f0, info=<unavailable>) at mini-posix.c:1102 [opt] frame #3: 0x000000010b9cd303 monomono_handle_native_crash(signal="SIGABRT", ctx=0x00007ffee42eb0f0, info=0x00007ffee42eb088) at mini-exceptions.c:3197 [opt] frame #4: 0x00007fff71d77b3d libsystem_platform.dylib_sigtramp + 29 frame #5: 0x00007fff71ccc23f libsystem_kernel.dylib__pthread_kill + 11 frame #6: 0x00007fff71d82c1c libsystem_pthread.dylibpthread_kill + 285 frame #7: 0x00007fff71c351c9 libsystem_c.dylibabort + 127 frame #8: 0x000000010bbf9c5f monomono_log_write_logfile(log_domain=<unavailable>, level=<unavailable>, hdr=<unavailable>, message="Method idx 6984 is greater than number of rows (6984) in PPDB MethodDebugInformation table, for method <StartupCode$Suave>.$YoLo:.cctor in '/Users/[myUserName]/Library/Mobile Documents/com~apple~CloudDocs/Projects/SuaveRestApi/SuaveRestApi/bin/Debug/Suave.pdb'. Likely a malformed PDB file.") at mono-log-common.c:135 [opt] frame #9: 0x000000010bc15dac monomonoeg_g_log [inlined] monoeg_g_logstr(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, msg=) at goutput.c:117 [opt] frame #10: 0x000000010bc15d83 monomonoeg_g_log [inlined] monoeg_g_logv_nofree(format=<unavailable>, args=<unavailable>) at goutput.c:128 [opt] frame #11: 0x000000010bc15d70 monomonoeg_g_log [inlined] monoeg_g_logv(format=, args=) at goutput.c:135 [opt] frame #12: 0x000000010bc15d70 monomonoeg_g_log(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, format=<unavailable>) at goutput.c:144 [opt] frame #13: 0x000000010bac9e68 monomono_ppdb_get_seq_points(minfo=, source_file=, source_file_list=, source_files=, seq_points=0x00007ffee42eb730, n_seq_points=) at debug-mono-ppdb.c:427 [opt] frame #14: 0x000000010b93492f monomono_method_to_ir(cfg=<unavailable>, method=<unavailable>, start_bblock=0x0000000000000000, end_bblock=0x0000000000000000, return_var=0x0000000000000000, inline_args=0x0000000000000000, inline_offset=<unavailable>, is_virtual_call=<unavailable>) at method-to-ir.c:6674 [opt] frame #15: 0x000000010b91ade7 monomini_method_compile(method=, opts=374434303, domain=0x00007fbc91f02f00, flags=JIT_FLAG_RUN_CCTORS, parts=0, aot_method_index=-1) at mini.c:3455 [opt] frame #16: 0x000000010b91e32c monomono_jit_compile_method_inner(method=0x00007fbc94832ea8, target_domain=0x00007fbc91f02f00, opt=<unavailable>, error=0x00007ffee42ebd60) at mini.c:4043 [opt] frame #17: 0x000000010b921cc9 monomono_jit_compile_method_with_opt(method=0x00007fbc94832ea8, opt=, jit_only=1, error=0x00007ffee42ebd60) at mini-runtime.c:2411 [opt] frame #18: 0x000000010b925d8e monomono_jit_runtime_invoke [inlined] mono_jit_compile_method_jit_only(method=<unavailable>, error=0x00007ffee42ebd60) at mini-runtime.c:2471 [opt] frame #19: 0x000000010b925d6e monomono_jit_runtime_invoke(method=, obj=, params=0x0000000000000000, exc=, error=0x00007ffee42ebd60) at mini-runtime.c:3011 [opt] frame #20: 0x000000010bb241d4 monodo_runtime_invoke(method=0x00007fbc94832ea8, obj=0x0000000000000000, params=0x0000000000000000, exc=0x00007ffee42ebd08, error=0x00007ffee42ebd60) at object.c:2960 [opt] frame #21: 0x000000010bb201a8 monomono_runtime_class_init_full [inlined] mono_runtime_try_invoke(method=, obj=, params=, error=0x00007ffee42ebd60) at object.c:3069 [opt] frame #22: 0x000000010bb20167 monomono_runtime_class_init_full(vtable=0x00007fbc9402ee60, error=0x00007ffee42ebd60) at object.c:526 [opt] frame #23: 0x000000010b97a69c monomono_generic_class_init(vtable=) at jit-icalls.c:1511 [opt] frame #24: 0x000000010beb7e2c frame #25: 0x000000010b9261d3 monomono_jit_runtime_invoke(method=<unavailable>, obj=<unavailable>, params=0x00007ffee42ec148, exc=0x00007fbc9402ee60, error=<unavailable>) at mini-runtime.c:3148 [opt] frame #26: 0x000000010bb241d4 monodo_runtime_invoke(method=0x00007fbc91f04798, obj=0x0000000000000000, params=0x00007ffee42ec148, exc=0x0000000000000000, error=0x00007ffee42ec180) at object.c:2960 [opt] frame #27: 0x000000010bb27cac monodo_exec_main_checked [inlined] mono_runtime_invoke_checked(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=0x00007ffee42ec180) at object.c:3128 [opt] frame #28: 0x000000010bb27c9d monodo_exec_main_checked(method=0x00007fbc91f04798, args=, error=0x00007ffee42ec180) at object.c:4949 [opt] frame #29: 0x000000010b98d19d monomono_jit_exec at driver.g.c:1236 [opt] frame #30: 0x000000010b98d18f monomono_jit_exec(domain=, assembly=, argc=1, argv=0x00007ffee42ec550) at driver.g.c:1195 [opt] frame #31: 0x000000010b99037f monomono_main [inlined] main_thread_handler at driver.g.c:1313 [opt] frame #32: 0x000000010b990348 monomono_main(argc=4, argv=) at driver.g.c:2483 [opt] frame #33: 0x000000010b915078 monomain [inlined] mono_main_with_options(argc=<unavailable>, argv=<unavailable>) at main.c:50 [opt] frame #34: 0x000000010b915064 monomain(argc=4, argv=) at main.c:405 [opt] frame #35: 0x00007fff71b8ced9 libdyld.dylibstart + 1 frame #36: 0x00007fff71b8ced9 libdyld.dylibstart + 1 thread #2, name = 'SGen worker' frame #0: 0x00007fff71cc97de libsystem_kernel.dylib__psynch_cvwait + 10 frame #1: 0x00007fff71d83593 libsystem_pthread.dylib_pthread_cond_wait + 724 frame #2: 0x000000010bbf10ee monothread_func [inlined] mono_os_cond_wait(mutex=<unavailable>) at mono-os-mutex.h:173 [opt] frame #3: 0x000000010bbf10db monothread_func at sgen-thread-pool.c:165 [opt] frame #4: 0x000000010bbf10cd monothread_func(data=0x0000000000000000) at sgen-thread-pool.c:196 [opt] frame #5: 0x00007fff71d80305 libsystem_pthread.dylib_pthread_body + 126 frame #6: 0x00007fff71d8326f libsystem_pthread.dylib_pthread_start + 70 frame #7: 0x00007fff71d7f415 libsystem_pthread.dylibthread_start + 13 thread #3, name = 'Finalizer' frame #0: 0x00007fff71cc61b6 libsystem_kernel.dylibsemaphore_wait_trap + 10 frame #1: 0x000000010bb9e9aa monofinalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:90 [opt] frame #2: 0x000000010bb9e99f monofinalizer_thread at mono-coop-semaphore.h:43 [opt] frame #3: 0x000000010bb9e985 monofinalizer_thread(unused=) at gc.c:918 [opt] frame #4: 0x000000010bb49e13 monostart_wrapper [inlined] start_wrapper_internal at threads.c:1151 [opt] frame #5: 0x000000010bb49d83 monostart_wrapper(data=0x00007fbc91f34850) at threads.c:1211 [opt] frame #6: 0x00007fff71d80305 libsystem_pthread.dylib_pthread_body + 126 frame #7: 0x00007fff71d8326f libsystem_pthread.dylib_pthread_start + 70 frame #8: 0x00007fff71d7f415 libsystem_pthread.dylibthread_start + 13 thread #4, name = 'Debugger agent' frame #0: 0x00007fff71cc93e6 libsystem_kernel.dylib__recvfrom + 10 frame #1: 0x000000010ba7e45e monosocket_transport_recv(buf=2001-01-01 00:00:00 UTC, len=11) at debugger-agent.c:1108 [opt] frame #2: 0x000000010ba6f296 monodebugger_thread [inlined] transport_recv(len=11) at debugger-agent.c:1518 [opt] frame #3: 0x000000010ba6f27c monodebugger_thread(arg=<unavailable>) at debugger-agent.c:9484 [opt] frame #4: 0x000000010bb49e13 monostart_wrapper [inlined] start_wrapper_internal at threads.c:1151 [opt] frame #5: 0x000000010bb49d83 monostart_wrapper(data=0x00007fbc91f389a0) at threads.c:1211 [opt] frame #6: 0x00007fff71d80305 libsystem_pthread.dylib_pthread_body + 126 frame #7: 0x00007fff71d8326f libsystem_pthread.dylib_pthread_start + 70 frame #8: 0x00007fff71d7f415 libsystem_pthread.dylibthread_start + 13 thread #5 frame #0: 0x00007fff71cc7b6a libsystem_kernel.dylib__workq_kernreturn + 10 frame #1: 0x00007fff71d7f630 libsystem_pthread.dylib_pthread_wqthread + 446 frame #2: 0x00007fff71d7f405 libsystem_pthread.dylibstart_wqthread + 13 thread #6 frame #0: 0x00007fff71cc7b6a libsystem_kernel.dylib__workq_kernreturn + 10 frame #1: 0x00007fff71d7f630 libsystem_pthread.dylib_pthread_wqthread + 446 frame #2: 0x00007fff71d7f405 libsystem_pthread.dylibstart_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.

(lldb) quit Process 1457 detached

Upvotes: 1

Views: 211

Answers (1)

javicabanas
javicabanas

Reputation: 527

It seems an issue with Visual Studio for Mac and Suave. I did the same test in Visual Studio Code (for mac also) and worked fine.

Upvotes: 0

Related Questions