Bug 361811 - Breeze causes hangs and crashes in Krita
Summary: Breeze causes hangs and crashes in Krita
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 13:22 UTC by beojan
Modified: 2016-11-19 15:25 UTC (History)
9 users (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 beojan 2016-04-15 13:22:12 UTC
Even in a KDE (Plasma 5) session, Krita forces use of the Fusion style instead of the style selected in System Settings.

Reproducible: Always

Steps to Reproduce:
Start Krita in a Plasma session.

Actual Results:  
Krita uses the fusion style

Expected Results:  
Krita should use style selected in System Settings (e.g. Breeze).

Patch to fix this is below:

diff --git a/libs/ui/KisApplication.cpp b/libs/ui/KisApplication.cpp
index 2e21901..4374951 100644
--- a/libs/ui/KisApplication.cpp
+++ b/libs/ui/KisApplication.cpp
@@ -154,7 +154,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
     QString version = CalligraVersionWrapper::versionString(true);
     setApplicationVersion(version);
     setWindowIcon(KisIconUtils::loadIcon("calligrakrita"));
-
+    if (qgetenv("KDE_FULL_SESSION").isEmpty()) {
     QStringList styles = QStringList() << "Fusion" << "Plastique";
     if (!styles.contains(style()->objectName())) {
         Q_FOREACH (const QString & style, styles) {
@@ -167,6 +167,7 @@ KisApplication::KisApplication(const QString &key, int &argc, char **argv)
             }
         }
     }
+    }
 
     KisOpenGL::initialize();
 }
Comment 1 Halla Rempt 2016-04-15 13:30:20 UTC
Yes, that's by design. It's pretty much the only theme that is not really broken one way or another.
Comment 2 beojan 2016-04-15 13:32:45 UTC
Perhaps it could check for some other environment variable (say KRITA_USE_SYSTEM_THEME) and only force fusion if that variable isn't set, or otherwise allow the forcing of Fusion to be switched off?

I'm using it with QtCurve and don't have any issues.
Comment 3 beojan 2016-04-15 13:32:56 UTC
Perhaps it could check for some other environment variable (say KRITA_USE_SYSTEM_THEME) and only force fusion if that variable isn't set, or otherwise allow the forcing of Fusion to be switched off?

I'm using it with QtCurve and don't have any issues.
Comment 4 Halla Rempt 2016-04-15 15:13:57 UTC
I'm sorry, but no. If people really want something else than fusion, they can patch Krita, but they aren't allowed to report bugs anymore.
Comment 5 Christoph Feck 2016-04-20 22:43:04 UTC
Would it be possible to check if a "-style" argument was passed? In this case, the supplied argument would override Krita's internal choice.
Comment 6 acidrums4 2016-06-24 18:49:25 UTC
(In reply to Christoph Feck from comment #5)
> Would it be possible to check if a "-style" argument was passed?

As far as I remember, on "KDE 4" you could pass a "--style" argument, but seems that was ditched for Frameworks 5 - which for this specific case is sad, because Krita's not only ignoring the environment widget style but also the color scheme (and we don't even know why the other styles are "broken" so Fusion style had to be hardcoded).
Comment 7 Halla Rempt 2016-06-27 09:33:29 UTC
I have to admit I'm actually not sure who the breeze style maintainer is and whether there's a mailing list for it. The problems are mostly with the dockers and drag and drop -- that just locks up the entire application.
Comment 8 beojan 2016-06-27 09:37:16 UTC
(In reply to Boudewijn Rempt from comment #7)
> I have to admit I'm actually not sure who the breeze style maintainer is and
> whether there's a mailing list for it. The problems are mostly with the
> dockers and drag and drop -- that just locks up the entire application.

I just tested this, and with QtCurve, it works fine.
Comment 9 acidrums4 2016-06-27 19:10:42 UTC
(In reply to Boudewijn Rempt from comment #7)
> I have to admit I'm actually not sure who the breeze style maintainer is and
> whether there's a mailing list for it.

Well, as a former KDE VDG member I seem to recall someone there came up with Breeze widget style, hacking what Oxygen widget style was at that time. So I created a post on KDE VDG forum, linking this bug report there and linking that post here, hoping he/she/they can read it and get in touch with you, maybe via this bug report.

https://forum.kde.org/viewtopic.php?f=285&t=133587
Comment 10 Kai Uwe Broulik 2016-07-03 09:54:17 UTC
Could you perhaps report bugs against Breeze then? If you always just workaround without telling anybody, your issues will never get resolved. There's a category on BKO about it and its maintainer 	Hugo Pereira Da Costa usually responds to bug reports quickly.
Comment 11 Philipp A. 2016-07-17 17:46:42 UTC
yes, please communicate or at least leave open the road for others to fix it.

saying “this won’t happen” and hardcoding the style like this seems really disproportionate.
Comment 12 Quiralta 2016-07-18 14:48:35 UTC
Well, I can volunteer on reporting the outcome if Breeze is used (on a patched build), Also I thinking (correct me if I am wrong) this would only affect Linux users and mostly the ones using Plasma or its themes, thus the amount of affected users may be low?

Thus, for now, I am using the patch, on a git build, for the last few days and after doing a simple drawing I've seen no crashes or freezes. I try to rearrange a few times the dockers, they behave the same so far. Dropping kra, png, jpg files in the canvas also has no negatives effects, the dialogs look fine, as far as I can tell. (note that is been a least one upgrade of Breeze since the bug was open, could it be that things were fixed?)

I'm on a Archlinux/Plasma5 system, nvidia proprietary drivers, and on a git build of krita.

Would be convenient if more of us (users) would join in the test, then Boudewijn can have more feedback from us and decide if is worth at this again for the coming releases (I know he and the rest are really busy on higher priorities). This is just and idea, may be things are more complicated than what I'm thinking.
Comment 13 Halla Rempt 2016-07-18 15:21:08 UTC
> Would be convenient if more of us (users) would join in the test, then
> Boudewijn can have more feedback from us and decide if is worth at this again
> for the coming releases (I know he and the rest are really busy on higher
> priorities). This is just and idea, may be things are more complicated than
> what I'm thinking.

Yes, that would be good: testing with breeze with various versions of plasma
and kf5 libraries. If it turns out to be all good, I can add the theme to
the whitelist.
Comment 14 Halla Rempt 2016-08-01 08:45:02 UTC
Git commit 1cf18b8e7c20800c5ad36ffd984f51b0220f9fb8 by Boudewijn Rempt.
Committed on 01/08/2016 at 08:41.
Pushed by rempt into branch 'video-export-rebased'.

Make it possible to use any style, for the sufficiently determined

Set KRITA_NO_STYLE_OVERRIDE to something and the currently style
will not be overridden. Since there are some reports that breeze
works now, enable that, too. We can always disable it when it
turns out to be a bad idea.

M  +14   -9    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/1cf18b8e7c20800c5ad36ffd984f51b0220f9fb8
Comment 15 Halla Rempt 2016-08-01 08:45:30 UTC
Git commit c5aa1b180bc24c548e37203a8a6007beba5ea47a by Boudewijn Rempt.
Committed on 01/08/2016 at 08:45.
Pushed by rempt into branch 'master'.

Make it possible to use any style, for the sufficiently determined

Set KRITA_NO_STYLE_OVERRIDE to something and the currently style
will not be overridden. Since there are some reports that breeze
works now, enable that, too. We can always disable it when it
turns out to be a bad idea.

M  +14   -9    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/c5aa1b180bc24c548e37203a8a6007beba5ea47a
Comment 16 Halla Rempt 2016-08-02 08:02:32 UTC
Git commit 853b289a17a2bd994aaf4344a145eebaf3345a7f by Boudewijn Rempt.
Committed on 02/08/2016 at 08:02.
Pushed by rempt into branch 'master'.

Remove breeze again: Dmitry confirms there are still problems with it

M  +1    -1    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/853b289a17a2bd994aaf4344a145eebaf3345a7f
Comment 17 Dmitry Kazakov 2016-08-02 08:17:18 UTC
I have Qt 5.5.1, KF5 5.15.0-0ubuntu3
Comment 18 Hugo Pereira Da Costa 2016-08-02 12:13:36 UTC
Any 'Steps to Reproduce' ? 
thx
Comment 19 Quiralta 2016-08-02 14:09:20 UTC
Is unlikely to work among many distros since lots of them still behind kde releases unfortunately, I guess when most of them have moved to qt5.7 / frameworks 5.24 and above, then the themes could work again, my system on arch has the mentioned versions with no issues, but I can see (according to Dmitry specs) that *buntu users would have an unusable Krita.
Comment 20 Halla Rempt 2016-11-14 12:40:33 UTC
Git commit 5900991170425c5ba2eb3655918cce6848511b5c by Boudewijn Rempt.
Committed on 14/11/2016 at 12:38.
Pushed by rempt into branch 'krita/3.1'.

Allow the breeze style

After a week of testing with current breeze, there are no apparent
problems.

M  +1    -1    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/5900991170425c5ba2eb3655918cce6848511b5c
Comment 21 Halla Rempt 2016-11-16 10:34:55 UTC
Git commit 1ae3767cc2b09040f8c4d12bd09f372759ab19b9 by Boudewijn Rempt.
Committed on 16/11/2016 at 08:55.
Pushed by rempt into branch 'rempt/impex-refactoring'.

Allow the breeze style

After a week of testing with current breeze, there are no apparent
problems.

M  +1    -1    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/1ae3767cc2b09040f8c4d12bd09f372759ab19b9
Comment 22 Scott Petrovic 2016-11-19 15:25:05 UTC
Git commit 187f8d60261c365fcc82d0cfbc2fed542ef704f2 by Scott Petrovic, on behalf of Boudewijn Rempt.
Committed on 19/11/2016 at 15:23.
Pushed by scottpetrovic into branch 'petrovic/impex-brush-editor-ui'.

Allow the breeze style

After a week of testing with current breeze, there are no apparent
problems.

M  +1    -1    libs/ui/KisApplication.cpp

http://commits.kde.org/krita/187f8d60261c365fcc82d0cfbc2fed542ef704f2