Bug 382628 - G'Mic fails to start because could not find Qt platform plugin "xcb" - Krita v3.2.0-beta.2
Summary: G'Mic fails to start because could not find Qt platform plugin "xcb" - Krita ...
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: G'Mic for Krita (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-23 18:26 UTC by ocumo
Modified: 2017-07-27 13:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ocumo 2017-07-23 18:26:25 UTC
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.

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 16.04; Krita 3.2.0-beta.2 (running the appimage from /opt/krita/); G'Mic v2.02
----

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 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.
Comment 1 ocumo 2017-07-23 19:58:05 UTC
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 some library, most likely due to an issue with environment path. Follow these steps:

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 wouldn't have that file, then you have more problems, this workaround wouldn't apply.)

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

mkdir -p plugins/platforms

3. 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)

4. In the same directory as gmic_krita_qt, create a text file named 'qt.conf' with this content (two lines):

[Paths]
Plugins = plugins

5. 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.
Comment 2 Halla Rempt 2017-07-24 09:17:47 UTC
Hi,

This probably should be reported here: https://github.com/dtschump/gmic-community/issues -- because it's an issue with the gmic-qt 
"plugin", not krita, and we don't actually create the plugin ourselves.
Comment 3 ocumo 2017-07-24 19:30:30 UTC
(In reply to Boudewijn Rempt from comment #2)

--
Hi Boudewijn,
Thank you for having a look and for good suggestion. I'll do.

I was not sure to what extent this bug would be better owned by you guys as direct "consumer" and "co-implementers"/partners of the new feature from what I understood in the announcement of 3.2-, since it is an actual button in Krita (and a newly announced, important one) that doesn't work.

Obviously I gladly will report (copy) this on the gmic forum as you suggest; I appreciate that no one exactly loves taking ownership of problems that might be a bigger percentage (even all) of responsibility of others. I've done that professionally for long time. But Krita's site says: "We’re still working with them to create binary builds...", which implies partnership, strongly suggesting that somehow this bug does relate to all the good people working hard to produce a nice 3.2 final product (though it doesn't imply that they are necessarily the "causers").

Please don't get me wrong: I'll report this wherever you tell me it's the best place to help devs to get their goals done, for the benefit of everybody. But still it should also exists here.

Please just let me observe -with appreciation- that Krita's users should be aware or notified in the first place, that this bug affects Krita, no matter who's technically the final owner. As users of Krita, (exactly as say, our own car) we interact with Krita and when one of its major features is broken, we immediately see a bug in Krita. 

We (users) don't ought to know who's the one taking care of environmental variables, dependencies, or what not in a plugin partnership. Same with our own car. We don't know who should be inquired about a failing pump, other than the car's manufacturer. That's regardless of whether the issue is caused by the guy who installed it in the car, or a pump manufacturer's mistake, or a supplier of a sub-assembly of that third party (so, a fourth party), etc. But: my car is broken. I'd complain to the car's vendor, period. Who wouldn't?  (Disclaimer: this example is for mere illustration, as a metaphor: it's NOT a comparison by any means! you guys are NOT a rich corporation that gets good money for their products!!!! Most people won't give you any money at all for Krita.)

It's in that spirit that I decided to report in the first place (but not the last one!) here. That said:

Thank you, again, for all you do to provide us with such an incredible and ever improving, formidable software called Krita!
Comment 4 ocumo 2017-07-24 20:07:51 UTC
I have created the bug report and workaround in the gmic community site, as suggested by Boudewijn.

It's been assigned the number 87.

Here is the link:

https://github.com/dtschump/gmic-community/issues/87
Comment 5 Halla Rempt 2017-07-27 13:11:38 UTC
Thanks! I'm still trying to find time to make a universal (appimage) build that the gmic people can distribute... But time is hard to find.