Skip to content
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 Preview Crash #300

Closed
musikBear opened this issue Feb 12, 2014 · 17 comments
Closed

VST Preview Crash #300

musikBear opened this issue Feb 12, 2014 · 17 comments
Assignees
Labels
Milestone

Comments

@musikBear
Copy link

0.9.90 p.r. v32bit
Platform winXP
Old bug
The 'pre-hear' feature is very nice for all factory-presets, but VSTs will launch a vsts-GUI without a lmms-handle. It can be closed through the window-context-menu, but it still exists in memory (eg leak). (with one especially large VST (Alionoctis), lmms crashed, but that can definately be my memory, and not related to lmms)

@lukas-w lukas-w added the bug label Feb 13, 2014
@diizy diizy added this to the 1.0.0 milestone Mar 3, 2014
@tobydox tobydox self-assigned this Mar 3, 2014
@diizy
Copy link
Contributor

diizy commented Mar 18, 2014

IMHO, we could just disable the preview function for VST's altogether, at least for now.

@tobydox
Copy link
Member

tobydox commented Mar 18, 2014

It's disabled for DLL files already but I'd not disable it for regular LMMS presets. Additionally it'd be unneccessary extra logic to distinguish between good and bad presets.

@diizy
Copy link
Contributor

diizy commented Mar 18, 2014

On 03/18/2014 09:54 PM, Tobias Doerffel wrote:

It's disabled for DLL files already but I'd not disable it for regular
LMMS presets. Additionally it'd be unneccessary extra logic to
distinguish between good and bad presets.

Couldn't we just disable it for presets that are in the "vestige"
directory for now? It's an ugly fix, sure, but it'd let us get 1.0.0
released and maybe we could release a more complete fix in a point
release later on.

@tresf
Copy link
Member

tresf commented Mar 19, 2014

I just reproduced this crash with a very small VST (DSK Musicbox)

image

It seems it starts stacking the processes. It seemed to crash at 4 on my PC but after further investigation it seems it never unloads the RemoteVstPlugin32.exe (on windows at least) when the crash occurs.

To add insult to injury, when dragging a VeSTige preset in, it loads once on click, and then again on drag, so a drag and drop loads two instances right away.

These XPFs store the path to the DLLs in them... could we blacklist DLLs from previewing? I know @tobydox didn't want unnecessary extra logic in the preview process but as @musikBear stated, large VSTs probably shouldn't preview anyway. That should cover 99.9% and would be a bit more scalable than a hard coded folder name.

Personally, I really like the idea of a VST preview, this is a fantastic feature and I didn't even know it had existed, but the current process is reproducibly crash prone and probably better to be turned off using some form of file filter until we can determine how this could ever be done without duplication/triplication of child processes.

An idea is to perhaps put a file size limitation on autopreview that's configurable by the user to prevent the unnecessary memory footprint on single click (this may not even help with larger VSTs if they use multiple DLLs) but said size limitation wouldn't fix this particular bug until we can do our best at making a singleton drag-and-drop/preview process, auto-close preview changed process, and for safety perhaps a manually-closable-child process listing.

-Tres

@diizy diizy modified the milestones: 1.1.0, 1.0.0 Mar 23, 2014
@diizy
Copy link
Contributor

diizy commented Mar 23, 2014

Bumping milestone to 1.1 since we don't have time to fix this for 1.0.

@musikBear
Copy link
Author

Looking fwd -closing for now

@diizy diizy reopened this Mar 31, 2014
@tresf
Copy link
Member

tresf commented Jun 4, 2014

I tried creating a patch to suppress VSTs from previewing:

PresetPreviewHandle.cpp#L131

if ( dataFile.content().elementsByTagName( "vestige" ) == NULL )
{
   // load instrument
}

But it won't compile. Complains about accessing pointers that have private-only access.

/usr/include/qt4/QtXml/qdom.h:275:5: error: ‘QDomNodeList::QDomNodeList(QDomNodeListPrivate*)’ is private
~/lmms/src/core/PresetPreviewPlayHandle.cpp:152:61: error: within this context

I'm not sure this would be better anyways because this could potentially break all VST preset from previewing, right?

-Tres

@musikBear
Copy link
Author

what result with an 'if !' statement, and loose compare to NULL
mmm so..
if ! ( dataFile.content().elementsByTagName( "vestige" )) { //load}
(rusty in code ..very :)

@diizy
Copy link
Contributor

diizy commented Jul 18, 2014

So do we have any idea for a fix for this, or shall we bump this up to 1.2?

@tresf
Copy link
Member

tresf commented Jul 18, 2014

I was hoping to put a quick XML check on the dataFile at or around PresetPreviewHandle.cpp#L131 but I had some struggles, mostly lack of knowledge with CPP.

I would really like to see this fixed for 1.1 because it is a relatively small check and fixes a reproducible hard crash, which I find to be the most intrusive to users (and in this case popular enough to be reported twice on our tracker).

@diizy diizy modified the milestones: 1.1.0, 1.2.0 Aug 12, 2014
@tresf tresf changed the title 0.9.90 p.r. v32bit 'pre-hear' feature w. vsts VST Preview Crash Dec 8, 2014
@curlymorphic
Copy link
Contributor

Im confused as to whats needed?

are we trying to stop previewing vst instruments, or any instrument with a vst effect on?

@tresf
Copy link
Member

tresf commented Jan 6, 2015

are we trying to stop previewing vst instruments

Yes.

or any instrument with a vst effect on?

Not sure about effects. Probably good to disable them too but for now, disabling the VST instrument presets would be a big win (or we focus on fixing the underlying crash).

-Tres

@curlymorphic
Copy link
Contributor

or we focus on fixing the underlying crash

I cant reproduce a crash, but i do end up with orphaned vst effects.

Can someone test to see if this crash is still reproducible with master please?

@tresf
Copy link
Member

tresf commented Jan 6, 2015

I cant reproduce a crash, but i do end up with orphaned vst effects.

If you are on Linux, Wine may be handling this better. In this case, we may have to make a Windows installer to reproduce the actual crash.

@curlymorphic
Copy link
Contributor

Some progress

@tresf your if statement was nearly there

if(dataFile.content().elementsByTagName( "vestige" ).length() == 0 )

is what we needed. But this leads onto another issue, what to do when i know its a vestige?

if i simply dont loadTrackSpecficSettings , then a preview of the last selected previewed track will play.
If there was no last preview then lmms segfaults.

I think the cleanest solution maybe to have a dummy preset, (any native synth with vol = 0 ) loaded instead. This dummy preset can simply be an xml string hard coded into the source, to save users ever finding the file.

Is this the way to proceed?

@tresf
Copy link
Member

tresf commented Jan 8, 2015

Is this the way to proceed?

Hmm... We have the concept of dummy instruments. A dummy preview/preset may be a good option.

@tresf
Copy link
Member

tresf commented Jan 9, 2015

Closed via #1587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants