# Problems with distribution

**URL:** <https://iplug2.discourse.group/t/problems-with-distribution/203>\
**Category:** macOS\
**Created:** [1 September 2020 17:36 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203 "2020-09-01T17:36:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [1 September 2020 17:36 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/1 "2020-09-01T17:36:30Z")

</div>

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 Boot: 1100000 seconds  
> Time Since Wake: 340000 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 0x0000000000000020  
> Exception Note: EXC\_CORPSE\_NOTIFY

> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread  
> 0 com.plugin.audiounit.test 0x0000000131a52ba6 SkSurface::getCanvas() + 6  
> 1 com.plugin.audiounit.test 0x00000001318da86e iplug::igraphics::IGraphicsSkia::UpdateLayer() + 142  
> 2 com.plugin.audiounit.test 0x00000001317ea3f1 iplug::igraphics::IGraphics::PushLayer(iplug::igraphics::ILayer\*) + 65  
> 3 com.plugin.audiounit.test 0x00000001317e9e18 iplug::igraphics::IGraphics::StartLayer(iplug::igraphics::IControl\*, iplug::igraphics::IRECT const&) + 488  
> 4 com.plugin.audiounit.test 0x00000001317e9aa2 iplug::igraphics::IGraphics::ScaleBitmap(iplug::igraphics::IBitmap const&, char const\*, int) + 274  
> 5 com.plugin.audiounit.test 0x00000001317e903f iplug::igraphics::IGraphics::LoadBitmap(char const\*, int, bool, int) + 1055

I signed component & installer and notarized it. There are no problems with the signature. As soon as I open the plugin on another device I get this problem.

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [1 September 2020 17:55 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/2 "2020-09-01T17:55:41Z")

</div>

Nothing to do with notarisation - it’s trying to open a UI and are loading a bitmap which is not at the same scale as the machine. iPlug2 attempts to scale it using the graphics backend (skia) but something in skia fails on the machine you are testing on.

This might be an iplug2 bug, or it might be to do with the hardware you are running on - not sure - whatever it is is capable of running Catalina, so I assume it can’t be that old. Hard to say more without being able to reproduce.

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [3 September 2020 07:22 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/3 "2020-09-03T07:22:09Z")

</div>

MyGraphics code:

> **static**  **void** extracted(iplug::igraphics::IGraphics \*pGraphics) {
> 
> pGraphics-\>AttachPanelBackground(COLOR\_GRAY);
> 
> pGraphics-\>LoadFont(“Roboto-Regular”, ROBOTO\_FN);
> 
> **const** IRECT b = pGraphics-\>GetBounds();
> 
> IBitmap bitmap = pGraphics-\>LoadBitmap(BG\_FN);
> 
> pGraphics-\>AttachControl( **new** IBitmapControl(0, 0, bitmap));
> 
> bitmap = pGraphics-\>LoadBitmap(METER\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBitmapControl(kMeterL\_X, kMeterL\_Y, bitmap, kOnOff));
> 
> bitmap = pGraphics-\>LoadBitmap(RMETER\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBitmapControl(kMeterR\_X, kMeterR\_Y, bitmap, kOnOff));
> 
> bitmap = pGraphics-\>LoadBitmap(ARROW\_FN, kKnob\_N);
> 
> pGraphics-\>AttachControl( **new** IBitmapControl(kMeterL\_X, kMeterL\_Y, bitmap, kL));
> 
> pGraphics-\>AttachControl( **new** IBitmapControl(kMeterR\_X, kMeterR\_Y, bitmap, kR));
> 
> bitmap = pGraphics-\>LoadBitmap(TOGGLE\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBSwitchControl(kLED\_X, kLED\_Y, bitmap, kOnOff));
> 
> bitmap = pGraphics-\>LoadBitmap(POWER\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBSwitchControl(kOnOffX, kOnOffY, bitmap, kOnOff));
> 
> bitmap = pGraphics-\>LoadBitmap(FADER\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBSwitchControl(kLinkX, kLinkY, bitmap, kLink));
> 
> bitmap = pGraphics-\>LoadBitmap(MS\_FN, kSwitch\_N);
> 
> pGraphics-\>AttachControl( **new** IBSwitchControl(kMSLRX, kMSLRY, bitmap, kMSLR));
> 
> bitmap = pGraphics-\>LoadBitmap(KNOB\_FN, kKnob\_N);
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kIn1\_X, kIn1\_Y + 128, kIn1\_X + 128, kIn1\_Y + 158), kIn1, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kIn1\_X, kIn1\_Y, kIn1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kIn2\_X, kIn2\_Y + 128, kIn2\_X + 128, kIn2\_Y + 158), kIn2, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kIn2\_X, kIn2\_Y, kIn2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kThresh1\_X, kThresh1\_Y + 128, kThresh1\_X + 128, kThresh1\_Y + 158), kThreshold1, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kThresh1\_X, kThresh1\_Y, kThreshold1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kThresh2\_X, kThresh2\_Y + 128, kThresh2\_X + 128, kThresh2\_Y + 158), kThreshold2, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kThresh2\_X, kThresh2\_Y, kThreshold2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kRatio1\_X, kRatio1\_Y + 128, kRatio1\_X + 128, kRatio1\_Y + 158), kRatio1, &bitmap, 24, 2));
> 
> pGraphics-\>AttachControl( **new** Knob(kRatio1\_X, kRatio1\_Y, kRatio1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kRatio2\_X, kRatio2\_Y + 128, kRatio2\_X + 128, kRatio2\_Y + 158), kRatio2, &bitmap, 24, 2));
> 
> pGraphics-\>AttachControl( **new** Knob(kRatio2\_X, kRatio2\_Y, kRatio2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kAttack1\_X, kAttack1\_Y + 128, kAttack1\_X + 128, kAttack1\_Y + 158), kAttack1, &bitmap, 24, 1));
> 
> pGraphics-\>AttachControl( **new** Knob(kAttack1\_X, kAttack1\_Y, kAttack1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kAttack2\_X, kAttack2\_Y + 128, kAttack2\_X + 128, kAttack2\_Y + 158), kAttack2, &bitmap, 24, 1));
> 
> pGraphics-\>AttachControl( **new** Knob(kAttack2\_X, kAttack2\_Y, kAttack2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kRelease1\_X, kRelease1\_Y + 128, kRelease1\_X + 128, kRelease1\_Y + 158), kRelease1, &bitmap, 24, 1));
> 
> pGraphics-\>AttachControl( **new** Knob(kRelease1\_X, kRelease1\_Y, kRelease1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kRelease2\_X, kRelease2\_Y + 128, kRelease2\_X + 128, kRelease2\_Y + 158), kRelease2, &bitmap, 24, 1));
> 
> pGraphics-\>AttachControl( **new** Knob(kRelease2\_X, kRelease2\_Y, kRelease2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kOut1\_X, kOut1\_Y + 128, kOut1\_X + 128, kOut1\_Y + 158), kOut1, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kOut1\_X, kOut1\_Y, kOut1, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kOut2\_X, kOut2\_Y + 128, kOut2\_X + 128, kOut2\_Y + 158), kOut2, &bitmap, 24, 0));
> 
> pGraphics-\>AttachControl( **new** Knob(kOut2\_X, kOut2\_Y, kOut2, bitmap));
> 
> pGraphics-\>AttachControl( **new** IKnobMultiControlText(IRECT(kMixX, kMixY + 128, kMixX + 128, kMixY + 158), kMix, &bitmap, 24, 1));
> 
> pGraphics-\>AttachControl( **new** Knob(kMixX, kMixY, kMix, bitmap));
> 
> }

