I have discovered that some of my plugins struggle to open when used in Logic’s “Dual Mono” mode. The UI takes several seconds to open and then sometimes lags for several seconds to re-open when switching between Left and Right instances. The plugin window remains black until the UI finally loads however if I mouse click in that black window sometimes the UI loads immediately. Other times the plugin windows switch immediately. So it’s erratic/unstable.
Several times while testing Logic crashed while switching from Left/Right. Logic’s error report showed it crashed at command “SetScreenScale” which is not something I mess with (I’m using default iPlug2 code).
I haven’t been able to find the cause of this UI issue. Everything works fine in stereo or mono mode/tracks - just not “Dual Mono” mode where it crashes. Has anyone else has come across this - and if so what can cause it? I’m using NanoVG and open GL2 (which has been working fine everywhere else).
I just tried the “DSEQ3” plugin from @TBProAudio and it behaves the same way as my plugins in Dual Mono mode in Logic. When switching between L/R sometimes the UI refreshes almost instantly while other times it takes 10+ seconds or never redraws until the mouse is clicked or moved. After switching back and forth several times it also crashed - but with a different logged error:
Intel on Mojave, Big Sur and Monterey. Latest Logic version for each OS.
Load plugin as “Dual Mono” on a stereo track. Switch back and forth between Left instance and Right instance. Plugin UI redraws quickly sometimes - and very slowly (many seconds) other times, like it’s struggling. My plugin behaves the same way.
I continued to toggle back and forth and DSEQ3 eventually crashed Logic - same thing my plugin does. Crash logs shown above.
Intel Iris Pro Graphics 6200:
Chipset Model: Intel Iris Pro Graphics 6200
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x1622
Revision ID: 0x000a
Metal Family: Supported, Metal GPUFamily macOS 1
I have tested other brands of plugins and they do not have this problem. I also tested Channel Strip MK3 from @HoRNet (another iPlug developer) and it is rock solid - switches from Left to Right UIs instantly. Perhaps he can share what the problem might be - if he came across and solved this? Even my most basic plugins do this so I don’t think it’s something in my code.
I haven’t seen this problem when using the host-based controls editor only the UI editor - so I don’t think the problem is in the I/O - it’s in the graphics somewhere. Also only a problem in Logic. Works fine in all other DAWs (and Logic except for Dual Mono mode).
I had “it doesn’t work” complaints from users of older Macs that do not support metal. If that’s what’s causing this then I don’t know what to do about it. GL2 has worked everywhere else I’ve tested it, even on OS Monterey.
10.11 per iPlug2 documentation and default compiler settings
I use a lot of bitmaps in my plugin UIs and found out very early on that - for some reason - NanoVG produces much sharper graphics than SKIA which looks blurry when compared side-by-side.
So, I had reasons for choosing NanoVG and OpenGL2. Maybe it’s time to change…
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.
Not sure what your post above is indicating - 0.58 screen scale? Why?
I am going to try your SKIA/Metal suggestion and see what happens. If Metal is going to be the way forward I will just state “plugin requires GPU that supports Metal Graphics” and move on.
I don’t have any bitmaps, multi or single frame, that come close to 16384 total height or width so that’s not an issue with NanoVG.
An older version of SKIA I once looked at had adjustments for bitmap antialiasing - which is what I believe makes the images blurry. I don’t see any such adjustment in the latest version.
Nevertheless, I will check out SKIA and Metal and see what happens. Thank you for the suggestions.
I have now tested with SKIA and Metal and get the same result. Plugin switches faster between Left/Right Dual Mono instances but occasionally pauses on a blank UI screen. Repeated toggling L/R eventually crashed: