-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VST/(i) Debug message. #1468
Comments
IIRC this is the software's way of telling you that it can't use QT's implementation of shared memory blocks between processes. The offending code is here: @tobydox is our resident expert at this stuff, perhaps he can explain more and explain if this is ever even possible with a VST plugin or not. |
@tresf 👍 thanks ! |
Probably not related, but some upstream convo at least... https://bugreports.qt-project.org/browse/QTBUG-27765 |
Ive been looking into this.
yes. I knew it was, because the audio buffer is being passed successfully (vsts work). but i wanted to dig deeper to see what is happening and why we are getting the error message.
I have taken the offending method above and put some debugMessage calls in.
When loading Classic delay, a 2 in 2 out effect I get the following in my terminal
This is showinging setShmKey being called 3 times. once on creation, once to dealloc and a thrid time to reallocate. The important bit being that shmem is being allocated with a size of 4096 and an address of 0xf759e000. I tried this with many pluging all with simular results. they were all 2 in, 2 out I tried http://www.voxengo.com/product/span/ with 8in 8 out
with more channels , 4 times as many, we request an area of memory 4 times larger. In conclusion memory of the correct size is being allocated. I feel this is a bug of an incorrect error message. any thoughts? |
Terrific research. This may explain a bit why VST preset previews were so quickly crashing the software (thus leading to the disabling of previewing VST presets). I'll look at your findings a bit more in detail this week. Thanks for the investigation. |
So I've re-read your analysis on this and you believe this is fine then? I tend to agree the message should be more clear as to what is "failing" but furthermore, why isn't it ever using QT shared memory to begin with? |
After some more research RemotePlugin.h l39
It would appear that Qt Shared mem is used only on win32 builds. I am not aware of anyway of attaching a debugger to this in a virtual machine.
Yes. I feel the shmem is working fine. |
Im sure i can change it to not show the error on memory deallocation, thats that part that i feel is a bug. I didnt want to implement this until it is agreed that this is the actual bug. |
Should we use it for all platforms? It seems rather strange to never enable it and then write an error saying it is not enabled. :) -Tres |
The error message is
I dont know is the real answer. My gut feeling is to leave it as it is, My reason for thinking like this is, Why would someone put in all the effort to use different shared memory implementations on different platforms if this was not needed, |
Well, apple for example has very low limits (sorry for the dated server article here). My understanding is that Qt's method improves this but if it adds additional overhead on Linux I suppose it is better without it. But I really don't know enough to be able to say.
Ah... Sorry, I read the wrong part (mistook -Tres |
That article had limits that are misleading... Here's a better one...
|
Now that was my fault. originally them changes and debug messages were for my eyes only. :( |
After reading them links, i'm still not able to advise anymore on the implications of changing to QtSharedMem |
Well I don't know much... I did most of the shmem research trying to resolve this bug #703 so a lot of it is from memory and I was struggling to find a good writeup on it. When doing my research I found that services such as PostgreSQL have historically had issues on OSX due to some really low defaults for shared memory and Toby's advice at the time was to force Apple to use QT's implementation. If Linux doesn't need it and is better without out it... no harm no foul. :) Possibly unrelated, but this was a QtSharedMem bug I found back when doing the research... |
Would it be possible for someone to build and test a branch on a mac please ? It contains some debug output to confirm what shmem we are using git clone -b i1468 https://github.com/curlymorphic/lmms.git
it should look like
The important bit is p.s I have no intention of pushing a branch full of debug output. |
I'd also like to have a Qt-only implementation but that would break VST plugins on Linux which are launched using WINE. We need the native implementation for the communication between LMMS and the WINE-based VST host process. The Qt implementation is required/use for implementing RemotePlugins in all other cases on all other platforms. Nevertheless it's still possible that there's a problem somewhere in the implementation. |
Thanks @tobydox |
I'd be happy to but VeSTige isn't supported on that platform yet due to a bug (AFAIK) in the winegcc compiler on that platform. #698 Can I use another plugin (i.e. Zyn) to test this instead? |
Do we support external plugings on mac? None of the native ones will use shared memory. |
I don't know. What about Zyn? I always thought that was an external plugin (or perhaps just the GUI is?) |
Ive just loaded a Zyn, it does not use the code under concern. |
Thanks. I suppose switching QtSharedMem on for Apple is moot until we get Wine finally working then. FYI, Toby had made a branch to help this Mac + Wine effort called -Tres |
Are we using wine for VSTs on mac? Maybe we should create an issue for native mac VST support? |
Yes, that is the idea.
Sure unless it bears similarities in code to #416? |
No, I guess it's very different from #416. Well, the reason I talked about this is because wine does not work very well with OSX. |
Hmm... Is this statement from experience or research? This is from the WineHQ project page:
This tends to suggest it would work well, no? |
Ok, so I am probably wrong. :-) |
I can't say much about the changes that were made there but if it doesn't break anything, sure. |
Hi ,
I always get a debug ( non fatal and has been happening since the 0.4.x series ) message whenever I load a VST instrument or effect into LMMS :- " failed getting shared memory "
The debug message originates from include/RemotePlugin.h:1161: and include/RemotePlugin.h:1180:
What I would like answered:- Is shmem actually being allocated to the VST's?
Is there an understandable way to show what ( if any ) shared memory is being allocated?
I have had a brief look at '''icps''' and also searching the pid of the RemoteVstPlugin.exe process through cat /proc/*/maps, but I'm a bit unsure of what I'm looking for.
thanks Mikobuntu :
The text was updated successfully, but these errors were encountered: