question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does MacOS app bundles are supported scenario

See original GitHub issue

I created a avalonia (Beta 1) app and publish as standalone application (with rid osx-x64). The application work fine when launch from command line.

So I build a Mac os bundle app wrapped in a dmg file but the application crash.

Do you know if this suppose to work. And eventual have a clue on how to resolve the issue?

Path:                  /Volumes/VOLUME/*/couscous.app/Contents/MacOS/CouscousManager
Identifier:            com.aaa.couscous
Version:               0.01 (0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           CouscousManager [65480]
User ID:               503
Date/Time:             2018-03-08 09:47:58.927 +0100
OS Version:            Mac OS X 10.12.6 (16G1114)
Report Version:        12
Anonymous UUID:        2FCBE20A-99EF-2589-7C4E-D87D504C5BA4
Sleep/Wake UUID:       6FC27A22-1977-4172-A01D-CE67DEB7D758
Time Awake Since Boot: 590000 seconds
Time Since Wake:       58000 seconds
System Integrity Protection: enabled
Notes:                 Translocated Process
Crashed Thread:        0  Dispatch queue: com.apple.main-thread
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff8f0aad42 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff8f198457 pthread_kill + 90
2   libsystem_c.dylib               0x00007fff8f010420 abort + 129
3   libcoreclr.dylib                0x000000010ef1b35e PROCAbort + 14
4   libcoreclr.dylib                0x000000010ef19ef2 PROCEndProcess(void*, unsigned int, int) + 226
5   libcoreclr.dylib                0x000000010f1e1e91 UnwindManagedExceptionPass1(PAL_SEHException&, _CONTEXT*) + 833
6   libcoreclr.dylib                0x000000010f1e2025 DispatchManagedException(PAL_SEHException&, bool) + 293
7   libcoreclr.dylib                0x000000010f19302e RuntimeTypeHandle::CreateInstance(ReflectClassBaseObject*, bool, bool*, MethodDesc**) + 1806
8   ???                             0x000000011d91ef2d 0 + 4791070509
9   ???                             0x000000011d9692dd 0 + 4791374557
10  ???                             0x000000011dfcc346 0 + 4798071622
11  ???                             0x000000011dfc253f 0 + 4798031167
12  libcoreclr.dylib                0x000000010f1ee911 CallDescrWorkerInternal + 124
13  libcoreclr.dylib                0x000000010f0de7ed MethodDescCallSite::CallTargetWorker(unsigned long const*, unsigned long*, int) + 941
14  libcoreclr.dylib                0x000000010efb148b RunMain(MethodDesc*, short, int*, PtrArray**) + 731
15  libcoreclr.dylib                0x000000010efb16ff Assembly::ExecuteMainMethod(PtrArray**, int) + 223
16  libcoreclr.dylib                0x000000010efed03a CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 442
17  libcoreclr.dylib                0x000000010ef24104 coreclr_execute_assembly + 260
18  libhostpolicy.dylib             0x000000010ee74598 0x10edfb000 + 497048
19  libhostpolicy.dylib             0x000000010ee6504e 0x10edfb000 + 434254
20  libhostpolicy.dylib             0x000000010ee66d80 0x10edfb000 + 441728
21  libhostfxr.dylib                0x000000010edb9803 0x10ed3f000 + 501763
22  libhostfxr.dylib                0x000000010edd9666 0x10ed3f000 + 632422
23  libhostfxr.dylib                0x000000010edd6330 0x10ed3f000 + 619312
24  libhostfxr.dylib                0x000000010edda25c 0x10ed3f000 + 635484
25  libhostfxr.dylib                0x000000010edba125 0x10ed3f000 + 504101
26  com.vp.couscous                 0x000000010ecde0e1 0x10ecdb000 + 12513
27  com.vp.couscous                 0x000000010ecde225 0x10ecdb000 + 12837
28  libdyld.dylib                   0x00007fff8ef7c235 start + 1
Thread 1:
0   libsystem_kernel.dylib          0x00007fff8f0a334a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8f0a2797 mach_msg + 55
2   libcoreclr.dylib                0x000000010ef2061a MachMessage::Receive(unsigned int) + 74
3   libcoreclr.dylib                0x000000010ef1f4c9 SEHExceptionThread(void*) + 105
4   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
5   libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
6   libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 2:
0   libsystem_kernel.dylib          0x00007fff8f0ac19e poll + 10
1   libcoreclr.dylib                0x000000010ef1267e CorUnix::CPalSynchronizationManager::ThreadPrepareForShutdown() + 30
2   libcoreclr.dylib                0x000000010ef145c9 CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 1177
3   libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
4   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
5   libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
6   libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 3:
0   libsystem_kernel.dylib          0x00007fff8f0aabf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff8f1967fa _pthread_cond_wait + 712
2   libcoreclr.dylib                0x000000010ef122d5 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 277
3   libcoreclr.dylib                0x000000010ef11f38 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 440
4   libcoreclr.dylib                0x000000010ef16e59 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int) + 1833
5   libcoreclr.dylib                0x000000010ef170a6 WaitForSingleObjectEx + 70
6   libcoreclr.dylib                0x000000010f1c5eb0 CLREventBase::WaitEx(unsigned int, WaitMode, PendingSync*) + 176
7   libcoreclr.dylib                0x000000010f1204ff FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 31
8   libcoreclr.dylib                0x000000010f120673 FinalizerThread::FinalizerThreadWorker(void*) + 115
9   libcoreclr.dylib                0x000000010f0a06da ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 378
10  libcoreclr.dylib                0x000000010f0a0de9 ManagedThreadBase::FinalizerBase(void (*)(void*)) + 73
11  libcoreclr.dylib                0x000000010f120a4c FinalizerThread::FinalizerThreadStart(void*) + 188
12  libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
13  libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
14  libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
15  libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 4:
0   libsystem_kernel.dylib          0x00007fff8f0aaa3e __open + 10
1   libcoreclr.dylib                0x000000010ef8edaf TwoWayPipe::WaitForConnection() + 31
2   libcoreclr.dylib                0x000000010ef86be1 DbgTransportSession::TransportWorker() + 1569
3   libcoreclr.dylib                0x000000010ef850d9 DbgTransportSession::TransportWorkerStatic(void*) + 9
4   libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
5   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
6   libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
7   libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 5:
0   libsystem_kernel.dylib          0x00007fff8f0aabf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff8f1967fa _pthread_cond_wait + 712
2   libcoreclr.dylib                0x000000010ef12312 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 338
3   libcoreclr.dylib                0x000000010ef11f38 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 440
4   libcoreclr.dylib                0x000000010ef16e59 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int) + 1833
5   libcoreclr.dylib                0x000000010ef835da DebuggerRCThread::MainLoop() + 266
6   libcoreclr.dylib                0x000000010ef83477 DebuggerRCThread::ThreadProc() + 263
7   libcoreclr.dylib                0x000000010ef83124 DebuggerRCThread::ThreadProcStatic(void*) + 132
8   libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
9   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
10  libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
11  libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 6:
0   libsystem_kernel.dylib          0x00007fff8f0a334a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff8f0a2797 mach_msg + 55
2   libclrjit.dylib                 0x000000010fc8172a MachMessage::Receive(unsigned int) + 74
3   libclrjit.dylib                 0x000000010fc805d9 SEHExceptionThread(void*) + 105
4   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
5   libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
6   libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 7:
0   libsystem_kernel.dylib          0x00007fff8f0aabf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff8f1967fa _pthread_cond_wait + 712
2   libcoreclr.dylib                0x000000010ef122d5 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 277
3   libcoreclr.dylib                0x000000010ef11f38 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 440
4   libcoreclr.dylib                0x000000010ef17350 SleepEx + 144
5   libcoreclr.dylib                0x000000010f0c27fb ThreadpoolMgr::TimerThreadFire() + 123
6   libcoreclr.dylib                0x000000010f0c26e5 ThreadpoolMgr::TimerThreadStart(void*) + 181
7   libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
8   libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
9   libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
10  libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 8:
0   libsystem_pthread.dylib         0x00007fff8f195070 start_wqthread + 0
Thread 9:
0   libsystem_kernel.dylib          0x00007fff8f0ab44e __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8f19548e _pthread_wqthread + 1023
2   libsystem_pthread.dylib         0x00007fff8f19507d start_wqthread + 13
Thread 10:
0   libsystem_kernel.dylib          0x00007fff8f0ab44e __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8f195621 _pthread_wqthread + 1426
2   libsystem_pthread.dylib         0x00007fff8f19507d start_wqthread + 13
Thread 11:
0   libsystem_pthread.dylib         0x00007fff8f195070 start_wqthread + 0
1   ???                             0x0000700008a09b20 0 + 123145447054112
Thread 12:
0   libsystem_kernel.dylib          0x00007fff8f0aabf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff8f1967fa _pthread_cond_wait + 712
2   libcoreclr.dylib                0x000000010ef122d5 CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 277
3   libcoreclr.dylib                0x000000010ef11f38 CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 440
4   libcoreclr.dylib                0x000000010ef16e59 CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int) + 1833
5   libcoreclr.dylib                0x000000010ef170a6 WaitForSingleObjectEx + 70
6   libcoreclr.dylib                0x000000010f1c605c CLRSemaphore::Wait(unsigned int, int) + 172
7   libcoreclr.dylib                0x000000010f0c0024 ThreadpoolMgr::UnfairSemaphore::Wait(unsigned int) + 420
8   libcoreclr.dylib                0x000000010f0bfc0b ThreadpoolMgr::WorkerThreadStart(void*) + 699
9   libcoreclr.dylib                0x000000010ef1cdd8 CorUnix::CPalThread::ThreadEntry(void*) + 328
10  libsystem_pthread.dylib         0x00007fff8f19593b _pthread_body + 180
11  libsystem_pthread.dylib         0x00007fff8f195887 _pthread_start + 286
12  libsystem_pthread.dylib         0x00007fff8f19508d thread_start + 13
Thread 13:
0   libsystem_kernel.dylib          0x00007fff8f0aabf2 __psynch_cvwait + 10
1   libsystem_pthread.dylib     ...

The Info.plist file too :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundleGetInfoString</key>
  <string>Couscous</string>
  <key>CFBundleExecutable</key>
  <string>CouscousManager</string>
  <key>CFBundleIdentifier</key>
  <string>com.aaa.couscous</string>
  <key>CFBundleName</key>
  <string>couscous</string>
  <key>CFBundleIconFile</key>
  <string>couchbase-mini.icns</string>
  <key>CFBundleShortVersionString</key>
  <string>0.01</string>
  <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>IFMajorVersion</key>
  <integer>0</integer>
  <key>IFMinorVersion</key>
  <integer>1</integer>
</dict>
</plist>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ahoppercommented, Nov 16, 2021

I had something similar a long time ago and used
Directory.SetCurrentDirectory(System.AppContext.BaseDirectory); otherwise relative paths do not point to where you might think.

0reactions
lastlinkcommented, Apr 1, 2022

I’m not actually have issues writing to .app directories, but I think the relative path was also an issue that your fix helped me @ahopper .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placing Content in a Bundle
Bundles fulfill many different roles: apps, app extensions, frameworks, and plug-ins are all bundles. Bundles can also contain other bundles; for example, an ......
Read more >
How to thwart application bundle manipulation on macOS
Adversaries commonly manipulate application bundles to subvert security controls, elevate privileges, and install malware on macOS devices.
Read more >
Learn How to Setup App Bundles and Package MacOS Apps
Mac OS X handles most applications as "bundles". App bundles make it easy for distributing application as a single package. We can bundle...
Read more >
Build and release a macOS app
Every macOS application is associated with a Bundle ID, a unique identifier registered with Apple. To register a Bundle ID for your app,...
Read more >
Replace / Update Files in Mac OS X App Bundle
1 Answer 1 ... If it's an app distributed via the App Store or signed (or both), you can not replace files within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found