Bug 290879 - Visual glitch (artifacts) around space information in Dolphin 2.0
Summary: Visual glitch (artifacts) around space information in Dolphin 2.0
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 291327 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-07 14:21 UTC by Nikola Schnelle
Modified: 2012-03-09 09:55 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A test ui file to observe the bug. (1.22 KB, application/xml)
2012-01-08 11:44 UTC, Nikita Skovoroda
Details
patch to kcapacitybar (453 bytes, application/octet-stream)
2012-01-10 15:06 UTC, Hugo Pereira Da Costa
Details
KSignalPlotter test *.ui file. (1.05 KB, application/xml)
2012-01-10 15:46 UTC, Nikita Skovoroda
Details
A little different glitches with Qt-only widgets. *.ui test file. (1.09 KB, application/xml)
2012-01-10 16:22 UTC, Nikita Skovoroda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikola Schnelle 2012-01-07 14:21:40 UTC
Version:           2.0 (using Devel) 
OS:                Linux

Artifacts appear on the right side of space information: 

http://www.youtube.com/watch?v=Z5ATWu5YhbU

Reproducible: Always

Steps to Reproduce:
See video.

Actual Results:  
Artifacts around space information.

Expected Results:  
No artifacts.
Comment 1 Nikola Schnelle 2012-01-07 17:57:15 UTC
This happens on KDE 4.8 RC2 and in KDE 4.8 "nightly" from neon ppa.

Also I should note that it happens with both, raster and native graphic system.
Comment 2 Nikita Skovoroda 2012-01-08 10:52:48 UTC
I can't see the video, it's flash-only.
Comment 3 Nikola Schnelle 2012-01-08 11:06:36 UTC
I uploaded it to sendspace (its only 2mb): http://www.sendspace.com/file/tx1bxm
Comment 4 Nikita Skovoroda 2012-01-08 11:25:35 UTC
This happens to me, too.

To observe the bug, you must:
1) Have free space indicator enabled in status bar.
2) Have a panel on the right of the view-panel. Any panel is enough: split view (2 panels), info panel, entrance points (moved to the right if the view panel) or any other.
3) Use oxygen style.
4) Hover the resize grip near the free space indicator.

Given #4, i am not even sure if this is a dolphin, oxygen style, or a qt bug.

Can someone try this on old dolphin?
Comment 5 Nikita Skovoroda 2012-01-08 11:28:20 UTC
s/Given #4/Given #3/
Comment 6 Nikita Skovoroda 2012-01-08 11:37:37 UTC
Not a dolphin bug. I reproduced this in an *.ui file.

Will upload it after cleanup.
Comment 7 Nikita Skovoroda 2012-01-08 11:44:44 UTC
Created attachment 67580 [details]
A test ui file to observe the bug.

0) Enable Oxygen style.
1) Open the attached file in Qt Designer.
2) Launch with Ctrl-R (not necessary).
3) Hover the resize grip in the center.
Comment 8 Nikita Skovoroda 2012-01-08 11:45:15 UTC
Nikola Schnelle, can you confirm my testcase?
Comment 9 Eike Hein 2012-01-08 11:53:08 UTC
I can reproduce this, reassigning to Oxygen.
Comment 10 Nikola Schnelle 2012-01-08 12:06:50 UTC
I can confirm that it is oxygen style bug. It doesn't happen with qtcurve.
Comment 11 Eike Hein 2012-01-08 12:08:31 UTC
Well it may still be in the widget, but Hugo is probably still well-qualified to look at it.
Comment 12 Nikita Skovoroda 2012-01-08 12:51:25 UTC
KSignalPlotter widget is also affected (but the artifacts dissapear when the resize grip is unhovered, possibly becase of refresh).

Again, only with oxygen style.

I am not attaching a new testcase, this is trivial to reproduce using the old testcase.
Comment 13 Nikola Schnelle 2012-01-10 13:57:09 UTC
Is Hugo able to see this bug report? Should somebody add him to CC?
Comment 14 Hugo Pereira Da Costa 2012-01-10 14:29:38 UTC
Can reproduce with the provided .ui file.
Will investigate.
Comment 15 Hugo Pereira Da Costa 2012-01-10 14:30:39 UTC
(its related to splitterProxy. Funnily enough, it does not appear with bespin, which has the same feature).
Comment 16 Hugo Pereira Da Costa 2012-01-10 14:57:18 UTC
its actually a bug in kcapacitybar.

