help in setting up automated releases

Hi all,
I’ve been working on getting automated builds for macOS. I’ve published some preliminary results here: Release macOS-testing · agriggio/ART-releases · GitHub

Note that the apps are neither codesigned nor notarized, so you might need to explicitly bypass the warnings/protections given by macOS.

I’d appreciate any feedback on whether they are working as intended (after granting the required permissions).

Thanks in advance!

2 Likes

I haven’t looked into the details yet, but It seems to work well on ARM Mac. And I confirmed that it recognizes ~/.config/ART as user’s setting directory as same as Linux version. It is not sandboxed, right?

Hi,
Thanks for testing! Great that it works on arm, I only have an old intel mac so I can’t test on the new apple chips.

Right, it’s not, good point. As usual, people who are uncomfortable with this should keep it in mind.

Best

Hi Alberto,
Great job! I just found this thread tonight, I tried your build quickly on my base Mac mini M1, it seems to work fine. I don’t mind having to bypass MacOS protection, I’m used to it for other programs (music production related).
Thank you!

1 Like

@HIRAM FYI I think I’m going to switch to this approach and drop support for the macosx_bundle.sh script, as I find this easier to maintain. This will most definitely break your builds though, so I wanted to let you know beforehand (so if you have some comments they are most welcome).

Are you saying you want to remove support for my building of ART? That’s up to you but please consider options.

I wanted to check what is your take on this. So far, your builds were the only useable ones for macOS, at least as far as I could understand. Now, there’s an alternative way that seems to work (*), so I wanted to check whether you are still interested in providing builds or you would be happy with the automatically-generated ones from the ART-releases repo. If you still want to make your builds available, I can certainly keep support for the current way. I just don’t want to keep around stuff that is not used anymore.

(*) the builds are not codesigned, notarized, or even sandboxed. I don’t consider this a problem personally, though I understand other people might disagree.

@HIRAM if you are interested in keeping macos_bundle.sh alive, can you please test whether it still works in the macos-bundle-v2 branch? Thanks in advance!

@agriggio I got an instant crash on opening your ART MacOS arm build:

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               .ART.bin [2377]
Path:                  /Applications/ART.app/Contents/MacOS/../MacOS/.ART.bin
Identifier:            .ART.bin
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        Exited process [2372]
User ID:               501

Date/Time:             2024-11-28 20:55:36.7385 -0400
OS Version:            macOS 14.6.1 (23G93)
Report Version:        12
Anonymous UUID:        645651DB-3F03-76CF-AC23-A5BF04C101EF


Time Awake Since Boot: 6100 seconds

System Integrity Protection: enabled

Crashed Thread:        4

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Codes:       0x0000000000000001, 0x0000000000000008

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [2377]

VM Region Info: 0x8 is not in any region.  Bytes before following region: 4372594680
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      104a08000-105244000    [ 8432K] r-x/r-x SM=COW  /Applications/ART.app/Contents/MacOS/.ART.bin

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x1859acdf4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1859bf5e4 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1859b59c4 mach_msg_overwrite + 476
3   libsystem_kernel.dylib        	       0x1859ad178 mach_msg + 24
4   CoreFoundation                	       0x185acd680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x185acbf44 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x185acb434 CFRunLoopRunSpecific + 608
7   HIToolbox                     	       0x19027519c RunCurrentEventLoopInMode + 292
8   HIToolbox                     	       0x190274fd8 ReceiveNextEventCommon + 648
9   HIToolbox                     	       0x190274d30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
10  AppKit                        	       0x18932acc8 _DPSNextEvent + 660
11  AppKit                        	       0x189b214d0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
12  libgdk-3.0.dylib              	       0x105b44914 poll_func + 184
13  libglib-2.0.0.dylib           	       0x106185d98 g_main_context_iterate_unlocked + 296
14  libglib-2.0.0.dylib           	       0x106185e60 g_main_context_iteration + 60
15  libgio-2.0.0.dylib            	       0x106bcb080 g_application_run + 528
16  .ART.bin                      	       0x104ba6f7c main + 4872
17  dyld                          	       0x185663154 start + 2476

