Problems with distribution

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.

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.

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?

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.

1 Like

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!!

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)?

I attached our topic for this issue in GitHub.

IGRAPHICS_SKIA IGRAPHICS_CPU - lags
IGRAPHICS_SKIA IGRAPHICS_GL3(2) - crash
IGRAPHICS_SKIA IGRAPHICS_METAL - crash

macOS Catalina

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

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

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

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

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

Where does it crash?

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.

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.

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) ?

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.

@olilarkin @AlexHarker

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

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…

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