l374: drawCapacityBar(&p, event->rect());

and then:

l170: void KCapacityBar::drawCapacityBar(QPainter *p, const QRect &rect) const
{
    if (d->ce_capacityBar)
    {
        QStyleOptionProgressBar opt;
        opt.initFrom(this);
        opt.rect = rect;
    }
}

Passing the event rect to the option is incorrect.
event rect should be set as a mask to the painter, and full widget rect should be passed to the option. At least that's what's expected for all other widgets by the widget style.

I can workaround it in oxygen, but it should definitely be fixed here.
Reassigning to kdelibs.


PS: the fact that it only shows up in oxygen is because the new "splitterProxy" class results in some painting of the widget that is much smaller than the actual widget rect, and is interpreted (due to the bug above) as the widget rect by the style.
Comment 17 Hugo Pereira Da Costa 2012-01-10 15:06:58 UTC
Created attachment 67661 [details]
patch to kcapacitybar

Patch to fix rendering of kcapacitybar, notably for oxygen.
Comment 18 Nikita Skovoroda 2012-01-10 15:46:14 UTC
Created attachment 67662 [details]
KSignalPlotter test *.ui file.

I can observe this bug with KSignalPlotter too (see comment #12).
This is the modified testcase.
Comment 19 Hugo Pereira Da Costa 2012-01-10 15:53:20 UTC
Issue with ksignalplotter is different, in the sence that oxygen is not responsible to render the inside part of the widget, but it is likely a similar issue from the widget's paint event, not dealing with the event->rect properly.
(which, -because of oxygen, this time- does not match the widget rect).

Note that it does not happen with regular widgets (such as QTextEdit, QListView, or Dolphin's main view).

I do not have the skills (nor the time) to debug ksignalplotter, sadly enough.
Comment 20 Nikita Skovoroda 2012-01-10 15:57:15 UTC
Can you please check the code for other kde widgets, too (in the sense of the clipping and paint area)?

I mean the code, not the behavior, because this can (?) be invisible for some other reasons, like widget refresh.
Comment 21 Nikita Skovoroda 2012-01-10 16:00:25 UTC
By the way, i have a simular glitch in the dolphin 2.0 with the main view.

But it occurs only for 1-2 frames (didn't record), and is harder to observe.
Comment 22 Hugo Pereira Da Costa 2012-01-10 16:03:52 UTC
The bug with ksignalplotter also appears with bespin (which has a similar splitterproxy feature). This confirms it is a widget issue, IMO and not an oxygen one. Why it did not happen with kcapacitybar is likely due to the way by which the capacitybar is rendered by bespin (i.e. workaround the bug above).

For checking other widgets, I can't do so (for lack of time, and there are quite some of them).

For dolphin, yes I see the same thing, but it is different. This is some rendering glitch when showing/hiding a transparent widget -the proxy-, which Qt paints opaque for a frame or to before dealing with the transparency.

In the plotter bug, the rect stays until the next interaction with the widget.
Comment 23 Nikita Skovoroda 2012-01-10 16:19:22 UTC
(In reply to comment #22)
> For dolphin, yes I see the same thing, but it is different. This is some
> rendering glitch when showing/hiding a transparent widget -the proxy-, which Qt
> paints opaque for a frame or to before dealing with the transparency.

Sorry, i don't understand this fully. What is the cause of this? Is it a Qt bug (i can reproduce it with Qt-only widgets and oxygen style)?

> In the plotter bug, the rect stays until the next interaction with the widget.

Should i open separate bugs, if the reasons are different?
Comment 24 Nikita Skovoroda 2012-01-10 16:22:04 UTC
Created attachment 67668 [details]
A little different glitches with Qt-only widgets. *.ui test file.

See comment #21 and comment #23.
Comment 25 Hugo Pereira Da Costa 2012-01-10 16:23:17 UTC
> Sorry, i don't understand this fully. What is the cause of this? Is it a Qt bug
> (i can reproduce it with Qt-only widgets and oxygen style)?

Yes and no. This is similar (in some sense) to the artifacts you are seing when you resize a window (to larger): it takes some frames for the widgets inside the window to update and occupy the window space. Right ? 

For the splitter artifact in dolphin, and possibly any widget, the same thing happen: takes some frames for the shown/hidden widget to be rendered properly on screen. 

Not much can be done about it.
Comment 26 Hugo Pereira Da Costa 2012-01-10 16:26:16 UTC
With the attachment 3 [details], I here cannot see the artifact you describe. But I believe it is the same as for dolphin.

Its occurence depends on the machine load, the graphics card, etc. Definitly something different, in the sence that the artifacts dissapears "by itself", a few frames later, whereas the ksignalplotter artifacts, or the kcapacitybar don't. (they only dissapear after user action of some sort). (You agree ?)

Really something more similar to window-resize type or artifacts.
Comment 27 Nikita Skovoroda 2012-01-10 16:32:02 UTC
(In reply to comment #25)
> For the splitter artifact in dolphin, and possibly any widget, the same thing
> happen: takes some frames for the shown/hidden widget to be rendered properly
> on screen. 
> 
> Not much can be done about it.

Hm. When resizing, there is a sense in painting a bigger window faster and
updating it's contents a bit later (async).

When hovering, why can't be the widget appeareance be delayed until it is
propertly rendered (and hidden or transparent until that happens)? Wouldn't
that look cleaner?

So, the main question: can that widget be hidden (transparent) by default
(until rendered), and not filled with background color, as it is now?
Comment 28 Hugo Pereira Da Costa 2012-01-10 16:32:58 UTC
> So, the main question: can that widget be hidden (transparent) by default
> (until rendered), and not filled with background color, as it is now?
Not inside oxygen.
Comment 29 Nikita Skovoroda 2012-01-10 16:35:46 UTC
(In reply to comment #26)
> With the attachment 3 [details], I here cannot see the artifact you describe. But I
> believe it is the same as for dolphin.

Yes, you are right, it looks exactly the same as with the dolphin main view,
and dissapears on the next frame. It's hard to observe (it does not happen all the time, like with ksignalplotter or kcapacitybar).

> Its occurence depends on the machine load, the graphics card, etc. Definitly
> something different, in the sence that the artifacts dissapears "by itself", a
> few frames later, whereas the ksignalplotter artifacts, or the kcapacitybar
> don't. (they only dissapear after user action of some sort). (You agree ?)

True.

> Really something more similar to window-resize type or artifacts.

Yes. But, can that widget be transparent by default (not opaque and filled with bg color) until rendered completely? That would look nicer.
Comment 30 Nikita Skovoroda 2012-01-10 16:36:36 UTC
(In reply to comment #28)
> > So, the main question: can that widget be hidden (transparent) by default
> > (until rendered), and not filled with background color, as it is now?
> Not inside oxygen.

So, could that issue (testcase #3 and Dolphin main view) be fixed inside Qt?
Comment 31 Hugo Pereira Da Costa 2012-01-10 16:40:19 UTC
... possibly yes :)
as far as oxygen is concerned, we already make the widget as transparent as we
can ...
Comment 32 Nikita Skovoroda 2012-01-10 16:44:52 UTC
(In reply to comment #31)
> ... possibly yes :)
> as far as oxygen is concerned, we already make the widget as transparent as we
> can ...

Ok, thanks.

So, what should be done next?

It looks like the issue with kcapacitybar (the original cause for this bugreport) is fixed.

Minor glitches for 1-2 frames have a totally different cause (inside Qt?).

Should this bugreport be closed and new one opened against KSignalPlotter? Or should this bugreport's description be changed?
Comment 33 Hugo Pereira Da Costa 2012-01-10 16:48:56 UTC
This report is not fixed yet, cause the patch above has not been committed.
I'll post a review request to do so.
Will close the bug once the code is actually fixed.

I'd recommend opening another bug report for signalplotter. Assign it to ksysguard, possibly with a link to this bug to advertise the discussion we had.

For the other types of glitches, I'll try optimize things on my side (possibly by trying not to hide/show the invisible widget as often as it is now, though I can't guarantee success).

Thanks for reporting !
Comment 34 Nikola Schnelle 2012-01-10 16:50:11 UTC
Guys, it is very hard for me, non-dev, to follow your discussion. I found one more rendering glitch, and because I don't know if you are already talking about it, I made video: http://www.sendspace.com/file/06thaq (2mb).
Comment 35 Nikita Skovoroda 2012-01-10 16:54:18 UTC
(In reply to comment #34)
> Guys, it is very hard for me, non-dev, to follow your discussion. I found one
> more rendering glitch, and because I don't know if you are already talking
> about it, I made video: http://www.sendspace.com/file/06thaq (2mb).

That't exactly the thing i was talking about for the last several comments (starting with comment #21).
Comment 36 Hugo Pereira Da Costa 2012-01-10 17:15:12 UTC
@Nikola and Nikita
Just for my information: can you guys reproduce the same glitches in dolphin when using bespin as opposed to oxygen ? 
(here I can't actually see them with oxygen, but I did see it every now and then in case of heavy load of my machine).
Comment 37 Nikola Schnelle 2012-01-10 17:23:20 UTC
Hmm it seems that bespin is not available in oneiric repositories. So I cannot test bespin at the moment. 
But if it means something, I cannot reproduce this glitches with qtcurve.
Comment 38 Hugo Pereira Da Costa 2012-01-10 17:25:19 UTC
Nope. Won't learn anything with QtCurve: does not have the splitterProxy feature (that is: this -not so- invisible widget, showing up on top of splitters, to increase the hit area. Bespin is the only other style that also has this feature; I stole it from there, in fact. Or rather, we developed it in parallel).
Comment 39 Nikola Schnelle 2012-01-10 17:39:15 UTC
I managed to install kde-style-bespin natty deb package in oneiric.

I don't see this glithes with bespin.

So my (non-dev) thinking is this. I think these KSignalPlotter glitches (my video from comment #34) makes glitches to space information widget in Dolphin. Because space information widget taches KSignalPlotter. So KSignalPlotter glitch makes glitch to space information widget.

I am not a developer and I am just trying to help. I am sorry if my logic is terribly wrong on this :)
Comment 40 Nikita Skovoroda 2012-01-10 17:57:02 UTC
(In reply to comment #36)
> @Nikola and Nikita
> Just for my information: can you guys reproduce the same glitches in dolphin
> when using bespin as opposed to oxygen ? 
> (here I can't actually see them with oxygen, but I did see it every now and
> then in case of heavy load of my machine).

No, i can't reproduce this with bespin on my netbook.
I have compiled bespin from svn just now (bespin-svn 1463-1) with default settings.

It has that feature.
Comment 41 Hugo Pereira Da Costa 2012-01-10 17:58:55 UTC
Thanks for the info. I'll investigate the differences between our two codes
Comment 42 Christoph Feck 2012-01-12 02:36:55 UTC
*** Bug 291327 has been marked as a duplicate of this bug. ***
Comment 43 Hugo Pereira Da Costa 2012-01-14 19:19:21 UTC
Git commit 48e090787b1b2e70db397ac1c6a0e0dd7e2934d5 by Hugo Pereira Da Costa.
Committed on 14/01/2012 at 20:15.
Pushed by hpereiradacosta into branch 'KDE/4.8'.

fix the rect passed to kcapacitybar paint method.
REVIEW: 103669

M  +2    -1    kdeui/widgets/kcapacitybar.cpp

http://commits.kde.org/kdelibs/48e090787b1b2e70db397ac1c6a0e0dd7e2934d5
Comment 44 Hugo Pereira Da Costa 2012-01-15 10:41:58 UTC
Closing for good this time
Comment 45 Hugo Pereira Da Costa 2012-01-15 20:44:06 UTC
Git commit 179c16b216f517480f5a7bec0a074696c3e02349 by Hugo Pereira Da Costa.
Committed on 15/01/2012 at 21:43.
Pushed by hpereiradacosta into branch 'master'.

disable enable parent widget update when hiding. This seems to prevent some
artifacts in e.g. amarok, or dolphin (to be confirmed).

M  +2    -0    kstyles/oxygen/oxygensplitterproxy.cpp

http://commits.kde.org/kde-workspace/179c16b216f517480f5a7bec0a074696c3e02349
Comment 46 Hugo Pereira Da Costa 2012-01-15 20:45:32 UTC
Previous commit seems to improve things on my side, (no more glitch, in fact) for amarok at least. Can't test on dolphin since I could not see the glitch in the first place. Will backport to KDE4.8.
Please double check whenever you have a chance.
Comment 47 Nikola Schnelle 2012-01-26 05:34:29 UTC
I can confirm that I don't see this glitches in newest KDE (4.8.0+ from git) from project-neon ppa.

But I still see resize grip glitch/artifact in KDE 4.8 final. Is it possible that this commits are not included in 4.8.0?
Comment 48 Hugo Pereira Da Costa 2012-01-26 10:20:22 UTC
@nikola
Which glitch ?
The first one that this bug report is about should definitely be in 4.8
The second (flicker of a tiny grey rect) has only be pushed to master. I did not backport it to 4.8 because I was waiting for feedback here. 
It will go into 4.8.1, I guess.
(ok, maybe the first one did not make it in time either, but I'd be 
Surprised )
Comment 49 Hugo Pereira Da Costa 2012-01-26 11:12:25 UTC
Git commit 36331ae94755e04f00e014b8be24982ff84ee1d6 by Hugo Pereira Da Costa.
Committed on 15/01/2012 at 21:43.
Pushed by hpereiradacosta into branch 'KDE/4.8'.

disable enable parent widget update when hiding. This seems to prevent some
artifacts in e.g. amarok, or dolphin (to be confirmed).

M  +2    -0    kstyles/oxygen/oxygensplitterproxy.cpp

http://commits.kde.org/kde-workspace/36331ae94755e04f00e014b8be24982ff84ee1d6
Comment 50 Nikita Skovoroda 2012-01-26 11:13:50 UTC
The first one (KCapacityBar) is fixed for me in 4.8.0.
Comment 51 Nikola Schnelle 2012-01-26 11:42:50 UTC
> Which glitch ?
> The first one that this bug report is about should definitely be in 4.8
this is fixed.

> The second (flicker of a tiny grey rect) has only be pushed to master.
This is not fixed in 4.8.0. 

Sorry for late feedback, I misunderstood you. Everything works very well in master (project neon ppa) so I think it is safe to backport that commit to 4.8.1.
Comment 52 Hugo Pereira Da Costa 2012-01-26 11:45:05 UTC
@Nikola.
No problem. It will be in 4.8.1 (in one month. So thats not too long).
It's good thing that the glitches are gone.
Thanks for reporting the bug and for the feedback

Hugo
Comment 53 Nikita Skovoroda 2012-01-26 12:26:39 UTC
So, the only thing that is left here is the glitch with KSignalPlotter.
I'll open a separate bug report later today (in my timezone).

Thanks, Hugo!
Comment 54 Sebastian Trueg 2012-01-27 13:20:54 UTC
Git commit e073090e405437a7207cf862c073749b1c60b483 by Sebastian Trueg, on behalf of Hugo Pereira Da Costa.
Committed on 14/01/2012 at 20:15.
Pushed by trueg into branch 'KDE/4.8'.

fix the rect passed to kcapacitybar paint method.
REVIEW: 103669

M  +2    -1    kdeui/widgets/kcapacitybar.cpp

http://commits.kde.org/kdelibs/e073090e405437a7207cf862c073749b1c60b483
Comment 55 Hugo Pereira Da Costa 2012-02-17 00:54:46 UTC
Git commit 5a2e4c9223693685c81b731f747e9768246100ec by Hugo Pereira Da Costa.
Committed on 17/02/2012 at 01:52.
Pushed by hpereiradacosta into branch 'master'.

Fix flicker of Splitter Proxy in oxygen-transparent, like for oxygen.

M  +2    -0    style/oxygensplitterproxy.cpp

http://commits.kde.org/oxygen-transparent/5a2e4c9223693685c81b731f747e9768246100ec
Comment 56 Nikita Skovoroda 2012-03-09 09:55:09 UTC
> No problem. It will be in 4.8.1 (in one month. So thats not too long).
> It's good thing that the glitches are gone.

I just updated to 4.8.1 and splitter glitches (in all apps) are completely gone for me (except for the ksignalplotter bug #293953, but i didn't observe that layout in real apps).

Thanks!