Thread 1:
0   libsystem_kernel.dylib        	       0x1859b05ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1859ee55c _pthread_cond_wait + 1228
2   libc++.1.dylib                	       0x185913b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   .ART.bin                      	       0x104e6b028 rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()::operator()() const + 144
4   .ART.bin                      	       0x104e6aed8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()>>(void*) + 52
5   libsystem_pthread.dylib       	       0x1859edf94 _pthread_start + 136
6   libsystem_pthread.dylib       	       0x1859e8d34 thread_start + 8

Thread 2:
0   libsystem_kernel.dylib        	       0x1859b05ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1859ee55c _pthread_cond_wait + 1228
2   libc++.1.dylib                	       0x185913b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   .ART.bin                      	       0x104e6b028 rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()::operator()() const + 144
4   .ART.bin                      	       0x104e6aed8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()>>(void*) + 52
5   libsystem_pthread.dylib       	       0x1859edf94 _pthread_start + 136
6   libsystem_pthread.dylib       	       0x1859e8d34 thread_start + 8

Thread 3:
0   .ART.bin                      	       0x104d827f4 rtengine::CLUTApplication::CTL_init_lut(int) + 848
1   .ART.bin                      	       0x104d82544 rtengine::CLUTApplication::CTL_init_lut(int) + 160
2   .ART.bin                      	       0x104d8226c rtengine::CLUTApplication::CTL_set_params(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<double, std::__1::allocator<double>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::vector<double, std::__1::allocator<double>>>>> const&, rtengine::CLUTApplication::Quality) + 2796
3   .ART.bin                      	       0x104fa0ff8 rtengine::ImProcFunctions::colorCorrection(rtengine::Imagefloat*) + 4464
4   .ART.bin                      	       0x104e68cac rtengine::ImProcFunctions::process(rtengine::ImProcFunctions::Pipeline, rtengine::ImProcFunctions::Stage, rtengine::Imagefloat*) + 876
5   .ART.bin                      	       0x104f6b588 rtengine::Thumbnail::processImage(rtengine::procparams::ProcParams const&, rtengine::SensorType, int, rtengine::TypeInterpolation, rtengine::FramesMetaData const*, double&, bool, bool) + 3240
6   .ART.bin                      	       0x104c88bfc Thumbnail::processThumbImage(rtengine::procparams::ProcParams const&, int, double&) + 596
7   .ART.bin                      	       0x104c82978 ThumbImageUpdater::Impl::processNextJob() + 348
8   .ART.bin                      	       0x104a71770 std::__1::packaged_task<void ()>::operator()() + 80
9   .ART.bin                      	       0x104e6b0d0 rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()::operator()() const + 312
10  .ART.bin                      	       0x104e6aed8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()>>(void*) + 52
11  libsystem_pthread.dylib       	       0x1859edf94 _pthread_start + 136
12  libsystem_pthread.dylib       	       0x1859e8d34 thread_start + 8

