Unhandled Exception when running mono N2EliteManager.exe on MACOS

Discussion in 'Official 'N^2 Elite' Support Forum' started by ACECO, Jul 29, 2017.

  1. 10
    0
    1
    ACECO

    ACECO Loyal Member

    Joined:
    Apr 21, 2017
    We get errors when trying to run N2eliteManager.exe via mono on MacOS.

    Mono is installed.

    When testing the applications using the test on this page -http://www.mono-project.com/docs/getting-started/mono-basics/ we get the following:

    The Console Application Test works great.

    MYMAC1:desktop admin$ mcs hello.cs
    MYMAC1:desktop admin$ mono hello.exe
    Hello Mono World​

    The WinForms Application Test works great.

    MYMAC1:desktop admin$ mcs hellofrm.cs -pkg:dotnet
    MYMAC1:desktop admin$ mono hellofrm.exe

    The form launches without incident.​

    The GTK# Application Test works great.

    MYMAC1:desktop admin$ mcs gtkapp.cs -pkg:gtk-sharp-2.0
    MYMAC1:desktop admin$ mono gtkapp.exe
    2017-07-29 12:28:41.998 mono[1829:465697] *** WARNING: Method userSpaceScaleFactorin class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. ​

    The form launches without incident.​

    However, when I run the N2EliteManager.exe – it errors out due to an unhandled exception as shown below

    MYMAC1:desktop admin$ mono N2EliteManager.exe
    Unhandled Exception:
    System.NullReferenceException: Object reference not set to an instance of an object
    at N2EliteManager.TagReader.GetPorts () [0x00031] in <03deb1c173a145abb62be73839e4e6ee>:0
    at N2EliteManager.MainForm..ctor () [0x0000c] in <03deb1c173a145abb62be73839e4e6ee>:0
    at (wrapper remoting-invoke-with-check)N2EliteManager.MainForm:.ctor ()
    at N2EliteManager.Program.Main () [0x0000b] in <03deb1c173a145abb62be73839e4e6ee>:0
    [ERROR] FATAL UNHANDLED EXCEPTION:System.NullReferenceException: Object reference not set to an instance of an object
    at N2EliteManager.TagReader.GetPorts () [0x00031] in <03deb1c173a145abb62be73839e4e6ee>:0
    at N2EliteManager.MainForm..ctor () [0x0000c] in <03deb1c173a145abb62be73839e4e6ee>:0
    at (wrapper remoting-invoke-with-check)N2EliteManager.MainForm:.ctor ()
    at N2EliteManager.Program.Main () [0x0000b] in <03deb1c173a145abb62be73839e4e6ee>:0 ​

    I am not the only one getting this error or experiencing this problem.

    Please advise.
     
  2. 10
    0
    1
    ACECO

    ACECO Loyal Member

    Joined:
    Apr 21, 2017
    I also tested it on a cleanly set up MacOS 10.10.5 system that has nothing on it except for MacOS Operating System and MONO and the same problem I described above happens there too.
     
  3. 10
    0
    1
    ACECO

    ACECO Loyal Member

    Joined:
    Apr 21, 2017
    This has been fixed in the latest version. FYI. Problem resolved.
     
  4. 5
    0
    1
    El Papa

    El Papa Loyal Member

    Joined:
    Apr 12, 2017
    Nope.. I still see the problem here.

    mono N2EliteManager.exe
    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) [0x00002] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.XplatUICarbon.get_WorkingArea () [0x00005] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.XplatUICarbon.get_VirtualScreen () [0x00000] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.XplatUI.get_VirtualScreen () [0x00000] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.Screen..cctor () [0x00034] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0
    at <unknown> <0xffffffff>
    at System.Windows.Forms.Form.get_CreateParams () [0x00157] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.CommonDialog/DialogForm.get_CreateParams () [0x00000] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.Form.SetClientSizeCore (int,int) [0x000af] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.Control.set_ClientSize (System.Drawing.Size) [0x0000f] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.Form.set_ClientSize (System.Drawing.Size) [0x00007] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form.set_ClientSize (System.Drawing.Size) [0x00032] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at System.Windows.Forms.FolderBrowserDialog..ctor () [0x00177] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.FolderBrowserDialog..ctor () [0x00018] in <37dfd86a0d3248c0b8cd4af52ec71426>:0
    at N2EliteManager.MainForm.InitializeComponent () [0x000c6] in <14a05495242f45cb9a7cabc00c20d8cc>:0
    at N2EliteManager.MainForm..ctor () [0x00006] in <14a05495242f45cb9a7cabc00c20d8cc>:0
    at (wrapper remoting-invoke-with-check) N2EliteManager.MainForm..ctor () [0x00018] in <14a05495242f45cb9a7cabc00c20d8cc>:0
    at N2EliteManager.Program.Main () [0x0000b] in <14a05495242f45cb9a7cabc00c20d8cc>:0
    at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0004c] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0

    Native stacktrace:

    0 mono 0x0000000104580061 mono_handle_native_crash + 257
    1 mono 0x00000001045e5ec6 altstack_handle_and_restore + 70
    2 SkyLight 0x00007fffe3d197a1 SLDisplayBounds + 68
    3 ??? 0x000000010ebcc8ce 0x0 + 4542220494
    4 ??? 0x0000000104a0e32f 0x0 + 4372620079
    5 mono 0x00000001044d6505 mono_jit_runtime_invoke + 2245
    6 mono 0x00000001046d7d48 do_runtime_invoke + 88
    7 mono 0x00000001046d3cdd mono_runtime_class_init_full + 1021
    8 mono 0x00000001044cfefa mono_jit_compile_method_inner + 2442
    9 mono 0x00000001044d284a mono_jit_compile_method_with_opt + 714
    10 mono 0x000000010458266f common_call_trampoline + 1199
    11 mono 0x0000000104582189 mono_magic_trampoline + 73
    12 ??? 0x000000010493739e 0x0 + 4371739550
    13 ??? 0x000000010af3d635 0x0 + 4478719541
    14 ??? 0x000000010ebb1575 0x0 + 4542109045
    15 ??? 0x0000000104a18e7d 0x0 + 4372663933
    16 mono 0x00000001044d6505 mono_jit_runtime_invoke + 2245
    17 mono 0x00000001046d7d48 do_runtime_invoke + 88
    18 mono 0x00000001046db1bc do_exec_main_checked + 140
    19 mono 0x000000010454534e mono_jit_exec + 302
    20 mono 0x0000000104547757 mono_main + 8167
    21 mono 0x00000001044c759a main + 1690
    22 mono 0x00000001044c6ef4 start + 52

    Debug info from gdb:

    (lldb) command source -s 0 '/tmp/mono-gdb-commands.HvmT7d'
    Executing commands in '/tmp/mono-gdb-commands.HvmT7d'.
    (lldb) process attach --pid 13626
    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 13626 stopped
    * thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fffe7a0d3ee libsystem_kernel.dylib`__wait4 + 10
    libsystem_kernel.dylib`__wait4:
    -> 0x7fffe7a0d3ee <+10>: jae 0x7fffe7a0d3f8 ; <+20>
    0x7fffe7a0d3f0 <+12>: movq %rax, %rdi
    0x7fffe7a0d3f3 <+15>: jmp 0x7fffe7a05cd4 ; cerror
    0x7fffe7a0d3f8 <+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 13626 stopped
    * thread #1: tid = 0x11a290, 0x00007fffe7a0d3ee libsystem_kernel.dylib`__wait4 + 10, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    thread #2: tid = 0x11a291, 0x00007fffe7a0cbf2 libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
    thread #3: tid = 0x11a292, 0x00007fffe7a05386 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
    thread #4: tid = 0x11a293, 0x00007fffe7a0d44e libsystem_kernel.dylib`__workq_kernreturn + 10
    thread #5: tid = 0x11a295, 0x00007fffe7a0d44e libsystem_kernel.dylib`__workq_kernreturn + 10
    thread #6: tid = 0x11a296, 0x00007fffe7a0d44e 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: 0x00007fffe7a0d3ee libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x00000001045800ed mono`mono_handle_native_crash(signal="SIGSEGV", ctx=<unavailable>, info=<unavailable>) at mini-exceptions.c:2555 [opt]
    frame #2: 0x00000001045e5ec6 mono`altstack_handle_and_restore(ctx=0x00007fff5b738560, obj=0x0000000000000000, stack_ovf=0) at exceptions-amd64.c:795 [opt]
    frame #3: 0x00007fffe3d197a1 SkyLight`SLDisplayBounds + 68
    frame #4: 0x000000010ebcc8ce
    frame #5: 0x0000000104a0e32f
    frame #6: 0x00000001044d6505 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=0x0000000000000000, params=<unavailable>, error=<unavailable>) at mini-runtime.c:2549 [opt]
    frame #7: 0x00000001046d7d48 mono`do_runtime_invoke(method=0x00007fc0130729e8, obj=0x0000000000000000, params=0x0000000000000000, exc=0x00007fff5b738e38, error=0x00007fff5b739038) at object.c:2829 [opt]
    frame #8: 0x00000001046d3cdd mono`mono_runtime_class_init_full [inlined] mono_runtime_try_invoke(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=0x00007fff5b739038) at object.c:2937 [opt]
    frame #9: 0x00000001046d3c9c mono`mono_runtime_class_init_full(vtable=0x00007fc00f1aff58, error=0x00007fff5b739038) at object.c:471 [opt]
    frame #10: 0x00000001044cfefa mono`mono_jit_compile_method_inner(method=<unavailable>, target_domain=<unavailable>, opt=<unavailable>, error=0x00007fff5b739038) at mini.c:4365 [opt]
    frame #11: 0x00000001044d284a mono`mono_jit_compile_method_with_opt(method=<unavailable>, opt=<unavailable>, jit_only=0, error=<unavailable>) at mini-runtime.c:1889 [opt]
    frame #12: 0x000000010458266f mono`common_call_trampoline(regs=0x00007fff5b739118, code="H\x8b�H��\xa8H\x8b�8, m=<unavailable>, vt=0x0000000000000000, vtable_slot=0x0000000000000000, error=0x00007fff5b739038) at mini-trampolines.c:704 [opt]
    frame #13: 0x0000000104582189 mono`mono_magic_trampoline(regs=<unavailable>, code=<unavailable>, arg=<unavailable>, tramp=<unavailable>) at mini-trampolines.c:834 [opt]
    frame #14: 0x000000010493739e
    frame #15: 0x000000010af3d635
    frame #16: 0x000000010ebb1575
    frame #17: 0x0000000104a18e7d
    frame #18: 0x00000001044d6505 mono`mono_jit_runtime_invoke(method=<unavailable>, obj=0x0000000000000000, params=<unavailable>, error=<unavailable>) at mini-runtime.c:2549 [opt]
    frame #19: 0x00000001046d7d48 mono`do_runtime_invoke(method=0x00007fc00e412408, obj=0x0000000000000000, params=0x00007fff5b73a0b0, exc=0x0000000000000000, error=0x00007fff5b73a100) at object.c:2829 [opt]
    frame #20: 0x00000001046db1bc mono`do_exec_main_checked [inlined] mono_runtime_invoke_checked(method=0x00007fc00e412408, obj=<unavailable>, params=0x0000000104c003e8, error=0x00007fff5b73a100) at object.c:2983 [opt]
    frame #21: 0x00000001046db17b mono`do_exec_main_checked(method=0x00007fc00e412408, args=<unavailable>, error=0x00007fff5b73a100) at object.c:4623 [opt]
    frame #22: 0x000000010454534e mono`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=1, argv=0x00007fff5b73a540) at driver.g.c:1040 [opt]
    frame #23: 0x0000000104547757 mono`mono_main [inlined] main_thread_handler at driver.g.c:1109 [opt]
    frame #24: 0x0000000104547720 mono`mono_main(argc=<unavailable>, argv=<unavailable>) at driver.g.c:2247 [opt]
    frame #25: 0x00000001044c759a mono`main [inlined] mono_main_with_options(argc=2, argc=2, argc=2, argv=0x00007fff5b73a538, argv=0x00007fff5b73a538, argv=0x00007fff5b73a538) at main.c:46 [opt]
    frame #26: 0x00000001044c7589 mono`main(argc=2, argv=0x00007fff5b73a538) at main.c:339 [opt]
    frame #27: 0x00000001044c6ef4 mono`start + 52

    thread #2, name = 'SGen worker'
    frame #0: 0x00007fffe7a0cbf2 libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007fffe7af87fa libsystem_pthread.dylib`_pthread_cond_wait + 712
    frame #2: 0x000000010474eb55 mono`thread_func [inlined] mono_os_cond_wait(mutex=0x00000001048a4848) at mono-os-mutex.h:173 [opt]
    frame #3: 0x000000010474eb46 mono`thread_func(thread_data=0x00000001049eb108) at sgen-thread-pool.c:130 [opt]
    frame #4: 0x00007fffe7af793b libsystem_pthread.dylib`_pthread_body + 180
    frame #5: 0x00007fffe7af7887 libsystem_pthread.dylib`_pthread_start + 286
    frame #6: 0x00007fffe7af708d libsystem_pthread.dylib`thread_start + 13

    thread #3, name = 'Finalizer'
    frame #0: 0x00007fffe7a05386 libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x00000001046d0693 mono`finalizer_thread [inlined] mono_os_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-os-semaphore.h:91 [opt]
    frame #2: 0x00000001046d0688 mono`finalizer_thread [inlined] mono_coop_sem_wait(flags=MONO_SEM_FLAGS_ALERTABLE) at mono-coop-semaphore.h:43 [opt]
    frame #3: 0x00000001046d0680 mono`finalizer_thread(unused=<unavailable>) at gc.c:866 [opt]
    frame #4: 0x00000001046a3a6b mono`start_wrapper [inlined] start_wrapper_internal at threads.c:829 [opt]
    frame #5: 0x00000001046a39d1 mono`start_wrapper(data=<unavailable>) at threads.c:891 [opt]
    frame #6: 0x00007fffe7af793b libsystem_pthread.dylib`_pthread_body + 180
    frame #7: 0x00007fffe7af7887 libsystem_pthread.dylib`_pthread_start + 286
    frame #8: 0x00007fffe7af708d libsystem_pthread.dylib`thread_start + 13

    thread #4
    frame #0: 0x00007fffe7a0d44e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fffe7af7621 libsystem_pthread.dylib`_pthread_wqthread + 1426
    frame #2: 0x00007fffe7af707d libsystem_pthread.dylib`start_wqthread + 13

    thread #5
    frame #0: 0x00007fffe7a0d44e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fffe7af748e libsystem_pthread.dylib`_pthread_wqthread + 1023
    frame #2: 0x00007fffe7af707d libsystem_pthread.dylib`start_wqthread + 13

    thread #6
    frame #0: 0x00007fffe7a0d44e libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fffe7af7621 libsystem_pthread.dylib`_pthread_wqthread + 1426
    frame #2: 0x00007fffe7af707d 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.
    =================================================================

    Process 13626 detached
    (lldb) quit
    Abort trap: 6
     
  5. 10
    0
    1
    ACECO

    ACECO Loyal Member

    Joined:
    Apr 21, 2017
    What version of MacOS are you running? If you are running on windows your issue may be different than the one I brought to their attention. You may want to open a separate thread for the specific issue/bug you are encountering since it sounds like it's different.
     
  6. 3
    0
    1
    AbareSaru

    AbareSaru Loyal Member

    Joined:
    Jul 18, 2017
    Encounted the same problem when trying to run the app today. I am on Mac OS 10.12.5
     

Share This Page