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: scsynth icon bounces forever in the dock #1804

Closed
crucialfelix opened this issue Jan 19, 2016 · 37 comments
Closed

OS X: scsynth icon bounces forever in the dock #1804

crucialfelix opened this issue Jan 19, 2016 · 37 comments
Assignees
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: macOS
Milestone

Comments

@crucialfelix
Copy link
Member

I would prefer that scsynth did not appear in the dock at all. But then again it makes it easier to kill it.

It definitely shouldn't be bouncing forever and ever like that. I guess its because the process started but it isn't an OS X application (no NSApplication)

@crucialfelix crucialfelix added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: macOS labels Jan 19, 2016
@crucialfelix crucialfelix added this to the 3.7.0 milestone Jan 19, 2016
@crucialfelix crucialfelix self-assigned this Jan 19, 2016
@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

Today I pulled and compiled again, on 10.9.5 / Xcode 6.2, and none of that happens.
Besides I (virtually) never saw scsynth popping up anywhere.

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

I can confirm on 10.10.5 / Xcode 7.0.1 I can see scsynth showing up and bouncing. Still not on 10.9.5. ("still" because I gave it a deployment target of 10.7 for the second test)

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

and I suspect it may be related to #1805 - but that's just a hunch.

@crucialfelix
Copy link
Member Author

I've only recently noticed it, so I can well believe that it only happens on 10.10+

isn't it always a deployment target of 10.7 ? did you explicitly set it to something else previously ?

@sfogar
Copy link

sfogar commented Jan 20, 2016

On 10.10 this does not happen...

@telephon
Copy link
Member

On 10.11. it bounces for a while (too long to be sane) but then it stops. Probably the system has a setting for stopping it automatically after a while, so something is still wrong.

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

@crucialfelix I browsed the logs and the deployment target appears to be depended on Xcode's version!
I'm not a dev, so I only can guess what's the idea (or error?) behind that.
E.g. that's from 10.9.5/Xcode 6.2 w/o additional options for cmake:
build/CMakeFiles/CMakeOutput.log: export MACOSX_DEPLOYMENT_TARGET=10.9
That's from 10.10.5/Xcode 7.0.1 also w/o additional options for cmake:
build/CMakeFiles/CMakeOutput.log: export MACOSX_DEPLOYMENT_TARGET=10.11
as I found this morning, binaries generated this way won't even run on 10.10.
So I had to set a deployment target <= 10.10

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

@sfogar - how did you get/generate the binaries?

@sfogar
Copy link

sfogar commented Jan 20, 2016

I did not generate the binaries by myself it's the 3.7.0 beta1 submitted yesterday ...

@crucialfelix
Copy link
Member Author

Thanks @miczac

I se that the travis build explicitly sets -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

  • AFAICT, until 10.9.5/Xcode 6.2 (x) wrong icons or bouncing scsynth don't occur.

screen shot 2016-01-20 at 2 30 49
(x) didn’t happen on 10.8.5 either.

  • binaries compiled on 10.10.5 w/ Xcode 7.0.1 for OS X >= 10.7 (same source-tree!) on 10.10.5 cause three cubes, one bouncing for scsynth.

screen shot 2016-01-20 at 02 28 48

  • but those very binaries launched on 10.9.5 show two cubes for sclang and ide, but no bouncing scsynth.

screen shot 2016-01-20 at 2 33 47

  • and, if it wasn't funny enough, the binaries from 10.9.5 (above) on 10.10.5 show the correct icons for ide and sclang and the bouncing icon for scsynth.

screen shot 2016-01-20 at 14 27 28

On top of it, @sfogar downloaded the binaries, which IIRC are built by travis on 10.9.5 (which implies Xcode <= 6.2) - and no bouncing icon?

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

@sfogar on what OS X version are you exactly?
I just downloaded the binaries (SC-9899190d8808191e871cbfced848d7791374ed8c.zip) and ran it on 10.10.5.
I got the correct icons for ide and sclang but also the bouncing scsynth cube.