Thread 4 Crashed:
0   .ART.bin                      	       0x105010b98 Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const + 60
1   .ART.bin                      	       0x105011b54 Ctl::SimdLoopInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const + 184
2   .ART.bin                      	       0x105010bc0 Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const + 100
3   .ART.bin                      	       0x10507d2a8 Ctl::SimdXContext::run(int, Ctl::SimdInst const*) + 100
4   .ART.bin                      	       0x10500f9fc Ctl::SimdFunctionCall::callFunction(unsigned long) + 144
5   .ART.bin                      	       0x104d82de0 rtengine::CLUTApplication::CTL_init_lut(int) + 2364
6   .ART.bin                      	       0x104d8226c rtengine::CLUTApplication::CTL_set_params(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<double, std::__1::allocator<double>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::vector<double, std::__1::allocator<double>>>>> const&, rtengine::CLUTApplication::Quality) + 2796
7   .ART.bin                      	       0x104fa0ff8 rtengine::ImProcFunctions::colorCorrection(rtengine::Imagefloat*) + 4464
8   .ART.bin                      	       0x104e68cac rtengine::ImProcFunctions::process(rtengine::ImProcFunctions::Pipeline, rtengine::ImProcFunctions::Stage, rtengine::Imagefloat*) + 876
9   .ART.bin                      	       0x104f6b588 rtengine::Thumbnail::processImage(rtengine::procparams::ProcParams const&, rtengine::SensorType, int, rtengine::TypeInterpolation, rtengine::FramesMetaData const*, double&, bool, bool) + 3240
10  .ART.bin                      	       0x104c88bfc Thumbnail::processThumbImage(rtengine::procparams::ProcParams const&, int, double&) + 596
11  .ART.bin                      	       0x104c82978 ThumbImageUpdater::Impl::processNextJob() + 348
12  .ART.bin                      	       0x104a71770 std::__1::packaged_task<void ()>::operator()() + 80
13  .ART.bin                      	       0x104e6b0d0 rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()::operator()() const + 312
14  .ART.bin                      	       0x104e6aed8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()>>(void*) + 52
15  libsystem_pthread.dylib       	       0x1859edf94 _pthread_start + 136
16  libsystem_pthread.dylib       	       0x1859e8d34 thread_start + 8

Thread 5:
0   libsystem_kernel.dylib        	       0x1859b05ec __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1859ee55c _pthread_cond_wait + 1228
2   libc++.1.dylib                	       0x185913b14 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   .ART.bin                      	       0x104e6b028 rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()::operator()() const + 144
4   .ART.bin                      	       0x104e6aed8 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, rtengine::ThreadPool::ThreadPool(unsigned long)::'lambda'()>>(void*) + 52
5   libsystem_pthread.dylib       	       0x1859edf94 _pthread_start + 136
6   libsystem_pthread.dylib       	       0x1859e8d34 thread_start + 8

Deleting the ~/.cache/ART/data folder allowed ART to start normally.

It the same type of crash and behaviour I have with my own builds.

Hi,
Thanks for the info. Do you still have the sidecar that triggers this perhaps?

This sidecar file provokes crashes, the ART window appears just a fraction of a second bfore crashing, but it doesn’t crash if I remove the arp file or if I clear the cache.
DSCF6278.RAF.arp (14.5 KB)

Thanks. Unfortunately, I seem unable to reproduce this on an Intel mac running macOS 12 :frowning:
Are you able to try a debug build and produce a full backtrace perhaps?

I’ll try a debug build, but I’m not familiar with the debugging tools for MacOS. Since I have Xcode command line tools installed, is using lldb the way to go for producing a full backtrace?

