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

OS X UI hangs during playback #2504

Closed
sunnystormy opened this issue Jan 6, 2016 · 57 comments
Closed

OS X UI hangs during playback #2504

sunnystormy opened this issue Jan 6, 2016 · 57 comments

Comments

@sunnystormy
Copy link

When playing back audio tracks in the Max OS X 1.1.3 version the UI suddenly stops updating within a few seconds. Audio will continue to play, and the buttons on the screen still work, but the time-elapsed labels, mixer, and song editor stop animating/updating properly. I'm wondering if this is a memory allocation and/or threading issue?

I'm running a Mac Mini (Late 2014) with a 1.4 GHz dual-core processor with El Capitan (10.11.2).

Thank you for your help!

@tresf tresf changed the title LMMS v1.1.3 OS X: UI hangs during playback OS X UI hangs during playback Jan 7, 2016
@tresf
Copy link
Member

tresf commented Jan 7, 2016

This sounds vaguely similar to a theming issue we used to have with upgraded versions, but not identical since you report this starts after a few seconds of playback.

Does this eventually recover, or just keep having refresh issues?

I've tested on Lion, Mountain Lion, Mavericks, Yosemite without this issue, so it may be new with El Capitan, which I haven't performed any testing on yet. @rhunter @follower @jaehyunmicro @eagles051387 are you on El Capitan? If so, can you reproduce?

@sunnystormy
Copy link
Author

@tresf
It happens whenever multiple tracks are within scope of the scroller as it's moving inside of the song editor during playback. Both the song-editor, the time-elapsed labels, and the mixer stop animating properly. As the song finishes, the animation returns to normal.

I tested this with "Tectonic", which finishes with only one track playing, and the animation returned to normal speed as the song completed. It's during the middle of playing, when there are multiple tracks with notes in them at the same time, that the animation begins to grind to a halt.

I should also add, that when selecting virtual instruments inside of the instrument plugins pane, the animation bubbles for each instrument animate slowly as well. Perhaps this is related?

EDIT: It may depend on the song being played as well. I played Zakarra's "Mainstream Melody" and the hanging issue didn't recover after the end of the composition.

@follower
Copy link
Contributor

Alas, I'm not on El Cap, so am no help. :)

@sunnystormy
Copy link
Author

@tresf
Is there a way you could show me how to compile the source code on Max OS X so I can test the application with the Master branch's source? If this issue hasn't already been fixed, I'll happily take on the task of fixing it myself.

@Umcaruje
Copy link
Member

@sunnystormy Here's an extensive guide on building lmms on OS X: https://github.com/LMMS/lmms/wiki/Compiling-lmms-(Apple)

Hope that helps.

@sunnystormy
Copy link
Author

@tresf
I've just tested the 1.1.3 version of the application on another laptop with OS X Yosemite prior to upgrading it to El Capitan. Yosemite had no issues, so I've confirmed that the problem isn't hardware-related, and is exclusive to the latest version of OS X.

Is there a way that this could be marked as a bug? Or should I take care of that myself?

@tresf
Copy link
Member

tresf commented Feb 9, 2016

@sunnystormy done although it doesn't necessarily make a difference as to if it will be worked on or not. Most of our devs don't have Mac environments. Furthermore, there's little evidence to suggest this is a LMMS bug... It could equally be a bug combo with QT4 + Cocoa (prob worth a try with QT5 soon).

But we'll leave this open until we know more. 👍

@sunnystormy
Copy link
Author

@tresf
You make a valid point, it could very well be an issue with its dependencies. Thank you for your help!

@sunnystormy
Copy link
Author

@Umcaruje @tresf

I've tried compiling from source but keep getting issues:

CMake Error at /opt/local/share/cmake-3.4/Modules/FindQt4.cmake:1324 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:160 (FIND_PACKAGE)

I've got the "qt4-mac" package installed via Macports, so this is confusing. Any help would be appreciated! ^_^

@tresf
Copy link
Member

tresf commented Feb 14, 2016

@sunnystormy Homebrew or Macports?

@sunnystormy
Copy link
Author

@tresf

Macports

@tresf
Copy link
Member

tresf commented Feb 14, 2016

Does it recognize the command qmake? It sounds a bit fishy that it won't find qt4. Also, did you install each package by hand via Compiling-lmms-(Apple)#macports or did you use the sudo port install lmms command? I ask because sometimes pkgconfig missing can cause strange issues.

We haven't used MacPorts in a while now and my MacPorts machine is out of reach at the moment. I know Homebrew logic is in good shape. Do you use MacPorts already or was it just your first choice?

@sunnystormy
Copy link
Author

@tresf No, it doesn't recognize the command "qmake". I installed each package individually, and not by using the "lmms" command. I used Macports simply because it was the one I was the most familiar with. I'm wondering if I need to install the "qt4-creator-mac" package as well?

I'm open-minded to trying other things too, if you have other suggestions.

@tresf
Copy link
Member

tresf commented Feb 14, 2016

qt4-creator-mac won't be needed. It sounds like MacPorts hasn't been added to your environment variables/path. Can you confirm that you can install something else with MacPorts and that it is reachable via command line?

@sunnystormy
Copy link
Author

@tresf I'm able to use "npm" to install packages, so if this applies, then, yes.

@sunnystormy
Copy link
Author

@tresf Tried installing with Homebrew instead and get the following when trying the shell script:

fltk: This formula either does not compile or function as expected on OS X
versions newer than Yosemite due to an upstream incompatibility.

What do I do?

@tresf
Copy link
Member

tresf commented Feb 15, 2016

You can turn off fltk (disables Zyn) via WANT_FLTK in CMakeLists.txt. You could try compiling from source too, but probably overkill.

@sunnystormy
Copy link
Author

