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

Freeze on loading project with Kontakt VST plugin #1008

Closed
abduelhamit opened this issue Jul 18, 2014 · 35 comments · Fixed by #3776
Closed

Freeze on loading project with Kontakt VST plugin #1008

abduelhamit opened this issue Jul 18, 2014 · 35 comments · Fixed by #3776

Comments

@abduelhamit
Copy link

Hey there,
Kontakt 5 Player works fine with LMMS 1.0.2 until I save and load my project.
While loading the project, the plugin loads but LMMS freezes before finishing. I think it has trouble loading the plugin settings.
My OS is Win 8 64 Bit.

@vultraz168
Copy link

Confirm. Kontakt runs fine on LMMS 1.0.3 w/ no issues until loading the project...

@tresf tresf added the bug label Nov 3, 2014
@tresf tresf added this to the 1.2.0 milestone Nov 3, 2014
@tresf
Copy link
Member

tresf commented Nov 3, 2014

Possible duplicate #1049

@tresf
Copy link
Member

tresf commented Jan 10, 2015

@Umcaruje do you have the ability to do an interim Windows build to see if #1049 fixes this?

@Umcaruje
Copy link
Member

@Umcaruje do you have the ability to do an interim Windows build to see if #1049 fixes this?

Yeah, will do. master branch, right?

@tresf
Copy link
Member

tresf commented Jan 10, 2015

Yeah, will do. master branch, right?

👍

@Umcaruje
Copy link
Member

Well, just got an error with gigplayer while compiling:

Scanning dependencies of target gigplayer
[ 81%] Building CXX object plugins/GigPlayer/CMakeFiles/gigplayer.dir/GigPlayer.obj
In file included from /home/umcaruje/lmms/plugins/GigPlayer/GigPlayer.h:42:0,
                 from /home/umcaruje/lmms/plugins/GigPlayer/GigPlayer.cpp:39:
/opt/mingw32/include/gig.h:434:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::UnityNote;
             ^
/opt/mingw32/include/gig.h:435:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::FineTune;
             ^
/opt/mingw32/include/gig.h:436:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::Gain;
             ^
/opt/mingw32/include/gig.h:437:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::SampleLoops;
             ^
/opt/mingw32/include/gig.h:438:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::pSampleLoops;
             ^
/opt/mingw32/include/gig.h:455:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::AddSampleLoop;
             ^
/opt/mingw32/include/gig.h:456:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Sampler::DeleteSampleLoop;
             ^
In file included from /home/umcaruje/lmms/plugins/GigPlayer/GigPlayer.h:42:0,
                 from /home/umcaruje/lmms/plugins/GigPlayer/GigPlayer.cpp:39:
/opt/mingw32/include/gig.h:672:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::pInfo;
             ^
/opt/mingw32/include/gig.h:673:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::pDLSID;
             ^
/opt/mingw32/include/gig.h:675:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::IsDrum;
             ^
/opt/mingw32/include/gig.h:676:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::MIDIBank;
             ^
/opt/mingw32/include/gig.h:677:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::MIDIBankCoarse;
             ^
/opt/mingw32/include/gig.h:678:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::MIDIBankFine;
             ^
/opt/mingw32/include/gig.h:679:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::MIDIProgram;
             ^
/opt/mingw32/include/gig.h:680:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Instrument::Regions;
             ^
/opt/mingw32/include/gig.h:691:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::GetParent;
             ^
/opt/mingw32/include/gig.h:753:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::pInfo;
             ^
/opt/mingw32/include/gig.h:754:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::pDLSID;
             ^
/opt/mingw32/include/gig.h:756:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::File::pVersion;
             ^
/opt/mingw32/include/gig.h:757:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::File::Instruments;
             ^
/opt/mingw32/include/gig.h:760:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::Resource::GetParent;
             ^
/opt/mingw32/include/gig.h:762:13: error: access declarations are deprecated in favour of using-declarations; suggestion: add the 'using' keyword [-Werror=deprecated]
             DLS::File::Save;
             ^
