Plug window having out of body experience

I built a Pro Tools real time plug with Juce and the RTAS wrapper. I created the GUI with Jucer. Everything works fine except I can cause the plug-in GUI to be painted outside the Pro Tools parent window.

I do the following steps:

  1. Create two instances of the plug-in, e.g. insert the plug on two separate tracks
  2. Open one of the plug-in windows
  3. Drag it somewhere.
  4. Click on the other instance of the insert on the other track.
  5. The PT plug-in window will be in the new location, but the Juce graphics will be drawn in the original location. If you drag the window now, both rectangles move together.

Weird. I’m using the latest Juce code from svn and Pro Tools 7.4.2 on Mac OS X 10.5.4. This wasn’t happening with the last release of Juce (1.46).

Steve

This is because it now uses a window floating about the PT window to create the UI, and I guess it’s getting out of line. I’ll check that out asap!

I have a fix for this, but it’s horrific. There’s a bug in the cocoa window stuff that requires a carbon bodge as a workaround. I’ll check in some code shortly…

Hi,

I would like to know if there is any news about that problem.
In fact I’m working with cocoa on a Snow Leopard, mac intel only RTAS plugin and the juce graphics is always loaded outside of the PT plugin window.
It looks like 200 pixels of shift to the top.
It always the same shift.

the os is 10.6.5, PT 8.0.3 and juce 1.51

Thanks

Try the tip version, there’s a good chance that something has changed since 1.51

Ok, thank you!

I tried, but that’s worse : there is also a shift to the right

I tried to tweak your code in juce_RTAS_mac_utilities.mm

 #if WINDOWPOSITON_BODGE
 {
 Rect winBounds;
 GetWindowBounds ((WindowRef) hostWindowRef, kWindowContentRgn, &winBounds);
 NSRect w = [hostWindow frame];
	 w.origin.x = winBounds.left;
	 w.origin.y = winBounds.top;//hostWindowScreenFrame.size.height + hostWindowScreenFrame.origin.y - winBounds.bottom;
	 [hostWindow setFrame: w display: NO animate: NO];
 }
 #endif
 
 NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin];
 //windowPos.x = windowPos.x + jmax (0.0f, (oldWindowFrame.size.width - f.size.width) / 2.0f);
 //windowPos.y = hostWindowScreenFrame.size.height  + hostWindowScreenFrame.origin.y - (windowPos.y + f.size.height);

It is far better, but the juce window have a different vertical shift when you close and reopen the plugin interface.
It loops in a short cycle : every 3 close/open you have the same shift.

It’s weird, really.

Any ideas ?

I’ve never seen it do that, and lots of people are deploying RTAS plugins with this code, and I’ve not heard anyone else report this, so I don’t really understand why you’d see that…

Are you running some kind of unusual monitor setup, or an unusual placement of the dock… or anything like that…?

By remarkable coincidence, I have a related bug to report.

One of my customers reports some strange issues in Pro Tools 8.0.4, OS 10.5.8.

Apparently the problem happens when instantiating more than one copy of ValhallaShimmer. The plugin window for the 2nd (or following) plugin, where the 2nd or following plugin doesn’t display the preset browser, etc… Here’s what the first plugin looks like:

The second instantiated plugin looks like this:

Note that the preset browser is gone, and that the GUI is moved up within the window, leaving a grey bar in the top.

The customer is using a dual monitor setup, but this by itself doesn’t seem like it should cause such a problem.

The customer also reported a bug where the plugin was instantiated in some spot that wasn’t where he was expecting. Quite frankly, I am not that experienced with Pro Tools, so I don’t know what the expected plugin behavior is, but the above problem is definitely a bug.

Thanks for any help on this.

Sean Costello

Can you get this to happen with the juce demo too…?

I’ve never had this happen, personally. Only one customer has reported it. I’ll set up a dual screen in the next few days and see if I can duplicate it. I’ll also send the customer a fresh build of the Juce Demo Plugin, and see if it happens there.

Sean

I’m very pushed for time, so can’t offer to try to replicate this (searching for stuff like this can be very time-consuming as I’m sure you know…), but if you can give me some instructions to follow that are guaranteed to reproduce it, then I’ll take a look.

I don't know if the problem was solved in earlier versions, but with newest Juce 2.1.7 I still have problem with "out of body experience".
All juce plugins have the same problem - sometimes  they are drawn out of their window. They are floating.
These things happen in WaveLab 8 and WaveLab 7 Mac. Have tested on different Macs. It also applies to audio demo plugin  or simple "hello world plugin" generated by IntroJucer.

 



It's very annoying. :D
 

There is a more recent similar thread here: http://www.juce.com/forum/topic/displaced-gui-vst-os-x

Rail