@tresf But without ZynAddSubFX... that limits a lot of music-composition options. :(

I kind of feel like I'd want to have that around.

I'll compile from source just to make sure that this issue is resolved. I guess making sure all of the dependencies are updated will have to follow.

UPDATE:

Now it's not finding "libsndfile" when trying to compile, even though Homebrew says it's installed:

CMake Error at CMakeLists.txt:178 (MESSAGE):
  LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.11 - please install,
  remove CMakeCache.txt and try again!

@tresf
Copy link
Member

tresf commented Feb 16, 2016

without ZynAddSubFX... that limits a lot of music-composition options. :( I kind of feel like I'd want to have that around.

In the context of the bug report "OS X UI hangs during playback", it's irrelevant, which is the only reason I proposed it.

Now it's not finding "libsndfile" when trying to compile, even though Homebrew says it's installed:

I'm not sure how or why you are having so many problems with compilation. I have a El Capitan box I can test the build process out on, but it would be several weeks before I'd be able to fire it up and check our tutorial against it. I build all of the DMGs against Lion because I can't figure out how to get modern builds to run on older OS X releases.

We have a few other Mac developers on here that may be able to help or may have encountered your issues.... @rhunter, @rageboge and probably a few others.

@sunnystormy
Copy link
Author

@tresf Cool, man! Wasn't trying to knock you or anything with my ZynAddSubFx comment, I just really love the different plugins available and appreciate the amount of effort you guys have made. : )

I'll take a back seat at this point and see if anybody else has anything to add. Thanks again for all of your help!

@tresf
Copy link
Member

tresf commented Feb 16, 2016

@sunnystormy Just to give you some more troubleshooting information...

We have a build fire on OS X each time a code submission comes in which is run by Travis-CI.

The build process is as follows:

  1. https://github.com/LMMS/lmms/blob/master/.travis/osx..install.sh
  2. https://github.com/LMMS/lmms/blob/master/.travis/osx..script.sh

To see what the output of one of these commands looks like:

I believe this build is being fired on Mavericks, but I'm having a hard time confirming this so if your issue is related to the OS X version, getting another dev to try out the build process is the fastest way to get this going. 👍 Unfortunately, we have very few Mac devs.

@mauicoder
Copy link
Contributor

I'm on El Capitan 10.11.3 and the build is working fine for me.
I had a problem with qt4-mac, as reported in macports ticket they removed the link to the qmake in favor of a qt_chooser port that is not yet officially available, so I had to create 2 links manually (I have only qt4, no need to dynamically select the qt version).

sudo ln -s /opt/local/libexec/qt4/bin/qmake /opt/local/bin/qmake   
sudo ln -s /opt/local/libexec/qt4/bin/lrelease /opt/local/bin/lrelease

I also had to create a new build folder from scratch, but you shouldn't have the same issue if it is the first time you build it.
My ports are up-to-date.

@tresf
Copy link
Member

tresf commented Feb 17, 2016

@sunnystormy

Silly question, but did you properly install the XCode command line tools via sudo xcode-select --install? There can be some very strange errors if they're not installed and these are listed as prerequisites in the install instructions.

I'm running Brew + El Capitan right now. It'll take a day or so, I'll report my progress. 🍺

@tresf
Copy link
Member

tresf commented Feb 17, 2016

@sunnystormy

Ok, I'm running into build issues too, and they appear to be related to upgrading my OS from Yosemite to El Capitan without reinstalling XCode. Edit: Added to wiki. Perhaps that helps... Continuing. 👍

@sunnystormy
Copy link
Author

@tresf Just so you know, I didn't install Xcode on my device until after I upgraded the OS. I also have the command-line tools installed. Hope that helps.

@tresf
Copy link
Member

tresf commented Feb 17, 2016

@tresf Just so you know, I didn't install Xcode on my device until after I upgraded the OS. I also have the command-line tools installed. Hope that helps.

Yes it does. I've added the hint to our tutorial anyways because it just snagged me. My El Capitan environment won't download XCode, so I'm troubleshooting that still. 🍷

@tresf
Copy link
Member

tresf commented Feb 18, 2016

@sunnystormy After reinstalling XCode (I chose 7.3 beta for this particular machine) the build is starting...

image

If you'd like I can upload the build for you to try out to see if it resolves the refresh issues you are encountering.

@tresf
Copy link
Member

tresf commented Feb 19, 2016

Nope

Thanks. Fired the changes via #2595.

@sunnystormy
Copy link
Author

@tresf Downloaded your build and the issue still exists. :(
I'll try building this on my own sometime later to see if a local build helps fix the problem.

EDIT:
After building, the issue still persists. @tresf Could you please upload a build of one of the stable versions for testing? Thank you.

@tresf
Copy link
Member

tresf commented Feb 20, 2016

@tresf Could you please upload a build of one of the stable versions for testing? Thank you.

Unfortunately, if it doesn't work with master, it won't work with stable-1.1.3 either. @furthermore, I can't reproduce the problem in my El Capitan VM. I do have a physical machine I can upgrade to test this redrawing bug out. I'll start the El Capitan upgrade process right now on a physical machine to see if I can reproduce this.

@tresf
Copy link
Member

tresf commented Feb 20, 2016

@sunnystormy, I just upgraded my physical box to OS X 10.11 "El Capitan" as well and did a fresh install of lmms-1.1.3-mac10.7.dmg from our downloads page. I still cannot reproduce. Here are my test results:

https://youtu.be/Dkw1iUwuYow

@sunnystormy
Copy link
Author

@tresf Hmm... Well, I had this error occur on both my Mac Mini and Macbook Pro laptop with El Captian installed (with the latest updates). I just downloaded the dmg from the main page and the issue is still occurring. I don't know what screen-capture technology exists, but perhaps seeing is believing?

@tresf
Copy link
Member

tresf commented Feb 20, 2016

I used QuickTime for screen capture.

@tresf
Copy link
Member

tresf commented Feb 20, 2016

Also, do either/both machines have any 3rd party components from QT installed globally? Perhaps MacPorts/homebrew conflict, etc? There a command on Mac to show the DYLIBs in use, but I'll have to look it up.

@sunnystormy
Copy link
Author

@tresf This problem was occurring prior to installing anything related to that. Also, I've created the quicktime screen-capture to demonstrate the issue. How would you like me to send it to you? It's ~60MB in size.

@tresf
Copy link
Member

tresf commented Feb 20, 2016

Google drive, drop box, YouTube, whatever. 👍

@sunnystormy
Copy link
Author

@tresf
Copy link
Member

tresf commented Feb 20, 2016

Does the same thing happen if you are composing a new track? That looks like the software is working ok at first, but running very, very slow as it gets deeper into the track.

@sunnystormy
Copy link
Author

@tresf Yes. But only when there are multiple tracks playing at the same time on the song editor. Keep in mind that the audio plays just fine, it's only the UI that begins to stutter and stop.

@tresf
Copy link
Member

tresf commented Feb 21, 2016

@sunnystormy I can confirm this track performs equally as bad on my machine. Looking at the CPU, it spikes from 25% - 50% depending. Some tracks play OK, but once the CPU goes over 25% the GUI doesn't refresh very well. Sometimes the EQ hangs for seconds at a time.

Is this a bug? Probably. Is it new to El Capitan? I don't know, we'd have to do some much more specific benchmarks on physical hardware with various OS X versions to know for sure.

Here are some conversations on how we don't utilize CPU very efficiently... #2295 #1916 #1600 (comment) #643 (comment)

If you know a thing or two about debugging, we'd be happy to get some benchmarks on where/why our resources are out of control on OS X. 👍

@sunnystormy
Copy link
Author

@tresf Should this ticket remain closed, then? Or should we simply defer it to other tickets, like the ones you mentioned?

@tresf
Copy link
Member

tresf commented Feb 21, 2016

🍺

@tresf tresf reopened this Feb 21, 2016
@eagles051387
Copy link

Probably a stupid question here, but has anyone tried to open the code base
in xcode and run it through the profiler that is part of xcode? Reason I am
asking is that I think it would be useful as well to allow it as an IDE to
provide code hints as well that could help us pinpoint issues for mac users.

I will submit another ticket about creating an xcode project for mac
developers.

This email has been sent from a virus-free computer protected by Avast.
www.avast.com https://www.avast.com/sig-email
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Jonathan Aquilina

On Sun, Feb 21, 2016 at 3:02 AM, sunnystormy notifications@github.com
wrote:

@tresf https://github.com/tresf Should this ticket remain closed, then?
Or should we simply defer it to other tickets, like the ones you mentioned?


Reply to this email directly or view it on GitHub
#2504 (comment).

@tresf
Copy link
Member

tresf commented Feb 21, 2016

@eagles051387 yes, please do. When you have working instructions for debugging in XCode (or even QTCreator), I'll happily test them out and publish them to our wiki.

If you would please write them in markdown format (e.g. on your fork) that would be a great start.

@tresf
Copy link
Member

tresf commented Feb 21, 2016

I will submit another ticket about creating an xcode project for mac developers.

Please do not create additional tickets for this. We don't have intructions for .NET either, let's take this one step at a time.

@tresf
Copy link
Member

tresf commented Feb 24, 2016

@eagles051387 any progress with the debugging/profiling process instructions?

@eagles051387
Copy link

Just unwinding after a crazy day at work, Will be trying to get it sorted
soon.

This email has been sent from a virus-free computer protected by Avast.
www.avast.com https://www.avast.com/sig-email
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Jonathan Aquilina

On Wed, Feb 24, 2016 at 5:47 PM, Tres Finocchiaro notifications@github.com
wrote:

@eagles051387 https://github.com/eagles051387 any progress with the
debugging process instructions?


Reply to this email directly or view it on GitHub
#2504 (comment).

@tresf
Copy link
Member

tresf commented Feb 24, 2016

@sunnystormy I've added a Qt5 build here for troubleshooting: tresf/lmms-1.1.90.1-gb55b1ab-mac10.11-qt5.dmg.

Warning, the settings dialog is a burden to click if you've purged ~.lmmsrc.xml. Probably worth opening a new bug report for, but wanted to warn you about it if you're testing on a machine that hasn't had LMMS installed before.

@sunnystormy
Copy link
Author

@tresf Success! 😄

The interface responds appropriately, and everything seems to be working smoothly (for some songs, not all of them). Thank you for this QT5 build!

EDIT:

The application seems to have a problem exiting, though... I have to force-quit to get it out of my dock. : /

@tresf
Copy link
Member

tresf commented Feb 25, 2016

@sunnystormy Ok great. We'll attribute it to Qt4 + OSX 10.11 then and close this out since we can't directly fix it. If we can iron out all of the bugs with QT5 we may be able to switch to it for our 1.2 build, but we don't have a whole lot of testing results yet.

  • For starters, the whole splash screen covering the dialogs needs to be patched. I'm working on packaging Windows using Qt5 now to see if that bug is reproducible there.
  • Furthermore, the build environment we're currently using (I'm using) has always been Lion for backwards compatibility, but per QT 5.5.1 Failing to Build on Mac OS X 10.7.5 Homebrew/legacy-homebrew#45284, Mountain Lion or higher is needed for Qt5, so it will be some additional work before setting up that build environment.

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

7 participants