Mac 32-bit VST: Ignoring my mouse!

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I swear. There are times I despise Apple. This is part of why I gave up on Cocoa before and went to the dark side with Java.

I finally got my VST up and running, GUI done, preset management done, and the code base all nice and tidy. It was time...

I updated to Sierra and the latest Xcode to make sure I had all the OSes covered, 32- and 63-bit. Only one warning to take care of. Easy. Recompiled and ran...

... and now my GUI is repeatedly being overwritten by the host window's background! :dog:

If I change the window background color, my GUI gets overwritten in a glorious new color! Nothing I have tried has stopped this window from its rampage. I've been through every NSWindow and NSView method and ivar in the book! Nothing works, not even adding a child window as the child window then overwrites my GUI! and all I am doing is adding my NSView instance to the end of the chain, same place it was yesterday when it all worked beautifully under Mavericks...

So if anybody could give me a clue as to what has changed or where I have gone horribly wrong, I would be much appreciative... :pray: :clap:
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Redacted
Last edited by Aloysius on Sat Feb 25, 2017 8:04 pm, edited 1 time in total.
Anyone who can make you believe absurdities can make you commit atrocities.

Post

Really not helpful.... :x
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Redacted
Last edited by Aloysius on Sat Feb 25, 2017 8:05 pm, edited 1 time in total.
Anyone who can make you believe absurdities can make you commit atrocities.

Post

Still not helpful.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Hard to say. Could try digging into JUCE and WDL-OL source codes to see how they handle GUI updates.

Post

Redacted
Anyone who can make you believe absurdities can make you commit atrocities.

Post

nonnaci wrote:Hard to say. Could try digging into JUCE and WDL-OL source codes to see how they handle GUI updates.
I've pored over both of those and as far as I can see, they aren't doing anything beyond what I'm doing. It's really weird. All of the windows and views are opaque, so I should be being drawn over the top of everything. Also, I'm not sure that these have been updated for Sierra, or if they even need to be.

Maybe I need to announce I've inserted a new view? Shouldn't be necessary as I thought when the NS Window drew, it started at the bottom of the chain, inspecting it each time?, looking for the first opaque view, of which I am always.

I'll try that next, but first, Indian buffet! A little spicy food to get the brain cells vibrating again!
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Well, that wasn't it. The NSWindow just said, Oh yeah? I'm painting over ALL the things!

:evil: :evil: :evil:

Now I'm just frustrated... :x
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

If the issue is still only about reaper, you might try asking them. Apparently they do reply https://forum.juce.com/t/juce-vst-plugi ... -osx/12239
~stratum~

Post

I'm on a new, but related issue that's affecting my plug-in in all hosts due to moving from 10.9->10.12. Trying to get compatible one step at a time. Was going to add AU, but got this instead.

So it's not specifically Reaper related and definitely not JUCE related.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Solved it for now. Scorched earth policy. Just redrawing the whole thing on a timer... :dog: Commented out my dirty rect tracking system, so only using a little more CPU, but my large size GUI is gonna be a cycle killer.

Until I can figure out why the non-opaque NSWindow insists on scribbling on everything my opaque view is handling... :roll:
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Until I can figure out why the non-opaque NSWindow insists on scribbling on everything my opaque view is handling... :roll:
Hardware rendering on a timer conflicting with another one? A gpu does not have the concept of a window, somehow the window manager needs to handle that. If the contents of the two windows were inside the same scene, that could simply be handled by the depth(z), but something might be interfering with the correct calculation of that.
~stratum~

Post

I've traced the window structure:

NSWindow -> NSView (the whole window with host frame) -> NSView (the VST parent) -> NSView (my subclassed view). No siblings in the whole chain.

I'm declared as opaque for the entire view, so the NSWindow should never draw. As well, the parent view is declared opaque, so the main window should never draw...

Before I run around screaming Apple bug, I was hoping somebody could tell me what was going on. I tried my Mavericks compiled version and despite running fine on mavericks, it had the same issue on Sierra. This is what annoys me most about Apple. They change stuff and don't document it. I'm sure if I went through Interface Builder or some such nonsense, I wouldn't be having this issue.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Finally solved it, and by solved, I mean silly workaround. I gave the window one pixel to draw on while I draw on the rest of the window. :lol:

My CPU usage is still a tad high from what it used to be, but it's no longer eating a third or more!

Apple's just lucky I hate Windows more...
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post Reply

Return to “DSP and Plugin Development”