Do I do everything correctly in this part of the code?

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [3 September 2020 08:08 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/4 "2020-09-03T08:08:31Z")

</div>

That looks fine - I don’t think this is a bug in your code.

Can you please try:

1 - compile with NanoVG instead of Skia and test again  
2 - Instead of IGRAPHICS\_SKIA IGRAPHICS\_METAL please also try with IGRAPHICS\_SKIA IGRAPHICS\_CPU and test again

Knowing what happens in these cases will give a clearer idea of what the issue might be.

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [3 September 2020 08:32 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/5 "2020-09-03T08:32:36Z")

</div>

I changed:

EXTRA\_ALL\_DEFS = OBJC\_PREFIX=vIPlugEffect SWELL\_APP\_PREFIX=Swell\_vIPlugEffect IGRAPHICS\_SKIA IGRAPHICS\_GL3 IGRAPHICS\_VSYNC

to

EXTRA\_ALL\_DEFS = OBJC\_PREFIX=vIPlugEffect SWELL\_APP\_PREFIX=Swell\_vIPlugEffect IGRAPHICS\_SKIA IGRAPHICS\_CPU

it works. Thanks!!

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [3 September 2020 08:44 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/6 "2020-09-03T08:44:14Z")

</div>

OK - thanks - then there is some issue with GL3 graphics on Mac - Can you add an issue to GitHub here - (if necessary just link to this post with a brief description)?

