Can't get a Mac application bundle working

As the title says: I can’t get it working ever since upgrading from MG 3.6. I’m sure I’m doing something wrong, but for the life of me I can’t work out what it is and have been plugging away at it for too long, so I’m hoping to get a second set of eyes on the problem.

This is what the player sent me:

https://imgur.com/Eao9g98.jpg

My understanding is that mac OS 10.13 is a 64 bit OS, and so should be compatible with a build published using the osx-x64 command. So I suppose the straightforward question to ask is “Is Monogame 3.8 compatible with OSX versions earlier than 10.15, or is that the cutoff point?”.

Note: I don’t personally have a Mac and don’t know anyone who does. I’m trying to compile everything on a Windows pc and work with the player who sent me this screenshot to get it running.

Note 2: this isn’t the only Mac user who has noted the mac build as not working, so there may be additional issues, but this is the only one who has given me actionable info on the follow up.

My deployment process:

Step 1: Publish my game using this command

cd "C:\Users\Quasar\source\repos\Species\Species"
dotnet publish -c Release -r osx-x64 /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained

Step 2: Rearrange the published files into an application bundle under species-app:

robocopy /E /DCOPY:DAT bin\Release\netcoreapp3.1\osx-x64\Content bin\Release\netcoreapp3.1\species-app\Species.app\Contents
robocopy /E /DCOPY:DAT bin\Release\netcoreapp3.1\osx-x64\publish bin\Release\netcoreapp3.1\species-app\Species.app\Contents\MacOS\
rd /s /q bin\Release\netcoreapp3.1\species-app\Species.app\Contents\MacOS\Content\

Step 3: Copy a correctly structured info.plist file into place.

xcopy /Y Info.plist bin\Release\netcoreapp3.1\species-app\Species.app\Contents

Step 4: Deploy the contents of \species-app\ to steam.

So, I open this question to to floor. Anyone know what it is I’m doing wrong here?

One of my players was kind enough to share an error report, seen below.

My understanding is that EXC_CRASH (SIGABRT) indicates an exception was thrown, and the stack trace indicates it happened in libhostfxr.dylib.


Translated Report (Full Report Below)

