# Mac build runs on one computer but not another

**URL:** https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418
**Category:** macOS
**Created:** [22 June 2021 17:20 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418 "2021-06-22T17:20:18Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)
#### Post date: [22 June 2021 17:20 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/1 "2021-06-22T17:20:18Z")

</div>

I’m in the final stages of preparing support for macOS and had an issue I’m unsure of how to solve. On my personal Mac, the build works fine - but on a school computer, it crashes the DAW immediately.

My Mac:

 ![mac](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/1a909ed079b8933d11848f8cc8492a658f1bea1f.jpeg)

Other Mac:

 ![IMG_8437](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/d2b37f016dd5adb8ba95716eac5f2e42ce736c47.jpeg)

My first guess is that the OS difference is causing errors with some internal APIs or something - but I won’t be able to build the product on the school computer because it is not mine (is there a way to do it on mine?).

This is the last thing I need to fix before release. Thanks for any help!

Edit: I’ve ran `lipo` on the terminal to check whether the binary is universal and got this:  
`x86_64 arm64` - which should be universal…?

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [22 June 2021 18:42 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/2 "2021-06-22T18:42:46Z")

</div>

It might be because metal is not supported on that machine

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [22 June 2021 18:43 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/3 "2021-06-22T18:43:32Z")

</div>

The solution to that is to build using skia CPU mode, The instructions are on the wiki

---

<div class="post-metadata">

### Author: ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)
#### Post date: [23 June 2021 23:43 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/4 "2021-06-23T23:43:43Z")

</div>

I ran into a collection of similar errors while compiling for Skia -

 ![Screen Shot 2021-06-23 at 7.40.53 PM](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/73b4cdfed33ee6d54ca07bedcf14ad2e1b80f6f0.png)  
Any idea on how to fix this?

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [24 June 2021 07:41 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/5 "2021-06-24T07:41:15Z")

</div>

Because the skia static library still contains the Metal backend, you still need to link against the Metal framework, e.g.

> <https://github.com/iPlug2/iPlug2/blob/master/Examples/IPlugEffect/config/IPlugEffect-mac.xcconfig#L20>

---

<div class="post-metadata">

### Author: ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)
#### Post date: [24 June 2021 13:28 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/6 "2021-06-24T13:28:39Z")

</div>

Thanks - however now I am getting a crash upon opening the plugin in Garageband.

```auto
Process: GarageBand [8069]
Path: /Applications/GarageBand.app/Contents/MacOS/GarageBand
Identifier: com.apple.garageband10
Version: 10.4.3 (5433)
Build Info: MALogic-5433000000000000~4 (10Q107)
App Item ID: 682658836
App External ID: 840921930
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: GarageBand [8069]
User ID: 502

PlugIn Path: /Library/Audio/Plug-Ins/Components/SK100.component/Contents/MacOS/SK100
PlugIn Identifier: com.SNFK_MUSIC.audiounit.SK100
PlugIn Version: 1.0.0 (1.0.0)

Date/Time: 2021-06-24 09:20:56.440 -0400
OS Version: macOS 11.4 (20F71)
Report Version: 12
Anonymous UUID: 9562E7B3-B1E1-8700-16F7-BDCB51124D53

Sleep/Wake UUID: 03E9627D-0295-4F55-903D-B672C4EF72E2

Time Awake Since Boot: 11000 seconds
Time Since Wake: 1300 seconds

System Integrity Protection: enabled

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

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [8069]

VM Regions Near 0x18:
--> 
    __TEXT 10ec5c000-110410000 [23.7M] r-x/r-x SM=COW /Applications/GarageBand.app/Contents/MacOS/GarageBand

Application Specific Information:
Belfast | da24e8065c7277eca31f326df90a56b21e93bc2197bc03752f8385706f4718f4 | 1667e55a51193c352d8c1356813850f4fe3fb45b | 2021-03-29_13:46:39
 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.SNFK_MUSIC.audiounit.SK100	0x000000012cf7a5e3 iplug::igraphics::APIBitmap::GetScale() const + 0 (IGraphicsPrivate.h:143) [inlined]
1 com.SNFK_MUSIC.audiounit.SK100	0x000000012cf7a5e3 iplug::igraphics::IGraphics::LoadBitmap(char const*, int, bool, int) + 595 (IGraphics.cpp:1743)
2 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfdf42d SK100::SK100(iplug::InstanceInfo const&)::$_1::operator()(iplug::igraphics::IGraphics*) const + 824 (SK100.cpp:64) [inlined]
3 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfdf42d decltype(std::__1::forward<SK100::SK100(iplug::InstanceInfo const&)::$_1&>(fp)(std::__1::forward<iplug::igraphics::IGraphics*>(fp0))) std:: __1::__ invoke<SK100::SK100(iplug::InstanceInfo const&)::$_1&, iplug::igraphics::IGraphics*>(SK100::SK100(iplug::InstanceInfo const&)::$_1&, iplug::igraphics::IGraphics*&&) + 824 (type_traits:3750) [inlined]
4 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfdf42d void std:: __1::__ invoke_void_return_wrapper<void>::__call<SK100::SK100(iplug::InstanceInfo const&)::$_1&, iplug::igraphics::IGraphics*>(SK100::SK100(iplug::InstanceInfo const&)::$_1&, iplug::igraphics::IGraphics*&&) + 824 (__functional_base:348) [inlined]
5 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfdf42d std:: __1::__ function::__alloc_func<SK100::SK100(iplug::InstanceInfo const&)::$_1, std::__1::allocator<SK100::SK100(iplug::InstanceInfo const&)::$_1>, void (iplug::igraphics::IGraphics*)>::operator()(iplug::igraphics::IGraphics*&&) + 824 (functional:1554) [inlined]
6 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfdf42d std:: __1::__ function::__func<SK100::SK100(iplug::InstanceInfo const&)::$_1, std::__1::allocator<SK100::SK100(iplug::InstanceInfo const&)::$_1>, void (iplug::igraphics::IGraphics*)>::operator()(iplug::igraphics::IGraphics*&&) + 861 (functional:1728)
7 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfa3f52 std:: __1::__ function::__value_func<void (iplug::igraphics::IGraphics*)>::operator()(iplug::igraphics::IGraphics*&&) const + 10 (functional:1881) [inlined]
8 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfa3f52 std::__1::function<void (iplug::igraphics::IGraphics*)>::operator()(iplug::igraphics::IGraphics*) const + 10 (functional:2556) [inlined]
9 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfa3f52 iplug::igraphics::IGEditorDelegate::LayoutUI(iplug::igraphics::IGraphics*) + 34 (IGraphicsEditorDelegate.h:71)
10 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfd5fbc iplug::igraphics::IGraphicsMac::OpenWindow(void*) + 268 (IGraphicsMac.mm:102)
11 com.SNFK_MUSIC.audiounit.SK100	0x000000012cfb2b7f -[SK100_View uiViewForAudioUnit:withSize:] + 95 (IPlugAU_view_factory.mm:60)

```

Here’s my mac config:

```auto
// ------------------------------
// HEADER AND LIBRARY SEARCH PATHS
EXTRA_INC_PATHS = $(IGRAPHICS_INC_PATHS)
EXTRA_LIB_PATHS = $(IGRAPHICS_LIB_PATHS)
EXTRA_LNK_FLAGS = -framework Metal -framework MetalKit -framework OpenGL -framework WebKit $(IGRAPHICS_LNK_FLAGS)

// EXTRA_APP_DEFS =
// EXTRA_PLUGIN_DEFS =

//------------------------------
// PREPROCESSOR MACROS
EXTRA_ALL_DEFS = OBJC_PREFIX=vSK100 SWELL_APP_PREFIX=Swell_vSK100 IGRAPHICS_SKIA IGRAPHICS_CPU
//EXTRA_DEBUG_DEFS =
//EXTRA_RELEASE_DEFS =
//EXTRA_TRACER_DEFS =

//------------------------------
// RELEASE BUILD OPTIONS

```

Any ideas on fixing this?

Edit: I removed all of my controls that moved and got it working - I’m guessing this thread will help

> [@Problems with distribution](https://iplug2.discourse.group/t/problems-with-distribution/203):
>
> Hello Guys, Please really help with understanding it. Responsible: Logic Pro X [37599] User ID: 501 PlugIn Path: /Library/Audio/Plug-Ins/Components/plugin.component/Contents/MacOS/plugin PlugIn Identifier: com.test.audiounit.plugin PlugIn Version: 1.0.0 (1.0.0) Date/Time: 2020-XX-XX 11:23:33.212 OS Version: Mac OS X 10.15.4 (19E266) Report Version: 12 Anonymous UUID: Sleep/Wake UUID: Time Awake Since …

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [28 June 2021 19:34 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/7 "2021-06-28T19:34:00Z")

</div>

Sadly I don’t think SKIA CPU is currently a viable option on macOS. Blitting on a retina screen is just too slow. I tried your plug-in and the UI crawls with Skia CPU.

For info on how hard Apple makes this…  
[https://1014.org/?article=802](https://1014.org/?article=802)

and

> **[KVR Forum: Quartz/CoreGraphics is broken. What to do now? - DSP and Plug-in...](https://www.kvraudio.com/forum/viewtopic.php?t=521827)**
>
> KVR Audio Forum - Quartz/CoreGraphics is broken. What to do now? - DSP and Plug-in Development Forum

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [28 June 2021 19:43 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/8 "2021-06-28T19:43:00Z")

</div>

Using IGRAPHICS\_GL3 instead of IGRAPHICS\_METAL may be an option, if you really must support this machine

---

<div class="post-metadata">

### Author: ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)
#### Post date: [28 June 2021 20:05 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/9 "2021-06-28T20:05:23Z")

</div>

Actually debugging SKIA CPU with your plugin I have come across a very strange behaviour. Somehow using a different bitmap for each knob is affecting the frame rate!

---

<div class="post-metadata">

### Author: ![snfk](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/snfk/32/140_2.png) [@snfk](https://iplug2.discourse.group/u/snfk)
#### Post date: [14 July 2021 01:28 UTC](https://iplug2.discourse.group/t/mac-build-runs-on-one-computer-but-not-another/418/10 "2021-07-14T01:28:04Z")

</div>

Hmmm, interesting. I just tested another product with only 5 knobs on a school computer and got a relatively usable frame rate compared to the other one.

I suppose there’s a nice line in the middle between realism and performance, and performance is more important. I’ve been meaning to build a little framework for brand recognition using vector graphics anyway lol.

Aside from changing the renderer to Skia, I also ended up creating @2x files for my assets and that fixed all of the crashing on the school Mac. I’m seeing pretty good results now, thanks for your work!