cc1plus: all warnings being treated as errors
plugins/GigPlayer/CMakeFiles/gigplayer.dir/build.make:77: recipe for target 'plugins/GigPlayer/CMakeFiles/gigplayer.dir/GigPlayer.obj' failed
make[2]: *** [plugins/GigPlayer/CMakeFiles/gigplayer.dir/GigPlayer.obj] Error 1
CMakeFiles/Makefile2:7539: recipe for target 'plugins/GigPlayer/CMakeFiles/gigplayer.dir/all' failed
make[1]: *** [plugins/GigPlayer/CMakeFiles/gigplayer.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2

I'll probably make an issue later, gonna compile without gig for now.

@tresf
Copy link
Member

tresf commented Jan 10, 2015

Sounds good. May be a GCC version-specific issue.

@DanWin
Copy link
Contributor

DanWin commented Jan 10, 2015

@Umcaruje GigPlayer wasn't able to build for you, because no one had enabled the windows builds yet. I made a pull request that should fix your issues #1591 But as travis uses ubuntu presice and not trusty, the package is missing in the ppa as it failed to build for precise. If you want to, you can apply my changes by hand and enable building, as long you use the trusty ppa.

@Umcaruje
Copy link
Member

Ok so here are some builds :
win64: https://drive.google.com/file/d/0B49dcRGtm8vJUzBSRzYza2REUjA/view?usp=sharing

win32: https://drive.google.com/file/d/0B49dcRGtm8vJMllKeGhFSUpyYjA/view?usp=sharing

They do not include Gig player.

P.S. @DanWin thanks for the solution!

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 10, 2015

Information: I will not download Kontakt for this, someone with Kontakt can test it out please, @Radiarc (don't remember his github name)

@tresf
Copy link
Member

tresf commented Jan 10, 2015

Information: I will not download Kontakt for this

Really? Don't they have a demo? We don't have many Windows testers, so to flat out state you won't test something without reason is a bit alarming.

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 10, 2015

It is huge, at least the last time I downloaded it, and then I never used it... So if no one else really have Kontakt installed I guess I can do it as a backup plan

@tresf
Copy link
Member

tresf commented Jan 11, 2015

If we have to pull teeth for help, forget it. I'll do the testing. This VST is important to our users and that should carry some weight, regardless of the 20 minute burden this may have to download install and verify.

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 20, 2015

I asked a guy on facebook which had the error to install the LMMS builds by Uros, it couldn't start for him.

https://www.facebook.com/makefreemusic/posts/853110868078438

Unrelated: I thought I posted a comment yesterday about this... now it is gone, and this have happened before.

@DeRobyJ
Copy link
Contributor

DeRobyJ commented Jan 22, 2015

Problem existing on LMMS 1.1, win8 64bit. (an Italian user asked me for it)
I can't test it right now, I don't have the minimum requirements >->

@curlymorphic
Copy link
Contributor

Unrelated: I thought I posted a comment yesterday about this... now it is gone, and this have happened before.

I have had that a few times now, still not sure if its user error.

@curlymorphic
Copy link
Contributor

using https://drive.google.com/file/d/0B49dcRGtm8vJMllKeGhFSUpyYjA/view?usp=sharing I could not get any vst instruments or effects to load

@Umcaruje
Copy link
Member

using https://drive.google.com/file/d/0B49dcRGtm8vJMllKeGhFSUpyYjA/view?usp=sharing I could not get any vst instruments or effects to load

Probably because I used the new packages in the Ming-w ppa :/

@curlymorphic
Copy link
Contributor

@Umcaruje thanks. At least i know i can move on, and come back to this later.

@tresf
Copy link
Member

tresf commented Mar 8, 2015

Most likely duplicate of #607 and #1008. Closing, marking as such. Please reopen if you believe this was closed in error, or if you are able to reproduce with the latest 1.1.3 build from our [https://lmms.io/download](downloads page).

@tresf tresf closed this as completed Mar 8, 2015
@tresf tresf added the duplicate label Mar 8, 2015
@Partago
Copy link

Partago commented Jul 13, 2015

I am able to reproduce this error in 1.1.3, latest version (as of 13 juli 2015). When I have a fresh project, in which I add the Kontakt 5 Player vst (64 bit), the vst loads fine and within one second. When I open up an existing project which contains the Kontakt 5 Player, it loads the project fine, loads the vst, and after the vst is fully loaded and the GUI is visible, LMMS hangs and gets unresponsive.

So, the vst loading doesn't fail for me, it's the event afterwards. It seems to be stuck in some sort of loop, or LMMS doesn't get the message that the vst is done loading and keeps waiting for it.

No matter how long I keep LMMS running, there is no processor activity and the counter remains on 88% (where it started loading the vst).

And this happens ALWAYS, I have had no event in which the project loaded fully. My system is Windows 8.1.

@Xenofection
Copy link

I've downloaded Kontact 5 after a friend recommended it, but didn't bother messing around with it until tonight. Spent a couple hours messing around with it in a project before switching to an old project to check something. When I switched back to my new project, LMMS kept crashing. Since I normally don't have this problem, I googled to see if there is an issue with LMMS and Kontact. Lo and behold, I find this thread. I am a Windows 10 user with LMMS 1.1.3 and I can confirm the issue. I am saddened to see that there hasn't been any movement on fixing this bug since Partago confirmed the issue in Windows. Hopefully my posting something will reinvigorate a fresh look into the issue.

@JohnLopez38
Copy link

Hello , here I have the same problem and this for several years. I wish that this bug is studying me because it becomes so unbearable that I 'm about to change and take sequencer FL STUDIO

Problem , I am very attached to LMMS . It accompanied me since childhood .

I am running Windows 10, same problem W7 - W8- W8.1 -W10

KONTAKT launch at the start of a project , but he did not launch my extension and freezes.

I hope I have not made ​​too many errors in writing because I 'm French .

Sincerely, Jonathan

@tresf
Copy link
Member

tresf commented Mar 30, 2016

I 'm about to change and take sequencer FL STUDIO

We lack the experienced developers needed to fix this. If this plugin is a show stopper, switch to a sequencer that can support it. 👍

If you want to stick with LMMS, help find eager developers. 👍

@Glandulf
Copy link

Glandulf commented Apr 1, 2016

I've got the same problem, running LMMS 1.1.3, Windows 7, 32bits. Everything's fine until I wanna open a project which contains Kontakt 5, LMMS starts charging, then crashes.

@basistime
Copy link
Contributor

Hello,

I ran into this bug myself, (1.1.3 and 1.1.90, Win 7, 64 bit) and came across this thread. I've decided to give fixing it a shot. I've managed to compile and run in MinGW-w64, and I've been digging in the code off and on for a while now.

Since the bug only appears when loading an existing project, I tried to fiddle with the save files themselves. It seems like the only substantial differences between a project that couldn't be loaded (containing Vestige with Kontakt 5) and one that could (containing Vestige with TyrellN6) were in the library path and "chunk". I've managed to rule out the chunk and confirm that which library is used is the only thing in the save file related to the hang. Of course, I could be severely misunderstanding them, but I don't think so.

As for the code itself, I managed to track the hang down to a call to the plugin's dispatcher on line 278 of RemoteVstPlugin.cpp. The call comes from line 679 of RemoteVstPlugin.cpp, which issues the effEditOpen command. Notably, that dispatcher call only hangs when loading an existing LMMS project, not when creating a new Vestige track and loading Kontakt 5 into it. Unfortunately, I've had trouble getting down there with gdb, which is why I haven't gotten further down yet, and why I didn't give you a real backtrace. Sorry about that.

Right now, I'm exploring the dispatcher and how that gets defined. If anyone is open to being available for a dumb question about the architecture once in a while or if you'd rather I back away slowly and let the professionals handle this, feel free to let me know!

@tresf
Copy link
Member

tresf commented Sep 17, 2016

I've had trouble getting down there with gdb

I wasn't able to build with debug symbols either. If you figure this out, please update our wiki to reflect the steps it took.

I've managed to compile and run in MinGW-w64

👍

If anyone is open to being available for a dumb question about the architecture once in a while or if you'd rather I back away slowly and let the professionals handle this, feel free to let me know!

@jasp00 is the most qualified to answer the VST bridge related questions.

@jasp00
Copy link
Member

jasp00 commented Sep 18, 2016

If anyone is open to being available for a dumb question about the architecture once in a while

I am not very available, but feel free to ask. I will answer if possible.

or if you'd rather I back away slowly and let the professionals handle this

Please do step forward, people that want to help are welcome.

@basistime
Copy link
Contributor

Apologies for the slow progress. I got involved in a few other things around town and I'm just getting back into this. @jasp00, what would the best resources for learning about the VST bridge be for someone generally unfamiliar with the subject? I've found some on the internet, but if you have a recommendation, I'd value that over the random things I've stumbled across. There are also a number of online tutorials for that SDK, but I'd rather stick with information about the free version if there are major differences.

Thank you for your time.

@jasp00
Copy link
Member

jasp00 commented Oct 10, 2016

The best resource about VST in LMMS is the source code for RemoteVstPlugin. processMessage() handles host to plug-in messages; hostCallback(), plug-in to host ones. You may add fprintf(stderr, lines to understand the communication.

@basistime
Copy link
Contributor

I'm always hoping to have better news to post, but that doesn't seem to be working out so far. While I was digging into what exactly might be hanging, I found something strange.

Essentially, part of the plugin can be loaded from the previously saved file if there is a long enough sleep at the end of RemoteVstPlugin::load, but this appears to be affected by precise code placement and a bit of luck.

To replicate this behavior in the most light-weight manner I've found (Line numbers are after previous steps):
0. Clone LMMS and build on MinGW (May not be MinGW-only, discussed below).

  1. Include <chrono> and <thread> on lines 81 and 82, respectively, then add a blank line on line 83.
  2. Add an extra blank line on line 671.
  3. Comment out lines 682, 693, 695, and 696
  4. Remake and run LMMS.
  5. Load a file that contains a Vestige track with Kontakt 5 Player. The program should hang.
  6. Abort LMMS and kill RemoteVstPlugin.exe
  7. Insert std::this_thread::sleep_for( std::chrono::seconds( N ) ); on line 765, where N may vary based on your machine. 10 seconds worked for me. Most of the time.
  8. Repeat steps 4 and 5.
  9. After the wait, control will return to the user. A child window will load, but there won't be anything in it.

This did work, until about the 15th time I tried to confirm the lightest way to do this. Then even this stopped working regularly. I could try to get it working regularly again and then put a branch in my fork if anyone's interested. Otherwise, I'm not sure where to go from here. It seems like a thread race, but I'll have to dig into how the threading works more to be sure.

As an aside, I'm also interested in whether this issue shows up for anyone using the OSX version of Kontakt 5 Player. I didn't see anyone confirm either way in this thread. It's free (as in beer, with an email signup), so if someone was willing to try it out that could provide useful information.

Thanks for reading this whole thing!

@tresf
Copy link
Member

tresf commented Oct 27, 2016

I'm also interested in whether this issue shows up for anyone using the OSX version of Kontakt 5 Player.

FYI, Mac VSTs aren't supported yet (not native nor wine).

@basistime
Copy link
Contributor

Oh, whoops, I'd read that somewhere and totally forgot. Thanks!

@WrillicR
Copy link
Member

Has this been fixed yet?

@tresf
Copy link
Member

tresf commented Jan 19, 2017

Has this been fixed yet?

No. Some good feedback is available in this thread such as #1008 (comment) however nothing has been done to the codebase to patch this specific issue. We can track this in #3274.

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

Successfully merging a pull request may close this issue.