Process: Species [48663]
Path: /Users/USER/Library/Application Support/Steam/*/Species.app/Contents/MacOS/Species
Identifier: com.speciesgame.species
Version: 1.0 (1)
Code Type: X86-64 (Translated)
Parent Process: launchd [1]
User ID: 501

Date/Time: 2023-04-21 12:25:52.9977 +0300
OS Version: macOS 13.1 (22C65)
Report Version: 12
Anonymous UUID: C79315B5-FE47-47CD-4223-1F2B765A3023

Sleep/Wake UUID: F1A982F3-DEDB-4967-B1DD-3722967AA2EF

Time Awake Since Boot: 2000000 seconds
Time Since Wake: 64363 seconds

System Integrity Protection: enabled

Crashed Thread: 0 MainThrd Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage

Thread 0 Crashed:: MainThrd Dispatch queue: com.apple.main-thread
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d922a __pthread_kill + 10
2 libsystem_pthread.dylib 0x7ff801510f7b pthread_kill + 263
3 libsystem_c.dylib 0x7ff80145aca5 abort + 123
4 libcoreclr.dylib 0x10c3d8569 PROCAbort + 25
5 libcoreclr.dylib 0x10c3d84b6 PROCEndProcess(void*, unsigned int, int) + 230
6 libcoreclr.dylib 0x10c6a8de1 UnwindManagedExceptionPass1(PAL_SEHException&, _CONTEXT*) + 897
7 libcoreclr.dylib 0x10c6a8e53 DispatchManagedException(PAL_SEHException&, bool) + 67
8 libcoreclr.dylib 0x10c530643 PreStubWorker + 963
9 libcoreclr.dylib 0x10c73958b ThePreStub + 92
10 ??? 0x1131f6cfd ???
11 ??? 0x1131d158a ???
12 libcoreclr.dylib 0x10c73889b CallDescrWorkerInternal + 124
13 libcoreclr.dylib 0x10c596ac8 MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 1496
14 libcoreclr.dylib 0x10c466a66 RunMain(MethodDesc*, short, int*, PtrArray**) + 710
15 libcoreclr.dylib 0x10c466dc3 Assembly::ExecuteMainMethod(PtrArray**, int) + 387
16 libcoreclr.dylib 0x10c4a5a53 CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 499
17 libcoreclr.dylib 0x10c3e2824 coreclr_execute_assembly + 196
18 libhostpolicy.dylib 0x10bc701f6 0x10bc60000 + 66038
19 libhostpolicy.dylib 0x10bc7109f 0x10bc60000 + 69791
20 libhostfxr.dylib 0x10bbb8d6a 0x10bb90000 + 167274
21 libhostfxr.dylib 0x10bbb7de1 0x10bb90000 + 163297
22 libhostfxr.dylib 0x10bbb3e3a 0x10bb90000 + 147002
23 Species 0x10050b0fe 0x1004fe000 + 53502
24 Species 0x10050b45f 0x1004fe000 + 54367
25 dyld 0x2008d7310 start + 2432

Thread 1:: com.apple.rosetta.exceptionserver
0 runtime 0x7ff7ffdf4614 0x7ff7ffdf0000 + 17940
1 runtime 0x7ff7ffe00530 0x7ff7ffdf0000 + 66864
2 runtime 0x7ff7ffe01f30 0x7ff7ffdf0000 + 73520

Thread 2:
0 runtime 0x7ff7ffe1287c 0x7ff7ffdf0000 + 141436

Thread 3:
0 runtime 0x7ff7ffe1287c 0x7ff7ffdf0000 + 141436

Thread 4:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d25c2 mach_msg2_trap + 10
2 libsystem_kernel.dylib 0x7ff8014e0604 mach_msg2_internal + 82
3 libsystem_kernel.dylib 0x7ff8014d9635 mach_msg_overwrite + 723
4 libsystem_kernel.dylib 0x7ff8014d28a8 mach_msg + 19
5 libcoreclr.dylib 0x10c3df7f8 MachMessage::Receive(unsigned int) + 72
6 libcoreclr.dylib 0x10c3de90e SEHExceptionThread(void*) + 110
7 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
8 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 5:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d92d6 poll + 10
2 libcoreclr.dylib 0x10c3d0f4e CorUnix::CPalSynchronizationManager::ThreadPrepareForShutdown() + 30
3 libcoreclr.dylib 0x10c3d2b8b CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 923
4 libcoreclr.dylib 0x10c3dc321 CorUnix::CPalThread::ThreadEntry(void*) + 417
5 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
6 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 6:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d2d5e __open + 10
2 libsystem_kernel.dylib 0x7ff8014dbbce open + 204
3 libcoreclr.dylib 0x10c44fd7f TwoWayPipe::WaitForConnection() + 31
4 libcoreclr.dylib 0x10c4475b3 DbgTransportSession::TransportWorker() + 147
5 libcoreclr.dylib 0x10c446199 DbgTransportSession::TransportWorkerStatic(void*) + 9
6 libcoreclr.dylib 0x10c3dc321 CorUnix::CPalThread::ThreadEntry(void*) + 417
7 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
8 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 7:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d511a __psynch_cvwait + 10
2 libsystem_pthread.dylib 0x7ff8015117e1 _pthread_cond_wait + 1243
3 libcoreclr.dylib 0x10c3d0c6b CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 315
4 libcoreclr.dylib 0x10c3d093a CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 458
5 libcoreclr.dylib 0x10c3d522a CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1946
6 libcoreclr.dylib 0x10c3d5512 WaitForMultipleObjectsEx + 82
7 libcoreclr.dylib 0x10c4444c9 DebuggerRCThread::MainLoop() + 281
8 libcoreclr.dylib 0x10c44434b DebuggerRCThread::ThreadProc() + 283
9 libcoreclr.dylib 0x10c444063 DebuggerRCThread::ThreadProcStatic(void*) + 131
10 libcoreclr.dylib 0x10c3dc321 CorUnix::CPalThread::ThreadEntry(void*) + 417
11 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
12 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 8:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d511a __psynch_cvwait + 10
2 libsystem_pthread.dylib 0x7ff8015117e1 _pthread_cond_wait + 1243
3 libcoreclr.dylib 0x10c3d0c45 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 277
4 libcoreclr.dylib 0x10c3d093a CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 458
5 libcoreclr.dylib 0x10c3d522a CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1946
6 libcoreclr.dylib 0x10c3d544d WaitForSingleObjectEx + 77
7 libcoreclr.dylib 0x10c67c8b8 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 200
8 libcoreclr.dylib 0x10c5e751f FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 31
9 libcoreclr.dylib 0x10c5e76b0 FinalizerThread::FinalizerThreadWorker(void*) + 144
10 libcoreclr.dylib 0x10c55931d ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 317
11 libcoreclr.dylib 0x10c559980 ManagedThreadBase::FinalizerBase(void ()(void)) + 32
12 libcoreclr.dylib 0x10c5e7838 FinalizerThread::FinalizerThreadStart(void*) + 200
13 libcoreclr.dylib 0x10c3dc321 CorUnix::CPalThread::ThreadEntry(void*) + 417
14 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
15 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 9:
0 ??? 0x7ff8908469a8 ???
1 libsystem_kernel.dylib 0x7ff8014d92be __accept + 10
2 libcoreclr.dylib 0x10c44fade IpcStream::DiagnosticsIpc::Accept(void ()(char const, unsigned int)) const + 62
3 libcoreclr.dylib 0x10c5c325d DiagnosticsServerThread(void*) + 269
4 libcoreclr.dylib 0x10c3dc321 CorUnix::CPalThread::ThreadEntry(void*) + 417
5 libsystem_pthread.dylib 0x7ff801511259 _pthread_start + 125
6 libsystem_pthread.dylib 0x7ff80150cc7b thread_start + 15

Thread 10:
0 runtime 0x7ff7ffe1287c 0x7ff7ffdf0000 + 141436

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000304ec61c0 rsi: 0x0000000000000003 rbp: 0xffffffff00000000 rsp: 0x0000000001ee9821
r8: 0x00000002009752c0 r9: 0xffffffff00000000 r10: 0x0000000000000000 r11: 0x0000000304ec4538
r12: 0x0000000000000103 r13: 0x0000000304ec4be0 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: rfl: 0x0000000000200283
tmp0: 0xffffffffffffffff tmp1: 0x00007ff89084697c tmp2: 0x00007ff8014d9220

Binary Images:
0x0 - 0xffffffffffffffff ??? () <00000000-0000-0000-0000-000000000000> ???
0x7ff8014d1000 - 0x7ff80150aff7 libsystem_kernel.dylib (
) <7c3dcc95-9f42-3c7c-8796-476ff67b9cf7> /usr/lib/system/libsystem_kernel.dylib
0x7ff80150b000 - 0x7ff801516ff7 libsystem_pthread.dylib () <5920e36f-53ec-33f0-b675-8ae48b58418c> /usr/lib/system/libsystem_pthread.dylib
0x7ff8013d9000 - 0x7ff801461fff libsystem_c.dylib (
) <376f7cb7-6dd2-3e00-976f-77dd755bdb0d> /usr/lib/system/libsystem_c.dylib
0x10c397000 - 0x10c88efff libcoreclr.dylib () <2d432576-1821-3e4d-b846-3c8ce96f406a> /Users/USER/Library/Application Support/Steam/*/Species.app/Contents/MacOS/libcoreclr.dylib
0x10bc60000 - 0x10bc9ffff libhostpolicy.dylib (
) <2a397e82-5f65-31f3-80d8-3a26b422be10> /Users/USER/Library/Application Support/Steam/*/Species.app/Contents/MacOS/libhostpolicy.dylib
0x10bb90000 - 0x10bbdbfff libhostfxr.dylib () <7508a29f-9ee7-351c-b591-67708931ffc5> /Users/USER/Library/Application Support/Steam/*/Species.app/Contents/MacOS/libhostfxr.dylib
0x1004fe000 - 0x10050dfff com.speciesgame.species (1.0) <41ce4042-3452-33d6-8600-6291e98fa9a0> /Users/USER/Library/Application Support/Steam/*/Species.app/Contents/MacOS/Species
0x2008d1000 - 0x200968fff dyld (
) /usr/lib/dyld
0x7ff7ffdf0000 - 0x7ff7ffe1ffff runtime (*) /usr/libexec/rosetta/runtime

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=451.5M resident=0K(0%) swapped_out_or_unallocated=451.5M(100%)
Writable regions: Total=1.2G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.2G(100%)

VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 128K 1
Activity Tracing 256K 1
CG backing stores 2176K 4
ColorSync 216K 24
CoreGraphics 4K 1
CoreServices 192K 1
CoreUI image data 152K 1
Foundation 16K 1
Kernel Alloc Once 8K 1
MALLOC 225.2M 36
MALLOC guard page 192K 9
MALLOC_MEDIUM (reserved) 480.0M 4 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
Rosetta Arena 4096K 2
Rosetta Generic 2192K 545
Rosetta IndirectBranch 512K 1
Rosetta JIT 128.0M 1
Rosetta Return Stack 200K 20
Rosetta Thread Context 200K 20
STACK GUARD 12K 3
Stack 12.6M 10
Stack Guard 56.0M 7
VM_ALLOCATE 1.8G 637
VM_ALLOCATE (reserved) 72K 3 reserved VM address space (unallocated)
__CTF 756 1
__DATA 18.9M 377
__DATA_CONST 16.1M 223
__DATA_DIRTY 778K 118
__FONT_DATA 2352 1
__LINKEDIT 169.3M 17
__OBJC_RO 65.4M 1
__OBJC_RW 1985K 2
__TEXT 282.2M 399
dyld private memory 256K 1
mapped file 4.2G 1336
shared memory 1008K 14
unshared pmap 11.0M 8
=========== ======= =======
TOTAL 7.7G 3832
TOTAL, minus reserved VM space 6.9G 3832

POSSIBLE HINT/POSSIBLE RED HERRING: App packaging for Mac, The application "YourGame" can't be opened.

This user was able to solve a similar sounding issue by running sudo chmod +x GameName on the target machine. I don’t believe I can do that, and but it might be possible to test it…

Create bash script which runs your game executable: !/bin/bash
./YourGameName And then use Platypus To create app bundle from it.