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

G'Mic fails to start because could not find Qt platform plugin "xcb" - Krita v3.2.0-beta.2 #87

Closed
ocumo opened this issue Jul 24, 2017 · 3 comments

Comments

@ocumo
Copy link

ocumo commented Jul 24, 2017

G'Mic won't start and no information or visible reaction is shown on Krita's GUI when 'Start GMic-Qt' is selected in the Filter menu.

This issue has already been reported in krita's (KDE) bugtracking system.

When launching Krita on the console, this error is logged exactly when the 'Start GMic-Qt' button is pressed:

stateChanged QProcess::ProcessState(Starting)
stateChanged QProcess::ProcessState(Running)
Plugin started true QProcess::ProcessState(Running)
gmic-qt: socket Key: "{5e393e6a-8442-4d77-ba98-1cf48f9c929f}"
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.
stateChanged QProcess::ProcessState(NotRunning)
pluginFinished 6 QProcess::ExitStatus(CrashExit)

My system:
Kubuntu Linux 16.04;
Krita 3.2.0-beta.2 (running the appimage from /opt/krita/);
G'Mic-Qt for Krita - Linux 64 bits -2.0.3_pre#170712

Steps to reproduce:

  1. Download the G'Mic plug-in for Krita in http://gmic.eu/files/prerelease_linux/gmic_krita_qt_linux64.zip, and unzip the files and "place it somewhere you can find it."
  2. "Go to Settings → Configure Krita → G'Mic plugin and set G'MIC to the filepath there; then restart Krita." (Quoted from Krita documentation).
  3. Go to Krita's menu: Filter -> Start GMic-Qt, and when asked, enter the location of the gmic_krita_qt file that was unzipped earlier. Alternatively, go to Settings -> Configure Krita -> G'Mic-Qt Integration and enter (or browse to) the gmic_krita_qt file path and click OK.
  4. Restart Krita (don't know if it's necessary, but it won't make a difference).
  5. Open an image file, and select Filter -> 'Start GMic-Qt'.
    At this point, nothing visible will happen in Krita's GUI. But if you have launched Krita from the console, then you will see the aforementioned error message.

Expected behaviour: G'Mic should launch when the 'Start GMic-Qt' button is pressed.

I have created a WORKAROUND that allows me to successfully run G'Mic in Krita 3.2 Beta2. See next post.

@ocumo
Copy link
Author

ocumo commented Jul 24, 2017

WORKAROUND

I have been able to create a WORKAROUND until this bug is fixed.

As stated in the error message, the gmic_krita_qt program fails to find a library, probably an issue with environmental path. If you are having this problem, follow these steps to get you up and running:

  1. Locate the libqxcb.so file in your system. In an Kubuntu installation, this file is in your qt5 installation directory, i.e. in:
    /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so

(If you don't have that file, then you have more problems, this workaround wouldn't apply as is.)

  1. Change directory to the directory where you put your gmic_krita_qt file. Once there, create a directory called plugins and then inside that directory, create a platforms directory, issuing the following command: (you have to be already in the gmic_krita_qt's directory):

mkdir -p plugins/platforms

  1. Copy the libqxcb.so file into the platforms directory, like so:

cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so plugins/platforms/

(again: you are issuing this command from the directory where gmic_krita_qt is)

  1. In the same directory as gmic_krita_qt, create a text file named qt.conf with this content (two lines):
[Paths]
Plugins = plugins
  1. After saving the qt.conf file, you can now restart Krita. Open an image file and run the G'Mic filter. It should work now. DONE.

Summary:

You need to have this directory structure where you have the gmic_krita_qt file:

$ tree
.
├── gmic_krita_qt
├── plugins
│   └── platforms
│       └── libqxcb.so
├── qt.conf
└── README

...where:
a) gmic_krita_qt and README were extracted from the downloaded GMic zip
b) the qt.conf file contains the above mentioned lines, and
c) you have created the plugins/platforms directories and copied the libqxcb.so file in the platforms directory.

@magpie514
Copy link

magpie514 commented Jul 26, 2017

Unfortunately this workaround won't work for me. Tried setting it up as described but no luck.
I also tried building the plugin locally, but it would have a version mismatch with the Krita appimage, meaning it won't run from there. (the plugin does run if invoked manually from command line and shows the interface, but logically does nothing if invoked like that), but if run from Krita it'll complain about a different Qt version).
Using Ubuntu 17.04 64 bit.

EDIT: Found a workaround for the self-compiled plugin. Using a script wrapper setting LD_LIBRARY_PATH to /usr/lib/x86_64-linux-gnu/ will let the plugin work properly. It's something!

@dtschump
Copy link
Collaborator

Thanks for reporting.
As always on Linux, there are issues with providing just binaries due to incompatible versions (or wrong path) with dynamic libraries. I think that the best workaround would be to have a maintainer that create new packages, e.g. gmic_krita for each distro :).
I think another solution is to compile the plug-in binaries directly on your machine, using the instructions detailed here.

In any case, I think I'll have to remove the Krita plug-in binaries I provide on the G'MIC website, because I guess this won't work for many users :(

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

No branches or pull requests

3 participants