Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-17-2015, 07:24 AM   #1
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default JUCE VST x64 OSX plugin resizing (FIXED)

Hope this is the right forum ...

I am developing OSX x64 VST plugin using JUCE framework. I've found a problem which i am able to replicate with standard JUCE demo plugin.

When plugin is internally resized, its position became misplaced in the Reaper FX window. You can see it on attached LICEcap GIF - after plugin has been loaded, it changes size (height) and the result is ...

My plugin is working ok with Reaper's floating windows and some other hosts on OSX (Nuendo 6.5, NebulaMan ...), which also use floating windows for plugins.

Strangely enough, AU version of my plugin is not suffering from this ?!? Not sure what could be the reason for this, may be bug in JUCE ... I've asked the same question at JUCE's forums - no answer so far.

MacBook, OSX 10.9.4, Reaper 4 & 5 x64

Any ideas or suggestions would be greatly appreciated.

Thx!!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com

Last edited by zabukowski; 02-01-2021 at 08:57 AM.
zabukowski is offline   Reply With Quote
Old 11-17-2015, 10:01 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

Is this on VST2 or VST3?

Edit: in either case there is some seriously bad parent-window resizing behavior that JUCE is exhibiting. I'm going to look to see if I can work around it without requiring you to modify JUCE...

Last edited by Justin; 11-17-2015 at 10:20 AM.
Justin is offline   Reply With Quote
Old 11-17-2015, 10:29 AM   #3
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
Is this on VST2 or VST3?
This is VST2.

I've just checked VST3 and it suffers from the similar issues, plugin is a bit differently displaced, but basically the same problem.

btw. VST2 need two consecutive resizes to expose problem, VST3 need just one resize.
AU works as expected.

Interesting thing is, that only vertical resizing is causing problems - horizontal looks ok.

I've noticed PSP TripleMeter plugin to also have slight displacment after vertical resize.
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 10:30 AM   #4
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
Is this on VST2 or VST3?

Edit: in either case there is some seriously bad parent-window resizing behavior that JUCE is exhibiting. I'm going to look to see if I can work around it without requiring you to modify JUCE...
That would be really great, thanks for helping !!!!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 10:34 AM   #5
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

If you want, I can send you JUCE demo plugin modified to self-resize after 2 seconds, which reveals the issue.
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 11:20 AM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

Quote:
Originally Posted by zabukowski View Post
If you want, I can send you JUCE demo plugin modified to self-resize after 2 seconds, which reveals the issue.
There are a ton of issues, JUCE makes all kinds of bad assumptions about hosts, the most obvious being that an NSView that hosts its configuration is a contentView... Boo.

JUCE needs numerous updates for resize issues, IMO... bleh.
Justin is offline   Reply With Quote
Old 11-17-2015, 11:36 AM   #7
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
There are a ton of issues, JUCE makes all kinds of bad assumptions about hosts, the most obvious being that an NSView that hosts its configuration is a contentView... Boo.

JUCE needs numerous updates for resize issues, IMO... bleh.
Is there something particular i should look/check for inside JUCE, which is related to this specific problem ??

Thx!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 11:45 AM   #8
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

JUCE creator Jules seems very receptive to things in JUCE that are done poorly and need improvement... consider starting a thread at JUCE.com about this.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 11-17-2015, 11:48 AM   #9
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Argitoth View Post
JUCE creator Jules seems very receptive to things in JUCE that are done poorly and need improvement... consider starting a thread at JUCE.com about this.
Yes, i already did ... waiting for a response ...

Thx!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 12:05 PM   #10
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

Quote:
Originally Posted by zabukowski View Post
Is there something particular i should look/check for inside JUCE, which is related to this specific problem ??

Thx!
The first highly problematic thing is setNativeHostWindowSizeVST():