@crucialfelix
Copy link
Member Author

brutalism

Works for me.

@miczac
Copy link
Contributor

miczac commented Jan 20, 2016

ok, works now, updated the comment again - thanks!

@crucialfelix
Copy link
Member Author

Here are the docs:

https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSRunningApplication_Class/index.html#//apple_ref/c/tdef/NSApplicationActivationPolicy

I think we want NSApplicationActivationPolicyAccessory for sclang

The application does not appear in the Dock and does not have a menu bar, but it may be activated programmatically or by clicking on one of its windows. This corresponds to value of the LSUIElement key in the application’s Info.plist being 1.

but these are processes being started from the SuperCollider (parent) process, and there is no objective-c in either of them and they have no plist of their own.

After starting a process you can transform its process type:

ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);

but its more likely that you just set this flag when you first launch the process..

This is what we want: sclang would not be in the doc at all. if and when you create a window, then its in the dock.

scsynth: never in the dock NSApplicationActivationPolicyProhibited

@sfogar
Copy link

sfogar commented Jan 20, 2016

@miczac I'm on 10.10, I am currently away from my Mac so no further details at the moment ...

@miczac
Copy link
Contributor

miczac commented Jan 28, 2016

Update, in reply to #1804 (comment)

Just in case, FWIW,
the screenshots I posted from the 10.10 system [1] were with Qt 5.4 (.1 I think).
It’s now with Qt 5.5.1 and after re-compiling it’s just the bouncing scsynth icon on 10.10 and the uniform process names left:

screen shot 2016-01-28 at 16 29 55

On 10.9.5 [1] the dock icons are ok, besides that scsynth won’t come up (tested w/ supernova):

screen shot 2016-01-28 at 18 19 12

[1] compiled on 10.10.5 w/ Xcode 7.2 - deployment target 10.7

@crucialfelix
Copy link
Member Author

I worked on this a bit. I haven't yet found any way to stop the icon from being shown for any executable that is in that MacOS folder.

one solution is to create a separate bundle for scsynth and its plugins with its own plist that specifies not to activate windows, menu, icon or dock. this means changing the path of scsynth which is disruptive for the 3.7 release

another solution is to move scsynth and plugins to SuperCollider.app/scsynth/ which means that it would not get the icon (because its not inside the main app bundle). also disruptive in that the path changes. but its easy to copy it to somewhere else if we want a standalone scsynth.

@crucialfelix
Copy link
Member Author

https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html

MacOS
(Required) Contains the application’s standalone executable code. Typically, this directory contains only one binary file with your application’s main entry point and statically linked code. However, you may put other standalone executables (such as command-line tools) in this directory as well.

They seem to allow people to put another executables in there, but I haven't found anyway to supress the dock icon for those.

@noiseconformist
Copy link

regarding the icon (cubic vs circular) display: would it make sense to have Qt 5.5 as minimum for 3.7?
because apparently that makes the difference.
ATM the readme states:
As of this writing the latest stable Qt is 5.5.x. The 5.6 beta has also been reported to work fine.
Or at least to formulate a strong recommendation, because it's not a show-stopper but ugly?

@telephon
Copy link
Member

another solution is to move scsynth and plugins to SuperCollider.app/scsynth/ which means that it would not get the icon (because its not inside the main app bundle). also disruptive in that the path changes. but its easy to copy it to somewhere else if we want a standalone scsynth.

It doesn't sound that bad. What paths would have to change in sclang? Maybe we should also move the class library and the help source folders there. Hm, but this may break exisiting config files.

@crucialfelix
Copy link
Member Author

It would break a lot of things. 3.8

But let's do 3.8 by April or may. Regular small releases with less
disruptive changes
On Jan 29, 2016 12:56 PM, "Julian Rohrhuber" [email protected]
wrote:

another solution is to move scsynth and plugins to
SuperCollider.app/scsynth/ which means that it would not get the icon
(because its not inside the main app bundle). also disruptive in that the
path changes. but its easy to copy it to somewhere else if we want a
standalone scsynth.

It doesn't sound that bad. What paths would have to change in sclang?
Maybe we should also move the class library and the help source folders
there. Hm, but this may break exisiting config files.


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

@timblechmann
Copy link
Contributor

SuperCollider.app/scsynth:

is this tested or speciation? sc/osx uses apple's bundle API to infer certain paths.

@crucialfelix
Copy link
Member Author

I'm suggesting that one possible solution is to move scsynth and its
plugins to a folder outside of the SuperCollider.app/Contents

That would mean that the plist doesn't affect how the process is displayed
in the dock.

But you are right that we can't use the bundle API to infer the relative
path.
We could still use normal relative paths.

"Speciation is the evolutionary process by which new reproductively
isolated biological kinds, species, arise."

I'm pretty sure I'm not indulging in speciation. Its just thinking.

On Fri, Jan 29, 2016 at 2:35 PM Tim Blechmann [email protected]
wrote:

SuperCollider.app/scsynth:

is this tested or speciation? sc/osx uses apple's bundle API to infer
certain paths.


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

https://twitter.com/crucialfelix
https://medium.com/@crucialfelix
http://www.mattermind.com/

@timblechmann
Copy link
Contributor

typo: Speciation/speculation ...

these parts will probably have to be touched:

✔ 17:17 ~/dev/supercollider [master|✚ 2…727⚑ 41] $ git grep CFBundle common/
common/SC_DirUtils.cpp:# include <CoreFoundation/CFBundle.h>
common/SC_DirUtils.cpp: CFBundleRef mainBundle;
common/SC_DirUtils.cpp: mainBundle = CFBundleGetMainBundle();
common/SC_DirUtils.cpp:         CFDictionaryRef dictRef = CFBundleGetInfoDictionary(mainBundle);
common/SC_DirUtils.cpp:         strRef = (CFStringRef)CFDictionaryGetValue(dictRef, CFSTR("CFBundleName"));
common/SC_StandAloneInfo_Darwin.cpp:#include <CoreFoundation/CFBundle.h>
common/SC_StandAloneInfo_Darwin.cpp:            CFURLRef enablerURL = CFBundleCopyResourceURL (
common/SC_StandAloneInfo_Darwin.cpp:                    CFBundleGetMainBundle(),
common/SC_StandAloneInfo_Darwin.cpp:                    enablerURL = CFBundleCopyResourceURL (
common/SC_StandAloneInfo_Darwin.cpp:                              CFBundleGetMainBundle(),

@miguel-negrao
Copy link
Member

It would break a lot of things. 3.8

Is this still going to be addressed for 3.7.0 or is it passing to 3.8 ? If the later it is one less issue preventing the release of 3.7.0 ...

@telephon
Copy link
Member

@miguel-negrao 3.7.0 has been released already. The question is more if it goes to 3.7.1 or 3.8.

@miguel-negrao
Copy link
Member

@miguel-negrao 3.7.0 has been released already.

Hum, I don't think so. I saw no announcement of that, and it's not in http://supercollider.github.io/download or https://github.com/supercollider/supercollider/releases. Only a beta was released.

But yes, I should have asked, does it go into 3.7.0 or 3.7.x ? We are two bugs away from no more issues before 3.7.0 can be released, no (forgetting windows for a moment) ?

@telephon
Copy link
Member

I counted the beta as a release

@telephon
Copy link
Member

I'd love to understand better how to judge what goes where and how it is done.

@crucialfelix
Copy link
Member Author

3.7.0 is closed for features or API changes. In that sense its "released", that's what Herr Telephon means.

Moving the executables would be great for many of us, but I don't think we can do it for this release.

@miguel-negrao
Copy link
Member

I counted the beta as a release

I don't think that is the usual understanding. A beta is for testing, a final release is for wide distribution. Certainly there will be point releases afterwards with bug fixes, but that is a different matter. I thought the point of having a milestone 3.7.0 was to know which bugs have to be fixed before 3.7.0 can be released, and people fill the streets overcome with joy. :-)

@crucialfelix
Copy link
Member Author

There will be fireworks and schnapps, I promise you.

3.7.0 is still not finalized. I will have some time this week to work on
things.
Its mainly the Windows stuff, but a 3.7.1 could bring the windows release
if necc.

On Sat, Feb 13, 2016 at 5:35 PM Miguel Negrão [email protected]
wrote:

I counted the beta as a release

I don't think that is the usual understanding. A beta is for testing, a
final release is for wide distribution. Certainly there will be point
releases afterwards with bug fixed, but that is a different matter. I
thought the point of having a milestone 3.7.0 was to know which bugs have
to be fixed before 3.7.0 can be released, and people fill the streets
overcome with joy. :-)


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

https://twitter.com/crucialfelix
https://medium.com/@crucialfelix
http://www.mattermind.com/

@timblechmann
Copy link
Contributor

this needs proper investigation: i had been using TransformProcessType with supernova for a few days, but the supernova process was marked as "not responding" ... not exactly trustworthy when knowing that the osx scheduler will do arbitrary things with real-time processes.

fwiw, there is always a good point to have bugfix releases ...

@crucialfelix
Copy link
Member Author

Good point. Its not just the annoying bouncing.

On Sun, Feb 14, 2016 at 8:16 AM Tim Blechmann [email protected]
wrote:

this needs proper investigation: i had been using TransformProcessType
with supernova for a few days, but the supernova process was marked as "not
responding" ... not exactly trustworthy when knowing that the osx scheduler
will do arbitrary things with real-time processes.

fwiw, there is always a good point to have bugfix releases ...


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

https://twitter.com/crucialfelix
https://medium.com/@crucialfelix
http://www.mattermind.com/

@crucialfelix
Copy link
Member Author

I've tested moving scsynth into Resources. That is actually where misc executables (not the primary application) should go.

It works fine; no icon appears in the dock. It would solve this ticket.

I could see moving it right now for 3.7. It means a last minute change of path for those of us that use scsynth separately from sclang/ide. Its just changing a path, not that big a deal.

sclang is a different beast. It should have an icon in the dock since it may create windows. (Though it would be nicer if it waited to do that until a gui is created.) I propose leaving it in MacOS.

thoughts ?

@telephon
Copy link
Member

good!

crucialfelix added a commit to crucialfelix/supercollider that referenced this issue Feb 29, 2016
…than MacOS for OS X

This puts scsynth outside of MacOS folder so the OS doesn't create a dock icon.
crucialfelix added a commit to crucialfelix/supercollider that referenced this issue Mar 16, 2016
* 3.7: (66 commits)
  bump version to 3.7.0
  updated News-3.7.schelp, CHANGELOG and AUTHORS
  3.7.0-beta2
  update CHANGELOG
  fix: typo in CHANGELOG.md
  build: copy CHANGELOG.md not the old ChangeLog
  class library: poll treats numbers as signals
  update OSXPlatform Server.program and documentation for moved scsynth
  fix supercollider#1804 copy scsynth or supernova to Resources rather than MacOS for OS X
  fix supercollider#1864 Quarks Git not detecting latest she correctly
  build: simplify cmake include, thanks tim
  build: use direct test to decide if SSE available
  fix documentation for copyRange and copySeries
  Add change to portaudio repo
  Switch portaudio linking to shared by default
  Unify with comparisonBranch
  More white-space and delimiters
  Avoid misleading message for Xcode and Visual Studio
  Correct wrong elseif
  Use string delimiters consistently when using variables in paths
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: macOS
Projects
None yet
Development

No branches or pull requests

7 participants