> **[iPlug2/iPlug2](https://github.com/iPlug2/iPlug2/issues)**
>
> C++ Audio Plug-in Framework for desktop, mobile and web \[PRE-RELEASE\] - iPlug2/iPlug2

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [3 September 2020 11:20 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/7 "2020-09-03T11:20:18Z")

</div>

> [@SKyZz](#):
>
> IGRAPHICS\_SKIA IGRAPHICS\_GL3 IGRAPHICS\_VSYNC

I attached our topic for this issue in GitHub.

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [30 September 2020 14:22 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/8 "2020-09-30T14:22:03Z")

</div>

IGRAPHICS\_SKIA IGRAPHICS\_CPU - lags  
IGRAPHICS\_SKIA IGRAPHICS\_GL3(2) - crash  
IGRAPHICS\_SKIA IGRAPHICS\_METAL - crash

macOS Catalina

---

<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:** [30 September 2020 16:32 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/9 "2020-09-30T16:32:23Z")

</div>

You will have to provide more detailed info about the system and code if you expect us to even consider this. It’s not worth posting anything like this if you don’t provide a lot of details - how do we know you didn’t do something really crazy in your code or perhaps you are trying to run it on a really low spec system ?

Try to be as methodical as possible when reporting a problem. If something crashes, debug it and provide a crash report. If something is slow, profile it and find out where it is slow

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [30 September 2020 16:54 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/10 "2020-09-30T16:54:26Z")

</div>

> [@olilarkin](#):
>
> You will have to provide more detailed info about the system and code if you expect us to even consider this. It’s not worth posting anything like this if you don’t provide a lot of details - how do we know you didn’t do something really crazy in your code or perhaps you are trying to run it on a really low spec system ?
> 
> Try to be as methodical as possible when reporting a problem. If something crashes, debug it and provide a crash report. If something is slow, profile it and find out where it is slow

> [@olilarkin](#):
>
> You will have to provide more detailed info about the system and code if you expect us to even consider this. It’s not worth posting anything like this if you don’t provide a lot of details - how do we know you didn’t do something really crazy in your code or perhaps you are trying to run it on a really low spec system ?
> 
> Try to be as methodical as possible when reporting a problem. If something crashes, debug it and provide a crash report. If something is slow, profile it and find out where it is slow

Test machine:

![Screen Shot 2020-09-30 at 19.39.16](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/b6251c4e2c0df94bcd565cb4a5239477ec16a3ce.png)

 ![Screen Shot 2020-09-30 at 19.39.36](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/6f03675045859b4417e8c93ed94eb7fbe3bd3a7a.png)

set graphics:

> EXTRA\_ALL\_DEFS = OBJC\_PREFIX=vIPlugEffect SWELL\_APP\_PREFIX=Swell\_vIPlugEffect IGRAPHICS\_SKIA IGRAPHICS\_METAL

code:

> ```
> #include "TEST.h"
> #include "IPlug_include_in_plug_src.h"
> #include "IControls.h"
> 
> #include "../../WDL/resample.cpp"
> 
> const int kNumPrograms = 2;
> bool linkflag = false;
> 
> void TEST::OnReset()
> {
> }
> 
> TEST::TEST(InstanceInfo instanceInfo)
> : Plugin(instanceInfo, MakeConfig(kNumParams, kNumPrograms))
> {
> GetParam(kIn1)->InitDouble("IN 1", 0.0, -24.0, 24.0, 0.001, "dB", IParam::kFlagMeta, "");
> GetParam(kIn2)->InitDouble("IN 2", 0.0, -24.0, 24.0, 0.001, "dB", IParam::kFlagMeta, "");
> GetParam(kOut1)->InitDouble("OUT 1", 0.0, -24.0, 24.0, 0.001, "dB", IParam::kFlagMeta, "");
> GetParam(kOut2)->InitDouble("OUT 2", 0.0, -24.0, 24.0, 0.001, "dB", IParam::kFlagMeta, "");
> GetParam(kThreshold1)->InitDouble("THRESHOLD 1", 0.0, -24.0, 0, 0.001, "dB", IParam::kFlagMeta, "");
> mComp1.setThresh(0.0);
> GetParam(kThreshold2)->InitDouble("THRESHOLD 2", 0.0, -24.0, 0, 0.001, "dB", IParam::kFlagMeta, "");
> mComp2.setThresh(0.0);
> GetParam(kRatio1)->InitDouble("RATIO 1", 4.0, 1.0, 9.0, 0.001, "dB", IParam::kFlagMeta, "");
> mComp1.setRatio(4.0);
> GetParam(kRatio2)->InitDouble("RATIO 2", 4.0, 1.0, 9.0, 0.001, "dB", IParam::kFlagMeta, "");
> mComp2.setRatio(4.0);
> GetParam(kAttack1)->InitDouble("ATTACK 1", 0.1, 0.1, 1000.0, 0.001, "ms", IParam::kFlagMeta, "", IParam::ShapePowCurve(1.));
> mComp1.setAttack(1.0);
> GetParam(kAttack2)->InitDouble("ATTACK 2", 0.1, 0.1, 1000.0, 0.001, "ms", IParam::kFlagMeta, "", IParam::ShapePowCurve(1.));
> mComp2.setAttack(4.0);
> GetParam(kRelease1)->InitDouble("RELEASE 1", 250.0, 1.0, 1000.0, 0.001, "ms", IParam::kFlagMeta, "", IParam::ShapePowCurve(1.));
> mComp1.setRelease(250.0);
> GetParam(kRelease2)->InitDouble("RELEASE 2", 250.0, 1.0, 1000.0, 0.001, "ms", IParam::kFlagMeta, "", IParam::ShapePowCurve(1.));
> mComp2.setRelease(250.0);
> GetParam(kMix)->InitDouble("MIX", 100, 0, 100, 1, "%");
> 
>     
> GetParam(kLink)->InitEnum("OnOff", kOn, OnOff, "");
> GetParam(kLink)->InitEnum("Link", kLinkOn, Link, "");
> GetParam(kMSLR)->InitEnum("L/R | M/S", kLR, MSLR, "");
> GetParam(kOnOff)->SetDisplayText(kOn, "On");
> GetParam(kOnOff)->SetDisplayText(kOff, "Off");
> GetParam(kLink)->SetDisplayText(kLinkOn, "On");
> GetParam(kLink)->SetDisplayText(kLinkOff, "Off");
> GetParam(kMSLR)->SetDisplayText(kLR, "L/R");
> GetParam(kMSLR)->SetDisplayText(kMS, "M/S");
> 
> //MakePreset("preset 1", ... );
> MakeDefaultPreset((char*)"-", kNumPrograms);
> mMakeGraphicsFunc = [&]() {
> return MakeGraphics(*this, PLUG_WIDTH, PLUG_HEIGHT, PLUG_FPS, GetScaleForScreen(PLUG_HEIGHT));
> };
> mComp1.initRuntime();
> mComp1.setSampleRate(GetSampleRate());
> mComp2.initRuntime();
> mComp2.setSampleRate(GetSampleRate());
> mLayoutFunc = [&](IGraphics* pGraphics) {
> //pGraphics->AttachCornerResizer(EUIResizerMode::Scale, false);
> pGraphics->Resize(2640, 530, 0.58);
> pGraphics->AttachPanelBackground(COLOR_GRAY);
> pGraphics->LoadFont("Roboto-Regular", ROBOTO_FN);
> pGraphics->EnableMouseOver(true);
> pGraphics->AttachTextEntryControl();
> const IRECT b = pGraphics->GetBounds();
> IBitmap bitmap = pGraphics->LoadBitmap(BG_FN);
> pGraphics->AttachControl(new IBitmapControl(0, 0, bitmap));
> bitmap = pGraphics->LoadBitmap(METER_FN, kSwitch_N);
> pGraphics->AttachControl(new IBitmapControl(kMeterL_X, kMeterL_Y, bitmap, kOnOff));
> bitmap = pGraphics->LoadBitmap(RMETER_FN, kSwitch_N);
> pGraphics->AttachControl(new IBitmapControl(kMeterR_X, kMeterR_Y, bitmap, kOnOff));
> bitmap = pGraphics->LoadBitmap(ARROW_FN, kKnob_N);
> pGraphics->AttachControl(new IBitmapControl(kMeterL_X, kMeterL_Y, bitmap, kL));
> pGraphics->AttachControl(new IBitmapControl(kMeterR_X, kMeterR_Y, bitmap, kR));
> bitmap = pGraphics->LoadBitmap(TOGGLE_FN, kSwitch_N);
> pGraphics->AttachControl(new IBSwitchControl(kLED_X, kLED_Y, bitmap, kOnOff));
> bitmap = pGraphics->LoadBitmap(POWER_FN, kSwitch_N);
> pGraphics->AttachControl(new IBSwitchControl(kOnOffX, kOnOffY, bitmap, kOnOff));
> bitmap = pGraphics->LoadBitmap(FADER_FN, kSwitch_N);
> pGraphics->AttachControl(new IBSwitchControl(kLinkX, kLinkY, bitmap, kLink));
> bitmap = pGraphics->LoadBitmap(MS_FN, kSwitch_N);
> pGraphics->AttachControl(new IBSwitchControl(kMSLRX, kMSLRY, bitmap, kMSLR));
> pGraphics->AttachControl(new ITextControl(IRECT(kMSLRX, kIn2_Y + 135, kMSLRX + 130, kIn2_Y + 170), "L/R M/S", IText(34, COLOR_GRAY)));
> 
> bitmap = pGraphics->LoadBitmap(KNOB_FN, kKnob_N);
>       
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kIn1_X - 20, kIn1_Y - 20, kIn1_X + 150, kIn1_Y + 170), kIn1, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kIn2_X - 20, kIn2_Y - 20, kIn2_X + 150, kIn2_Y + 170), kIn2, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kThresh1_X-20, kThresh1_Y - 20, kThresh1_X + 150, kThresh1_Y + 170), kThreshold1, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kThresh2_X-20, kThresh2_Y - 20, kThresh2_X + 150, kThresh2_Y + 170), kThreshold2, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kRatio1_X - 20, kRatio1_Y - 20, kRatio1_X + 150, kRatio1_Y + 170), kRatio1, &bitmap, 34, 2));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kRatio2_X - 20, kRatio2_Y - 20, kRatio2_X + 150, kRatio2_Y + 170), kRatio2, &bitmap, 34, 2));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kAttack1_X - 20, kAttack1_Y - 20, kAttack1_X + 150, kAttack1_Y + 170), kAttack1, &bitmap, 34, 1));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kAttack2_X - 20, kAttack2_Y - 20, kAttack2_X + 150, kAttack2_Y + 170), kAttack2, &bitmap, 34, 1));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kRelease1_X - 20, kRelease1_Y - 20, kRelease1_X + 150, kRelease1_Y + 170), kRelease1, &bitmap, 34, 1));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kRelease2_X - 20, kRelease2_Y - 20, kRelease2_X + 150, kRelease2_Y + 170), kRelease2, &bitmap, 34, 1));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kOut1_X - 20, kOut1_Y - 20, kOut1_X + 150, kOut1_Y + 170), kOut1, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kOut2_X - 20, kOut2_Y - 20, kOut2_X + 150, kOut2_Y + 170), kOut2, &bitmap, 34, 0));
> pGraphics->AttachControl(new IKnobMultiControlText(pGraphics, IRECT(kMixX - 20, kMixY - 20, kMixX + 150, kMixY + 170), kMix, &bitmap, 34, 3));
> };
> }
> 
> void TEST::ProcessBlock(double **inputs, double** outputs, int nFrames)
> {
> 
> }
> 
> void TEST::OnIdle()
> {
> SendCurrentParamValuesFromDelegate();
> }
> 
> void TEST::OnParamChange(int paramIdx)
> {
> 
> }
> 
> ```

TEST.h code:

> #pragma comment(lib, “comctl32.lib”)
> 
> #include “IPlug\_include\_in\_plug\_hdr.h”  
> #include “IControls.h”  
> #include \<time.h\>  
> #include “TESTComp.h”  
> #include “HIIR/FPUUpsampler2x.h”  
> #include “Oversampler.h”  
> #include “config.h”
> 
> enum EParams {  
> kIn1 = 0,  
> …  
> };
> 
> …
> 
> enum ELayout  
> {  
> kWidth = PLUG\_WIDTH,  
> kHeight = PLUG\_HEIGHT,  
> kKnob\_N = 128,  
> kSwitch\_N = 2, // # of sub-bitmaps.  
> …  
> };
> 
> enum viewSets  
> {  
> defaultView, // Default view will always be at 0  
> };
> 
> using namespace iplug;  
> using namespace igraphics;
> 
> class TEST : public Plugin  
> {  
> public:
> 
> ```
> TEST(InstanceInfo instanceInfo);
> ~TEST() {} // Nothing to clean up.
> 
> // Implement these if your audio or GUI logic requires doing something
> // when params change or when audio processing stops/starts.
> void OnParamChange(int paramIdx);
> void OnReset();
> void OnIdle();
> void ProcessBlock(double **inputs, double** outputs, int nFrames)
> 
> ```
> 
> private:  
> iballroad\_TEST::SimpleComp mComp1, mComp2;  
> double prevL, prevR;  
> };  
> class IKnobMultiControlText : public IKnobControlBase  
> {  
> private:  
> IRECT mTextRECT, mImgRECT;  
> IBitmap mBitmap;  
> int defsize, flag, mParam;  
> char disp[20];  
> public:  
> IKnobMultiControlText(IGraphics\* pGraphics, IRECT pR,…  
> : IKnobControlBase(pR, paramIdx), mBitmap(\*pBitmap)  
> {  
> …  
> }
> 
> ```
> ~IKnobMultiControlText() {}
> 
> void Draw(IGraphics& pGraphics) override
> {
> ...
> }
> void OnMouseDown(float x, float y, const IMouseMod& mod) override
> {
> if (y > mRECT.T + 150) {
> ...
> GetUI()->CreateTextEntry(*this, mText, mTextRECT, disp);
> }
> else {
> IKnobControlBase::OnMouseDown(x, y, mod);
> }
> }
> 
> ```
> 
> };
> 
> // for 0 - 200 - 1000 Value example
> 
> struct ShapeAtk : public IParam::Shape  
> {  
> Shape\* Clone() const override { return new ShapeAtk(\*this); };  
> IParam::EDisplayType GetDisplayType() const override { return IParam::kDisplayLinear; }  
> double NormalizedToValue(double value, const IParam& param) const override;  
> double ValueToNormalized(double value, const IParam& param) const override;
> 
> double mShape;  
> };
> 
> double ShapeAtk::NormalizedToValue(double value, const IParam& param) const  
> {  
> double multiplier = value \> 0.5 ? multiplier = 200 + (value-0.5) \* 1600 : value \* 400;  
> return multiplier;  
> }
> 
> double ShapeAtk::ValueToNormalized(double value, const IParam& param) const  
> {  
> double multiplier = value \> 200 ? multiplier = 0.5 + (value - 200) / 1600 : value / 400;  
> return multiplier;  
> }

We’ve been trying to figure out what the problem is for a week. I hope this is more than described in detail, what we do in the code. Specifically, all graphics modes work on my machine. But as soon as I notarize the package and send it to the test bench, I get endless errors for everything except the CPU

---

<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:** [30 September 2020 17:02 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/11 "2020-09-30T17:02:54Z")

</div>

I can’t understand what notarising would have to do with it, but I’ll try soon

---

<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:** [30 September 2020 17:04 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/12 "2020-09-30T17:04:47Z")

</div>

I’ve heard of numerous developers who experience slow graphics on the 5k retina iMac’s

e.g [https://user.cockos.com/~deadbeef/index.php?article=697](https://user.cockos.com/~deadbeef/index.php?article=697)

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [30 September 2020 17:13 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/13 "2020-09-30T17:13:22Z")

</div>

But this does not explain one thing, why the plugin crashes when starting in any modes other than CPU

---

<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:** [30 September 2020 17:23 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/14 "2020-09-30T17:23:22Z")

</div>

Where does it crash?

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [30 September 2020 17:52 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/16 "2020-09-30T17:52:01Z")

</div>

So, when I trying to run plugin on test machine, that I present upper in a topic (macOS 10.15.6 5k), Logic and other apps in which I running this plugin is crashed.

> Crashed Thread: 0 Dispatch queue: com.apple.main-thread
> 
> Exception Type: EXC\_BAD\_ACCESS (SIGSEGV)  
> Exception Codes: KERN\_INVALID\_ADDRESS at 0x0000000000000020  
> Exception Note: EXC\_CORPSE\_NOTIFY
> 
> Termination Signal: Segmentation fault: 11  
> Termination Reason: Namespace SIGNAL, Code 0xb  
> Terminating Process: exc handler [49080]
> 
> VM Regions Near 0x20:  
> →   
> \_\_TEXT 000000010ef28000-000000011109c000 [33.5M] r-x/r-x SM=COW /Applications/Logic Pro X.app/Contents/MacOS/Logic Pro X
> 
> Application Specific Information:  
> MALondonIV | 55c921e417d7ea46dd67c836dd0d3ea5353ba77f7e81b63db63248334585cbae | 45b84f1d96484be8b35b202bcd817966285356bf | 2020-06-09\_13:15:32
> 
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread  
> 0 com.test.audiounit.scdw01 0x000000014107fc66 SkSurface::getCanvas() + 6  
> 1 com.test.audiounit.scdw01 0x0000000140f0829e iplug::igraphics::IGraphicsSkia::UpdateLayer() + 142  
> 2 com.test.audiounit.scdw01 0x0000000140e17c91 iplug::igraphics::IGraphics::PushLayer(iplug::igraphics::ILayer\*) + 65  
> 3 com.test.audiounit.scdw01 0x0000000140e176b8 iplug::igraphics::IGraphics::StartLayer(iplug::igraphics::IControl\*, iplug::igraphics::IRECT const&) + 488  
> 4 com.test.audiounit.scdw01 0x0000000140e17342 iplug::igraphics::IGraphics::ScaleBitmap(iplug::igraphics::IBitmap const&, char const\*, int) + 274  
> 5 com.test.audiounit.scdw01 0x0000000140e168df iplug::igraphics::IGraphics::LoadBitmap(char const\*, int, bool, int) + 1055  
> 6 com.test.audiounit.scdw01 0x0000000140f3626e SCDW01::SCDW01(iplug::InstanceInfo)::$\_1::operator()(iplug::igraphics::IGraphics\*) const + 1118  
> 7 com.test.audiounit.scdw01 0x0000000140f35df2 decltype(std::\_\_1::forwardSCDW01::SCDW01(iplug::InstanceInfo)::$\_1&(fp)(std::\_\_1::forwardiplug::igraphics::IGraphics\*(fp0))) std::\_\_1::\_\_invoke\<SCDW01::SCDW01(iplug::InstanceInfo)::$\_1&, iplug::igraphics::IGraphics\*\>(SCDW01::SCDW01(iplug::InstanceInfo)::$\_1&, iplug::igraphics::IGraphics\*&&) + 50  
> 8 com.test.audiounit.scdw01 0x0000000140f35d92 void std::\_\_1::\_\_invoke\_void\_return\_wrapper::\_\_call\<SCDW01::SCDW01(iplug::InstanceInfo)::$\_1&, iplug::igraphics::IGraphics\*\>(SCDW01::SCDW01(iplug::InstanceInfo)::$\_1&, iplug::igraphics::IGraphics\*&&) + 50  
> 9 com.test.audiounit.scdw01 0x0000000140f35d52 std::\_\_1::\_\_function::\_\_alloc\_func\<SCDW01::SCDW01(iplug::InstanceInfo)::$\_1, std::\_\_1::allocatorSCDW01::SCDW01(iplug::InstanceInfo)::$\_1, void (iplug::igraphics::IGraphics\*)\>::operator()(iplug::igraphics::IGraphics\*&&) + 50  
> 10 com.test.audiounit.scdw01 0x0000000140f34a93 std::\_\_1::\_\_function::\_\_func\<SCDW01::SCDW01(iplug::InstanceInfo)::$\_1, std::\_\_1::allocatorSCDW01::SCDW01(iplug::InstanceInfo)::$\_1, void (iplug::igraphics::IGraphics\*)\>::operator()(iplug::igraphics::IGraphics\*&&) + 51  
> 11 com.test.audiounit.scdw01 0x0000000140e7d19d std::\_\_1::\_\_function::\_\_value\_func\<void (iplug::igraphics::IGraphics\*)\>::operator()(iplug::igraphics::IGraphics\*&&) const + 77  
> 12 com.test.audiounit.scdw01 0x0000000140e7d120 std::\_\_1::function\<void (iplug::igraphics::IGraphics\*)\>::operator()(iplug::igraphics::IGraphics\*) const + 48  
> 13 com.test.audiounit.scdw01 0x0000000140e7bc3d iplug::igraphics::IGEditorDelegate::LayoutUI(iplug::igraphics::IGraphics\*) + 77  
> 14 com.test.audiounit.scdw01 0x0000000140ef1f85 iplug::igraphics::IGraphicsMac::OpenWindow(void\*) + 213  
> 15 com.test.audiounit.scdw01 0x0000000140eaa2ae iplug::igraphics::IGEditorDelegate::OpenWindow(void\*) + 302  
> 16 com.test.audiounit.scdw01 0x0000000140ea1cfc -[SCDW01\_View uiViewForAudioUnit:withSize:] + 172  
> 17 com.apple.music.apps.MAAudioUnitSupport 0x00000001124846ee 0x112472000 + 75502  
> 18 com.apple.music.apps.MAAudioEngine 0x00000001143045be CMDAudioUnit::MakeEditorView(long, TGroupID) + 286  
> 19 com.apple.logic10 0x000000011075edb4 0x10ef28000 + 25390516  
> 20 com.apple.logic10 0x00000001102b3646 0x10ef28000 + 20493894  
> 21 com.apple.logic10 0x00000001102b2fcb 0x10ef28000 + 20492235  
> 22 com.apple.logic10 0x00000001102b747f 0x10ef28000 + 20509823  
> 23 com.apple.logic10 0x000000010fe1c88e 0x10ef28000 + 15681678  
> 24 com.apple.logic10 0x000000010f388c10 0x10ef28000 + 4590608  
> 25 com.apple.logic10 0x0000000110afd61a 0x10ef28000 + 29185562  
> 26 com.apple.logic10 0x0000000110afd85f 0x10ef28000 + 29186143  
> 27 com.apple.logic10 0x00000001102795b3 0x10ef28000 + 20256179  
> 28 com.apple.music.apps.MAGUI 0x00000001124dedfe 0x11249e000 + 265726  
> 29 com.apple.music.apps.MAGUI 0x000000011252d5ca 0x11249e000 + 587210  
> 30 com.apple.logic10 0x000000010f4c2ac0 0x10ef28000 + 5876416  
> 31 com.apple.AppKit 0x00007fff321b45f0 -[NSWindow(NSEventRouting) \_handleMouseDownEvent:isDelayedEvent:] + 4914  
> 32 com.apple.AppKit 0x00007fff3211ee21 -[NSWindow(NSEventRouting) \_reallySendEvent:isDelayedEvent:] + 2612  
> 33 com.apple.AppKit 0x00007fff3211e1c9 -[NSWindow(NSEventRouting) sendEvent:] + 349  
> 34 com.apple.logic10 0x000000010f39d6be 0x10ef28000 + 4675262  
> 35 com.apple.AppKit 0x00007fff3211c554 -[NSApplication(NSEvent) sendEvent:] + 352  
> 36 com.apple.logic10 0x0000000110980be4 0x10ef28000 + 27626468  
> 37 com.apple.logic10 0x00000001109806eb 0x10ef28000 + 27625195  
> 38 com.apple.logic10 0x000000011097a711 0x10ef28000 + 27600657  
> 39 com.apple.logic10 0x0000000110980c1e 0x10ef28000 + 27626526  
> 40 com.apple.logic10 0x00000001109806eb 0x10ef28000 + 27625195  
> 41 com.apple.AppKit 0x00007fff31f695bf -[NSApplication run] + 707  
> 42 com.apple.AppKit 0x00007fff31f3b396 NSApplicationMain + 777  
> 43 com.apple.logic10 0x000000010fb1de5d 0x10ef28000 + 12541533  
> 44 libdyld.dylib 0x00007fff6ebdacc9 start + 1

Looks like iMac hardware doesn’t support METAL or GL or system doesn’t want to enable gpu for application. IDK, maybe problem in mac coz on another machine plugin running in any mode. But its look so strange. I will try to test on another one device but may be smb already know and fix this issue.

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [1 October 2020 14:53 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/17 "2020-10-01T14:53:51Z")

</div>

After a lot of tests. I found problem parts of code:

```
  /*
  bitmap = pGraphics->LoadBitmap(ARROW_FN, 128);
  pGraphics->AttachControl(new IBitmapControl(1705, 160, bitmap, kL));
  pGraphics->AttachControl(new IBitmapControl(2055, 160, bitmap, kR));
  */

```

All moving objects (knobs, arrows) cause a crash.

---

<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:** [1 October 2020 20:49 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/18 "2020-10-01T20:49:30Z")

</div>

something todo with your bitmap i think and the scaling. like @AlexHarker said . do you have a @2x version of the bitmap (it still shouldn’t crash) ?

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [1 October 2020 21:02 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/19 "2020-10-01T21:02:40Z")

</div>

It’s possible this is to do with frame buffers in relation to the CPU and GPU (as the problem with nanovvg) but we do need to be able to replicate in order to fix.

---

<div class="post-metadata">

**Author:** ![SKyZz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@SKyZz](https://iplug2.discourse.group/u/SKyZz)\
**Post date:** [1 October 2020 23:41 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/20 "2020-10-01T23:41:16Z")

</div>

> **[SKyzZz/test](https://github.com/SKyzZz/test)**
>
> Contribute to SKyzZz/test development by creating an account on GitHub.

@olilarkin @AlexHarker

I made a test project with these graphics, sorry for the large repository. I do the same thing in my big project.

---

<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:** [2 October 2020 09:44 UTC](https://iplug2.discourse.group/t/problems-with-distribution/203/21 "2020-10-02T09:44:07Z")

</div>

The problem is vu\_arrow.png. For nanovg images can not be taller than 16384 pixels, so it crashes.

With Skia it crashes when loading on retina screen during the resizing of vu\_arrow.png. If I place a 2nd resized version vu\_arrow@2x.png next to the original, there is no crash. I also re-saved the original file with photoshop and now it seems to work without crashing, even without the @2x version.

Also,

instead of calling pGraphics-\>resize(), where you do, just specify a scale in MakeGraphicsFunc…

````auto
        mMakeGraphicsFunc = [&]() {
          return MakeGraphics(*this, PLUG_WIDTH, PLUG_HEIGHT, PLUG_FPS, 0.58);
        };```
````

[Next page](https://iplug2.discourse.group/t/problems-with-distribution/203.md?page=2)
