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

Random GUI freezing with VSTs on Linux + XEmbed #5104

Closed
Gps2010 opened this issue Jul 30, 2019 · 23 comments
Closed

Random GUI freezing with VSTs on Linux + XEmbed #5104

Gps2010 opened this issue Jul 30, 2019 · 23 comments

Comments

@Gps2010
Copy link

Gps2010 commented Jul 30, 2019

I am having this issue for some time now. I was hoping it would be fixed with release 1.2.0 but its not. :)

There are two issues, but one I can work around.

The first one is with vst. When I click out side the vst windows, lmms does not respond. I then do alt+ tab to get the focus back to the lmms window.

The other one is more annoying, because what ever I do, LMMS stops responding to me.

When I minimize the LMMS window after this happens and then make it full screen again, the LMMS window does not get redrawn.

In both situations, if the track is playing it just keeps going on.

I do not know well how to explain the last one. What happens most of the time, for instance I want to move a note or shorten it, the mouse pointer changes, and then its all over. The lmms gui totally freezes ? goes unresponsive ?
Also sometimes just moving the mouse pointer in the song editor causes this.

It does not happen all of the time though. Some times twice in 5 minutes, sometimes not once in over an hour. :(

OpenSUSE 42.3, KDE desktop. ( linux 64 bit )

@Gps2010
Copy link
Author

Gps2010 commented Aug 5, 2019

I had started a topic on the LMMS forum.

Somebody on Ubuntu just reported to have the same problem as me.
The freezing of the gui,

http://lmms.io/forum/viewtopic.php?f=7&t=30641&p=63636#p63636

@PhysSong
Copy link
Member

PhysSong commented Aug 5, 2019

Can you record the screen and upload here? It will help identifying and fixing the probelm.

@Gps2010
Copy link
Author

Gps2010 commented Aug 5, 2019

lmmsgui

This one was during me going through synth 1 presets.
Synth 1 GUI kept working, but were did the LMMS GUI go ?

I attempted to get back in to LMMS by ALT + TAB ( this sometimes works, but as you can see not always.

I am not sure its vst related though. This also happens when, I am just trying to change notes in the piano roll sometimes, or move mouse in song editor. The mouse pointer changes shape and its all over, with lmms responding to me.
(the changing of the mouse pointer is normal though, just like when you touch the edge of a note)

@Gps2010
Copy link
Author

Gps2010 commented Aug 6, 2019

Here is the other problem
I wanted to move some notes, and then this happens:

( notes in the piano roll are from synth 1 )

pianoroll

@Gps2010
Copy link
Author

Gps2010 commented Sep 15, 2019

I would like to ask a question.

Have you guys been able to reproduce this problem?

I have been worrying if you guys would be able to reproduce it, since I reported this, because the problem is not consistent.

It would be a great relieve to me if you guys were able to reproduce it. :)

@zonkmachine
Copy link
Member

zonkmachine commented Oct 27, 2019

The other one is more annoying, because what ever I do, LMMS stops responding to me.

When I minimize the LMMS window after this happens and then make it full screen again, the LMMS window does not get redrawn.

@Gps2010 This sounds like a crash and if you start lmms from within the gnu debugger (gdb) you can see this more clearly as you will get a debug statement when it hangs, stops responding. Do you think you can look into providing a backtrace with gdb?

@Gps2010
Copy link
Author

Gps2010 commented Oct 27, 2019

I am using the appimage right now, if I can start from the debugger, would love to help?

If I need to compile LMMS myself, it needs to wait until new pc is finished.

Getting there, but last week been battle windows 10 to install with UEFI.
Hope tomorrow to install Leap 15.1 (opensuse).

(amd ryzen 5 2600 wraith, 16 gig ram, rx 570) (windows for some games that don't have a Linux version)

@PhysSong
Copy link
Member

You can debug AppImages with the following steps:
https://github.com/LMMS/lmms/wiki/Debugging-LMMS#debugging-an-appimage

@Gps2010
Copy link
Author

Gps2010 commented Nov 18, 2019

Sorry it took so long, had allot of issues, but back now with new pc.
Just installed wine, and LMMS is working, ( appimage)

So now finally can debug.

@Gps2010
Copy link
Author

Gps2010 commented Nov 21, 2019

Question time.
I am on openSUSE tumbleweed (rolling release)
I checked and it has gdb installed but, I get confused.

Run ./lmms-x.x.x.AppImage --appimage-extract Run export LD_LIBRARY_PATH="$(pwd -P)/squashfs-root/usr/lib:$LD_LIBRARY_PATH" Run gdb squashfs-root/usr/bin/lmms.real (an optionally second parameter is the path to a core dump)

This started LMMS while some of it was still running in the backgroud.
It was at least still playing the track.

Should I not do this before I start LMMS ?

@and3md
Copy link

and3md commented Jan 25, 2020

Hi I had similar problems (but on Cinnamon Linux Mint 19) and after a few days of fighting I found that embedding VST plugins makes those problems. After changing Plugin Embedding to No embedding LMMS is super stable.

Maybe by default plugin embedding should be turned off on Linux?
@Gps2010 can you check that solution works for you?

@Gps2010
Copy link
Author

Gps2010 commented Jan 25, 2020

I will defenitly give it a try.

Today wondered if it was kde related, but you on mint rules that one out.

Had not used LMMS for months now, not getting much help with the debugging, and some real life shit totally ruined my motivation.

Today started LMMS again, and had again this issue.
I had not start lmms through gdb though.
It did happen today just after, I was going through synth 1 presets.

@Gps2010
Copy link
Author

Gps2010 commented Jan 25, 2020

Will have to test more, but first test is very positive.
I noticed I had 3 options.

Its now set to none (embed)
I could also try qt4, which was the other option presented.
Its none, QT4 or Xembed protocol.

It was set to Xembed.

@and3md
Copy link

and3md commented Jan 25, 2020

In my case, when it is set to Xembed, these random hangs occur (usually after a few minutes in completely random places). When I switch to QT embendding, the UI of the plugin is glitched (black window, some controls draw other not for example Dexed VST) so I can't use it.

In the case of No embedding, everything works, I worked in LMMS a few hours (about 6) without any problems. No freezes :)

Do you use 1.2.0 or 1.2.1?

@Gps2010
Copy link
Author

Gps2010 commented Jan 26, 2020

I am using 1.2.1 now, but with 1.2.0 and versions before this, I had this issue.

I did not report it sooner, because as you say it seems to happen in random places.
That makes filing a use-full bug report hard.

When it however also happened on my new pc I recently have build, I decided it was time.
Just used LMMS again, and I am becoming more and more optimistic, this solution / work around seems to work. (turn off embed)

@and3md
Copy link

and3md commented Jan 26, 2020

I wrote a short article on this topic on my website: https://digitalkarabela.com/how-to-fix-lmms-gui-freezing-on-linux/ Maybe this will help other people if they will search in google.

BTW. When the application hangs, it is not a total crash. The application continues to run, only the GUI is frozen. In gdb I had to press Ctrl+C and use thread apply all backtrace.

I attach the backtrace:
allthreadbacktrace.txt

@PhysSong @zonkmachine Maybe embedding should be turned off by default on linux?

@Gps2010
Copy link
Author

Gps2010 commented Jan 26, 2020

Thank you very much, I was trying to create something like that, but had failed.

This should help the devs. I already posted this workaround on the LMMS forums too.

Edit: I have used LMMS for a few hours now, and can only confirm this solves my problem.
Edit2: Since disabling embed , for days now no problems with LMMS, its as stable as a rock now.

@zonkmachine
Copy link
Member

I attach the backtrace:
allthreadbacktrace.txt

@and3md Thanks for the backtrace! Maybe something for @JohannesLorenz or @DomClark ?

Maybe embedding should be turned off by default on linux?

Maybe. It looks like the default embedding method is defined here:

QString defaultMethod = *(methods.end() - 1);

@DomClark
Copy link
Member

It looks like the UI thread is blocked inside X11 code trying to communicate with the plugin window. What the plugin is doing at this point isn't present in the backtrace, but it doesn't look like any other thread from LMMS is touching it at the time.

@and3md Thank you for the information! Would you able to get a backtrace for the RemoteVstPlugin process as well when the hang occurs? It might be worth running just a single VST at the time so it's obvious which process is relevant.

@and3md
Copy link

and3md commented Feb 24, 2020

@DomClark Just let me know how to do that. RemoteVstPlugin is wine process?

@DomClark
Copy link
Member

RemoteVstPlugin is wine process?

Yes, that's right. You should be able to attach gdb to the process (see, for example, https://sourceware.org/gdb/onlinedocs/gdb/Attach.html), then press Ctrl+C and get a backtrace in the normal way once the hang occurs. I think it would be worth including the backtrace from the main LMMS process again with it, in case it does something slightly different each time.

@and3md
Copy link

and3md commented Feb 25, 2020

@DomClark I did a new backtrace:
allthreadbacktrace2.txt - LMMS
RemoteVstPlugin.txt

To attach gdb to wine process I had to be root. I attached gdb to process 5914:

ps aux | grep Remote 
and3md    5914  6.7  0.4 1813572 74804 pts/0   Sl+  20:19   0:04 /home/and3md/lmms_src/lmms/build/plugins/RemoteVstPlugin.exe.so /tmp/{24df526a-4cb4-42db-b0d6-44314d85c2e5} xembed
and3md    6023  0.0  0.0  15648  1064 pts/2    S+   20:20   0:00 grep --color=auto Remote

In song editor there was only one track with The grand piano VST. Maybe LMMS freezes before I attach gdb to the plugin process. If I should do it earlier let me know and I'll try.

@PhysSong PhysSong changed the title Gui Freezing / becoming unresponsive. Random GUI freezing with VSTs on Linux + XEmbed Apr 26, 2020
@PhysSong
Copy link
Member

Closing as a duplicate of #4885.

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

No branches or pull requests

5 participants