Code:
        if (NSView* hostView = (NSView*) window)
        {
That should check to see if hostView is the contentView, and if not, behave much differently!

Granted, I know that almost every other VST host will pass an NSView that is a contentView, so it's our fault, but we made that decision years ago and are stuck with it... :/
Justin is offline   Reply With Quote
Old 11-17-2015, 12:30 PM   #11
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
The first highly problematic thing is setNativeHostWindowSizeVST():

Code:
        if (NSView* hostView = (NSView*) window)
        {
That should check to see if hostView is the contentView, and if not, behave much differently!

Granted, I know that almost every other VST host will pass an NSView that is a contentView, so it's our fault, but we made that decision years ago and are stuck with it... :/
Thx, this is very helpful info !!!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-17-2015, 05:06 PM   #12
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

There is definitely some handling I can improve in REAPER now, that is causing some of these issues. Maybe it won't require changing JUCE after all... stay tuned.
Justin is offline   Reply With Quote
Old 11-18-2015, 01:04 AM   #13
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
There is definitely some handling I can improve in REAPER now, that is causing some of these issues. Maybe it won't require changing JUCE after all... stay tuned.
Awesome, thank you !!!

On the other side, Jules is also willing to look at this, after JUCE summit is finished - i'll keep him informed about your progress ...
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-18-2015, 12:40 PM   #14
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

I think I have a good fix that will be in the next 5.11 build for VST2 resize behavior. Still investigating the best way to handle VST3.

Edit: this is the patch I would recommend for JUCE's VST3 handling:

http://1014.org/_/juce-vst3-reaper.patch

This improves VST3 resize behavior in REAPER, but it is still not perfect --
I will also fix an issue in REAPER which should round it out nicely.

Edit again: updated that patch to make it not affect Windows (the first revision made things weird on Windows).

Last edited by Justin; 11-18-2015 at 01:09 PM.
Justin is offline   Reply With Quote
Old 11-18-2015, 01:10 PM   #15
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
I think I have a good fix that will be in the next 5.11 build for VST2 resize behavior. Still investigating the best way to handle VST3.

Edit: this is the patch I would recommend for JUCE's VST3 handling:

http://1014.org/_/juce-vst3-reaper.patch

This improves VST3 resize behavior in REAPER, but it is still not perfect --
I will also fix an issue in REAPER which should round it out nicely.
Thank you !!!

I've applied your patch here - looking forward for Reaper 5.11 as well
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Old 11-19-2015, 06:03 PM   #16
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

Quote:
Originally Posted by zabukowski View Post
Thank you !!!

I've applied your patch here - looking forward for Reaper 5.11 as well
If you wouldn't mind, head over to the pre-release forum and give it a go?
Justin is offline   Reply With Quote
Old 11-20-2015, 01:28 AM   #17
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
If you wouldn't mind, head over to the pre-release forum and give it a go?
I've tested pre3 resizing behaviour with VST, VST3 and AU.

I am happy to confirm that VST3 and AU are now resizing flawlessly (AU was already working in 5.1).

While resizing behaviour is obviously improved with VST2, there is still one glitch remaining. If plugin is resized, then editor is closed (by switching to another plugin) and then reopened, next resize operation will not work correctly anymore.

If editor is not closed/reopened, consecutive resizes work correctly.

Video is attached.

i have simple plugin here, which decreases plugin height with a click on a button ... it exposes this behaviour ... i'll send it to you, if you need ...

Thank you !!!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com

Last edited by zabukowski; 02-01-2021 at 08:57 AM.
zabukowski is offline   Reply With Quote
Old 11-20-2015, 06:41 AM   #18
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,745
Default

Quote:
Originally Posted by zabukowski View Post
i have simple plugin here, which decreases plugin height with a click on a button ... it exposes this behaviour ... i'll send it to you, if you need ...

Thank you !!!
Got it, fixing for the next build.

Last edited by Justin; 11-20-2015 at 07:10 AM.
Justin is offline   Reply With Quote
Old 11-24-2015, 07:47 AM   #19
zabukowski
Human being with feelings
 
zabukowski's Avatar
 
Join Date: Nov 2009
Posts: 187
Default

Quote:
Originally Posted by Justin View Post
Got it, fixing for the next build.
5.11 pre 4 is working like a charm - big thanks for fixing this, really appreciated.

I'll inform Jules about it and suggest him to apply your patch to JUCE VST3 wrapper.

Cheers!
__________________
My software & music...
http://www.zabukowski.com/software
http://www.zabukowski.com
zabukowski is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.