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

Displayed plots do not work with Mac OS Sierra or High Sierra #33

Closed
karlmsmith opened this issue Dec 14, 2016 · 13 comments
Closed

Displayed plots do not work with Mac OS Sierra or High Sierra #33

karlmsmith opened this issue Dec 14, 2016 · 13 comments
Labels

Comments

@karlmsmith
Copy link
Contributor

Displayed plots for PyFerret under Mac OS X Sierra, either the Conda build or Homebrew build, does not work. The undisplayed plot (using command line option "-nodisplay") do work fine.

@karlmsmith
Copy link
Contributor Author

Displayed plots work fine under the previous Mac OS X version. Qt4 is old and unsupported; the latest is Qt5. But RHEL systems are still using Qt4. Hopefully modifying to use Qt5, if available (otherwise use Qt4), will resolve this issue.

@karlmsmith
Copy link
Contributor Author

Have it running on Mac OS Sierra with Python 3.6 and PyQt5, but still showing similar behaviour.

@karlmsmith
Copy link
Contributor Author

The problem occurs when PyFerret tries to launch a QApplication in a new process (Python multiprocess module). Testing the viewer, it works fine when the QApplication is run in the main process instead of a newly created process. So there is something Qt does not like about running under a multiprocess.Process in Sierra.

@karlmsmith karlmsmith added the bug label Jul 11, 2017
@karlmsmith
Copy link
Contributor Author

karlmsmith commented Dec 16, 2017

I am very happy to report that with update a39de94 - and possibly updates to Homebrew packages, PyFerret can now display a plot window (test on High Sierra, hopefully on Sierra as well).

The plot display is fully functional; however, the following error message is printed when this window is opened (and when some dialogs are opened):

2017-12-16 05:04:41.506 Python[7811:488910] Metal pipeline state creation failed with error: Error Domain=MTLLibraryErrorDomain Code=3 "Compiler encountered an internal error" UserInfo={NSLocalizedDescription=Compiler encountered an internal error}

Unfortunately, trying to open a second window, or closing and reopening a window, crashes the program with the error message:

objc[8352]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[8352]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.

So a little more useable, but this problem is not fixed.

@karlmsmith karlmsmith changed the title Displayed plots do not work with Mac OS Sierra Displayed plots do not work with Mac OS Sierra or High Sierra Dec 16, 2017
@karlmsmith
Copy link
Contributor Author

Just tried (latest) PyFerret again on the latest High Sierra version (system was upgraded from Sierra). Was able to open multiple windows, although there was an error message associated with opening each window. (Under Sierra prior to upgrade, PyFerret would crash opening even the first window.)

@karlmsmith
Copy link
Contributor Author

Built and tested on my High Sierra iMac (latest release, Homebrew upgraded to latest). Has the saem behavior as before: first window prints an error message but otherwise works; second window prints error message and freezes the program (I have to background it and kill it). The previous success was a fluke. Not sure what is different about that system.

@karlmsmith
Copy link
Contributor Author

Upgraded the conda build of PyFerret. Appears to work fine under RHEL6, RHEL7, Mac OS X El Capitan. Tested on my home High Sierra iMac and DOES work with multiple displayed windows. As seen previously, there is an error message is printed to the console when each window is displayed.

2018-08-01 18:23:57.488 python[16478:12351368] Metal pipeline state creation failed with error: Error Domain=MTLLibraryErrorDomain Code=3 "Compiler encountered an internal error" UserInfo={NSLocalizedDescription=Compiler encountered an internal error}

Note: after installing pyferret I did a conda update -n <PyFerretEnv> --all which downgraded libpng, after which pyferret would not run because it insisted on the latest libpng. So had to reinstall the later version of libpng from the earlier downloaded file. So don't update after installing/updating pyferret at this time.

@karlmsmith
Copy link
Contributor Author

A few days ago I installed the miniconda build on another Mac OS X High Sierra system and multiple windows do work as described in the previous comment. Today Ryo reported the same behavior using Homebrew libraries and the 4.7.2 pre-built package.

Not sure of the status with Mac OS X Sierra, but still going to close this ticket as this is an issue with something in the OS X/Python/PyQt/Qt pipeline that appears finally be getting some time devoted to it (and thus, I do not need to come up with a replacement PyFerret "graphics engine").

@ryofurue
Copy link

ryofurue commented Oct 7, 2018

I don't mean to write this as a bug report. It's just informational.

Today I migrated to macOS Mojave. I then deleted the pyferret installed from the tar ball. The plan is to install PyFerret the conda way.

I hadn't had conda installed on this machine of mine, and so did

$ brew cask install miniconda
$ export PATH="/usr/local/miniconda3/bin:$PATH"
$ conda create -n FERRET -c conda-forge pyferret ferret_datasets --yes

Everything went smoothly; there was no error.

When I invoked pyferret, I got this (again):

2018-10-07 22:30:54.632 python[1124:326060] Metal pipeline state creation failed with error: Error Domain=MTLLibraryErrorDomain Code=3 "compiler service could not be reached" UserInfo={NSLocalizedDescription=compiler service could not be reached}
2018-10-07 22:30:56.728 python[1124:326062] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection invalid

But I'm able to make some plots on this new pyferret.

@OmriNach
Copy link

OmriNach commented Aug 8, 2019

ryofurue, were you able to figure out why the NSXPCSharedListener error was popping up, and how to solve it?

Having similar issues over here and would like a permanent fix for running PyQt either on High Sierra or Mojave

@ryofurue
Copy link

ryofurue commented Aug 9, 2019

@OmriNach

ryofurue, were you able to figure out why the NSXPCSharedListener error was popping up, and how to solve it?

I'm afraid not. Sorry that I haven't tried to fix it.

I don't see the "Metal pipeline state" error any longer, but I see exactly the same "[NSXPCS . . . ]" error. The same error has popped up for other applications (including Skype and Octave) on Mojave, which suggests that Mojave broke something, which broke Qt. So, perhaps, unless Qt or PyQt is fixed, it may be hard to fix it on Pyferret's side.

@karlmsmith
Copy link
Contributor Author

Multiprocessing package configured to start with the "spawn" method (available under *nix systems starting with Python 3.4) which appears to solve the Qt problems, even the warning messages. (Verified with High Sierra, and by a user using Catalina.)

@karlmsmith
Copy link
Contributor Author

( Above change made in 0fd87ca )

kigawas pushed a commit to darknessomi/musicbox that referenced this issue Dec 21, 2020
* Support Qt5 And fix NSXPCSharedListener endpointForReply:withListenerName error on OS X according to NOAA-PMEL/PyFerret#33

* playlist length > 1000
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

3 participants