 |
|
|
03-02-2023, 02:27 PM
|
#1
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Severe resource leak (only tested on Windows)
Dear devs,
this is a bug that has been haunting me for years. I finally could repro it reliably.
Short version: When loading VST plugins, REAPER's GDI objects rise without getting released.
Long version:
Every time, a VST plugin is added to REAPER, the GDI objects are increased.
I guess that is a normal process. Nothing wrong with that.
However, when unloading those plugins, the resources are not released.
This results in a never ending growth of REAPER's GDI objects and REAPER becomes slower and slower. And every time I close an old project and load a new one, this resource leaks adds to itself over time. My GDI peak was at 1700 objects. The only thing that helps... you guessed it: closing REAPER.
Some figures:
Windows 10
REAPER vanilla:
106 GDI objects
REAPER with 3 Kontakt instances:
228 GDI objects
REAPER project unloaded:
228 GDI objects
(this was only a quick test I did, I can do one with more instances, etc...)
Any chance you can have a look at this one?
|
|
|
03-02-2023, 02:32 PM
|
#2
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,213
|
Is the "full unload of VST plug-ins" option enabled? If not, does enabling it help?
Can you list some other plug-ins that have this issue? Do the built-in reaplugs share it?
|
|
|
03-02-2023, 03:27 PM
|
#3
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Yes, it happens with unload ticked or unticked.
Sorry, I had posted before but deleted my post. I chose a different testing method.
I launch REAPER, insert a track and instantiate a plugin. Then I remove the plugin and note the GDI.
Kontakt 6
after inserting and removing it once: 194
after inserting and removing it 5 times: 266
ReaEQ
after inserting and removing it once: 149
after inserting and removing it 5 times: 151
Omnisphere
after inserting and removing it once: 157
after inserting and removing it 5 times: 159
So, from what I can see, the last 2 plugins only add 2 GDI and I think that value is stabilized after a while. But Kontakt goes totally through the roof.
I will collect more plugins...
Last edited by _Stevie_; 03-02-2023 at 03:36 PM.
|
|
|
03-02-2023, 03:55 PM
|
#4
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
LiquidSonics Cinematic Rooms:
after inserting and removing it once: 180
after inserting and removing it 5 times: 206
UVIWorkstation:
after inserting and removing it once: 180
after inserting and removing it 5 times: 206
Orchestral Tools SINE:
after inserting and removing it once: 186
after inserting and removing it 5 times: 212
Best Service Engine:
after inserting and removing it once: 166
after inserting and removing it 5 times: 235
EDIT: I tried closing the project, after having removed the plugin. Most plugins go back to their previous GDI level. So, closing a project might do some extra cleaning.
However, Kontakt 6 is still affected and hogs GDI.
Last edited by _Stevie_; 03-02-2023 at 04:08 PM.
|
|
|
03-03-2023, 11:15 AM
|
#5
|
Human being with feelings
Join Date: Mar 2014
Posts: 265
|
I don't know for sure, but I suspect similar thing happens on my side with Solid State Logic SSL Native plugins.
Upon loading one instance of X-EQ2 CPU usage goes from 12-18% which is very high. This didn not happen before.
And upon unloading any SSL plugin the CPU usage stays the same. It can be released only when fully quitting Reaper.
I have not noticed any problem in Cubase 12 Pro or Studio One 6 so far.
Emailed SSL support just in case, but perhaps devs should look into Reaper's issue too?
EDIT: Posted in wrong thread thinking it's related to this one.
New thread with complete issue is here: https://forum.cockos.com/showthread....19#post2655019
__________________
Reaper 6|Cubase 12 Pro|Studio One 6 Pro|UA Apollo/Apollo X/UAD Quad PCie x2|Adam A5x & Adam Sub7|IK iLoud Micro|Faderport 8|Presonus Atom|Nektar Panorama P6|Nektar Aura|Focusrite ISA One|ART Pro VLA II|Townsend Labs Sphere L22|Neumann & Rode mics
Last edited by playtimer; 03-03-2023 at 12:40 PM.
Reason: wrong thread
|
|
|
03-03-2023, 12:28 PM
|
#6
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Not sure if I mentioned that already: the main issue with this bug is that the MIDI Editor gets slower and slower. Maybe that gives another clue?
Right now, it takes 2 seconds to open the ME (with 1300 GDIs).
I guess I should restart REAPER...
|
|
|
03-03-2023, 01:46 PM
|
#7
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Just posting a video, so you get an idea how severe it really is:
https://nextcloud.stephanroemer.net/...4bF4sresLcfybS
The MIDI Editor opens really slowly (hence the screen turning white for a moment).
MIDI scripts don't work fast enough anymore, it seems like they are 1 frame per second.
|
|
|
03-03-2023, 02:27 PM
|
#8
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,213
|
If you look at other things in the task manager, are there other increases? e.g. threads?
increases in GDI objects shouldn't slow the MIDI editor opening, something else may be going on...
|
|
|
03-04-2023, 09:43 AM
|
#9
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
I checked the threads, they go down to 89 every time I close a project. So it shouldn't be that.
I can't spot anything else that looks suspicious. The GDIs are literally the only ones that keep growing and growing. Is there anything else you could think of?
|
|
|
03-04-2023, 10:48 AM
|
#10
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,471
|
Quote:
Originally Posted by _Stevie_
Not sure if I mentioned that already: the main issue with this bug is that the MIDI Editor gets slower and slower. Maybe that gives another clue?
Right now, it takes 2 seconds to open the ME (with 1300 GDIs).
I guess I should restart REAPER...
|
FWIW, I've never seen performance affected by GDI count, and 1300 is far from the 10K limit.
Just curious, what if you simply toggle the visibility of the ME window instead of closing/opening it, is it just as slow? Example toggle script, hide foreground window/show previous hidden window
https://forum.cockos.com/showpost.ph...52&postcount=3
Maybe by not closing it, it will eventually reveal the real problem?
|
|
|
03-04-2023, 11:32 AM
|
#11
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Yeah, I think the GDI thing might be a side effect by the real cause.
I'm trying everything right now. I have been battling with this issue for 3 years now.
I finally want to find the root of the issue.
Will try your script! This action here will only likely open / close I guess?
Code:
View: Toggle show MIDI editor windows
|
|
|
03-04-2023, 03:25 PM
|
#12
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,213
|
Quote:
Originally Posted by _Stevie_
I checked the threads, they go down to 89 every time I close a project. So it shouldn't be that.
I can't spot anything else that looks suspicious. The GDIs are literally the only ones that keep growing and growing. Is there anything else you could think of?
|
Does opening and closing the MIDI editor cause GDI objects to grow?
If you bypass the Kontakt instances (or all the track fx) does that speed up the midi editor opening when its slow?
|
|
|
03-05-2023, 08:20 AM
|
#13
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Quote:
Originally Posted by Justin
Does opening and closing the MIDI editor cause GDI objects to grow?
If you bypass the Kontakt instances (or all the track fx) does that speed up the midi editor opening when its slow?
|
AFAICT, no they aren't growing by opening and closing the ME. I'm still investigating heavily here, because I don't want to waste your precious time. What I found out by now is, that when I leave the ME open on a different screen and don't do the open / close thingy, then the performance seems to be stable (despite the higher GDI objects). I will get back to you with new findings ASAP.
|
|
|
03-08-2023, 03:11 PM
|
#14
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Hey Justin,
sorry for taking so long to get back to you, but I was trying a couple of things here, in order to find the root of the problem.
So I came to the conclusion that the issue is there from the beginning but it's worsening over time. I suspect a redraw issue. Which does not seem to happen on macOS.
In general, the MEs speed/refresh rate is affected by the arrange window. If there are a lot of items displaying (= they are in view), then scripts executed in the ME are slowed down. From what I can see, this affects scripts that are moving graphical things like any nudge note/CC script and also JS MultiTool.
Native actions seem not (!) to be affected (Like "move X 1 pixel").
You can see the result here. It's a project with around 1500 MIDI items.
First, nudging notes with items in view, then moved out of view.
Windows 10: a freshly started REAPER instance:
https://nextcloud.stephanroemer.net/...PSRXt69mrBjz8y
Windows 10: a REAPER instance that has been up for like 5 hours, with closing and opening projects, editing, saving, etc...
https://nextcloud.stephanroemer.net/...sCjFfTEwcsG3AG
macOS Ventura on a MacBook Air M1: freshly started instance:
https://nextcloud.stephanroemer.net/...qF7wb985ABx68K
Here's the MIDI project:
https://nextcloud.stephanroemer.net/...EfjDnTPmsXmAWs
The Windows instance is already very slow and stuttery from the beginning,
whereas in macOS it's super smooth.
This is as much evidence I could find, for now. If you got any other pointers to what could be worth checking, then please do tell.
|
|
|
03-10-2023, 02:12 PM
|
#15
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
I just checked on different Windows machine:
I can definitely repro the slow MIDI scripts in the ME when the arrange is crowded with items.
|
|
|
03-10-2023, 02:56 PM
|
#16
|
Human being with feelings
Join Date: May 2022
Location: London
Posts: 198
|
Quote:
Originally Posted by _Stevie_
So I came to the conclusion that the issue is there from the beginning but it's worsening over time. I suspect a redraw issue. Which does not seem to happen on macOS.
In general, the MEs speed/refresh rate is affected by the arrange window. If there are a lot of items displaying (= they are in view), then scripts executed in the ME are slowed down. From what I can see, this affects scripts that are moving graphical things like any nudge note/CC script and also JS MultiTool.
Native actions seem not (!) to be affected (Like "move X 1 pixel").
|
Have the same issue here - slowdown in the MIDI editor on my Windows desktop the more MIDI items are in the arrange view. Will test on my Mac Pro tomorrow.
Last edited by inthevoid; 03-31-2023 at 11:49 AM.
|
|
|
03-10-2023, 04:32 PM
|
#17
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
OMG, thank you! Now I feel less stupid.
|
|
|
03-14-2023, 08:06 AM
|
#18
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Hey Justin, just checking if you had time to check the things I posted.
|
|
|
03-23-2023, 12:17 PM
|
#19
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
New findings: it doesn't seem only related to the MIDI Editor. The action list also starts extremely slow, when REAPER is caught into that "slow down mode".
|
|
|
03-23-2023, 08:54 PM
|
#20
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,213
|
If you temporarily disable undo completely (set undo limit to 0mb), does that change anything?
|
|
|
03-24-2023, 07:32 AM
|
#21
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Quote:
Originally Posted by Justin
If you temporarily disable undo completely (set undo limit to 0mb), does that change anything?
|
Will try that over the weekend and report back next week1
JFYI: I currently had my undo history set to 512 MB.
|
|
|
03-31-2023, 11:48 AM
|
#22
|
Human being with feelings
Join Date: May 2022
Location: London
Posts: 198
|
Sorry, it took a while to get around to testing this (on 6.78). I've just tested on an M2 MacOS system and I get very laggy GUI in the arrange window when more of my screen is taken up by the items. The issue actually worsens the more of my screen is taken up by the items - if I zoom out so that for example the items only take up 1/4 of the whole screen, the GUI performance becomes silky smooth again.
So when viewing 100 MIDI items with them taking up my whole display, drawing a marquee box (for example) is quite laggy, but viewing 100 MIDI items zoomed out with them only taking up 1/4 of my display, everything is very smooth.
Last edited by inthevoid; 03-31-2023 at 11:58 AM.
|
|
|
03-31-2023, 01:26 PM
|
#23
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
@Justin, sorry, it took me longer because I wanted to test this thouroughly.
It's definitely not the undo history. I played around with all kinds of settings.
I agree with the observations that inthevoid has made.
The problem right now is that I am confronted with 2 different issues that stacked on top of each other, make the whole situation worse:
1. MIDI Scripts get slower in the ME, when a lot of items are displayed in the arrange
2. The MIDI Editor becomes slower over time, when loading / unloading projects.
I think #1 could be addressed somehow? But for #2 I need to find the root of the problem. I'm still investigating, but it's really hard to track down.
Last edited by _Stevie_; 03-31-2023 at 03:36 PM.
|
|
|
03-31-2023, 02:38 PM
|
#24
|
Human being with feelings
Join Date: Jun 2020
Posts: 524
|
Quote:
Originally Posted by inthevoid
Sorry, it took a while to get around to testing this (on 6.78). I've just tested on an M2 MacOS system and I get very laggy GUI in the arrange window when more of my screen is taken up by the items. The issue actually worsens the more of my screen is taken up by the items - if I zoom out so that for example the items only take up 1/4 of the whole screen, the GUI performance becomes silky smooth again.
So when viewing 100 MIDI items with them taking up my whole display, drawing a marquee box (for example) is quite laggy, but viewing 100 MIDI items zoomed out with them only taking up 1/4 of my display, everything is very smooth.
|
I also experience this on Mojave 10.14, but not just with midi items, I usually don't have many, just regular audio items, zooming in slows everything down until I zoom out
|
|
|
04-01-2023, 09:04 AM
|
#25
|
Human being with feelings
Join Date: May 2022
Location: London
Posts: 198
|
Interestingly I've just loaded up an orchestration project (so lots of MIDI items but without any VIs loaded in) and the project is super smooth.. so maybe it's something to do with latency inducing plugins?
|
|
|
04-01-2023, 10:43 AM
|
#26
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,881
|
Yes, I made the same experience. The issue is only there, if there are VSTs loaded! Projects with no plugins are super smooth.
I guess only the devs would know what kind of connection there is.
|
|
|
04-01-2023, 01:10 PM
|
#27
|
Human being with feelings
Join Date: May 2022
Location: London
Posts: 198
|
Quote:
Originally Posted by _Stevie_
Yes, I made the same experience. The issue is only there, if there are VSTs loaded! Projects with no plugins are super smooth.
I guess only the devs would know what kind of connection there is.
|
Yes you’re right - just been doing work in a project today with MIDI and no VSTis and it’s completely smooth.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:08 AM.
|