Edit: I think I found the commands equivalent to a GDB full backtrace using (lldb) thread backtrace all and `(lldb) bt all

Working as normal, thanks!

1 Like

Hi Alberto, here’s a full backtrace from a new debug build, using lldb.
lldb-bt-1.txt (106.7 KB)

Description of the behaviour:

  • apply CTL’s to an image
  • close ART
  • launch ART → instant crash as soon as I navigate to the image’s folder (i.e. ART doesn’t crash when it loads another folder, but only when it wants to access to the folder containg the culprit sidecar)
  • delete the culprit sidecar → ART doesn’t when accessing to the same folder
1 Like

Thanks! But are you sure you have all debug symbols in the executable (and possibly also in the CTL library itself)? I don’t see any source code info in the backtrace – though I am not really familiar with lldb I presume it ought to be there if available…

Indeed I didn’t recompile CTL, so it was a release build.
I just tried but there’s no “Debug” option in CTL, only address sanitizing (i.e. -DCMAKE_BUILD_TYPE="asan"). I made an “asan” build but apparently ART fails linking against this CTL build:

Undefined symbols for architecture arm64:
  "___asan_alloca_poison", referenced from:
      Ctl::CtlExc::_explain(char const*, char*) in libIlmCtl.a[4](CtlExc.cpp.o)
      Ctl::CtlExc::_explain(char const*, char*) in libIlmCtl.a[4](CtlExc.cpp.o)
  "___asan_allocas_unpoison", referenced from:
      Ctl::CtlExc::_explain(char const*, char*) in libIlmCtl.a[4](CtlExc.cpp.o)
  "___asan_handle_no_return", referenced from:
      std::__1::basic_ostream<char, std::__1::char_traits<char>>& std::__1::__put_character_sequence[abi:ue170006]<char, std::__1::char_traits<char>>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, unsigned long) in libIlmCtlSimd.a[2](CtlSimdAddr.cpp.o)
      std::__1::ostreambuf_iterator<char, std::__1::char_traits<char>> std::__1::__pad_and_output[abi:ue170006]<char, std::__1::char_traits<char>>(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char>>, char const*, char const*, char const*, std::__1::ios_base&, char) in libIlmCtlSimd.a[2](CtlSimdAddr.cpp.o)
      std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__throw_length_error[abi:ue170006]() const in libIlmCtlSimd.a[2](CtlSimdAddr.cpp.o)
      std::__1::__throw_length_error[abi:ue170006](char const*) in libIlmCtlSimd.a[2](CtlSimdAddr.cpp.o)
      Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      Ctl::RcPtr<Ctl::FunctionArg>::~RcPtr() in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      std::__1::vector<Ctl::RcPtr<Ctl::FunctionArg>, std::__1::allocator<Ctl::RcPtr<Ctl::FunctionArg>>>::~vector[abi:ue170006]() in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      ...
  "___asan_init", referenced from:
      _asan.module_ctor in libIlmCtlSimd.a[2](CtlSimdAddr.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[4](CtlSimdHalfExpLog.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[5](CtlSimdInst.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[6](CtlSimdInterpreter.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[7](CtlSimdLContext.cpp.o)
      _asan.module_ctor in libIlmCtlSimd.a[8](CtlSimdModule.cpp.o)
      ...
  "___asan_memcpy", referenced from:
      Ctl::SimdFunctionArg::SimdFunctionArg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, Ctl::FunctionCall*, Ctl::RcPtr<Ctl::DataType> const&, bool, Ctl::SimdReg*) in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      Ctl::SimdFunctionArg::setDefaultValue() in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      Ctl::SimdFunctionArg::setDefaultValue() in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*> std::__1::__uninitialized_allocator_move_if_noexcept[abi:ue170006]<std::__1::allocator<Ctl::RcPtr<Ctl::FunctionArg>>, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>>(std::__1::allocator<Ctl::RcPtr<Ctl::FunctionArg>>&, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>, std::__1::reverse_iterator<Ctl::RcPtr<Ctl::FunctionArg>*>) in libIlmCtlSimd.a[3](CtlSimdFunctionCall.cpp.o)
      Ctl::SimdBranchInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const in libIlmCtlSimd.a[5](CtlSimdInst.cpp.o)
      Ctl::SimdCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const in libIlmCtlSimd.a[5](CtlSimdInst.cpp.o)
      Ctl::SimdPushStringLiteralInst::SimdPushStringLiteralInst(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int) in libIlmCtlSimd.a[5](CtlSimdInst.cpp.o)

  [ ... ]

ld: symbol(s) not found for architecture arm64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [rtgui/ART] Error 1
make[1]: *** [rtgui/CMakeFiles/art.dir/all] Error 2
make: *** [all] Error 2

Hmmm… “Debug” is a standard CMake option, it should definitely be there. Just set CMAKE_BUILD_TYPE=Debug in CMakeCache.txt and it should work.
But on any case, it seems that for some reason there’s no source code info in your backtrace, and without that it’s really hard to figure out what is going on.
But on a different note, did you try running a x64 build using Rosetta and see if that also crashes in the same way?

I’ll try making an x86 ART build, and also Debug build of CTL and report back.

1 Like

Actually, one other thing you could try doing is building art with address sanitizer (use WITH_SAN=address in CMakeCache.txt) and see if that catches anything…