Bug 418612 - Gwenview opens randomly the thumbnail bar as a new window
Summary: Gwenview opens randomly the thumbnail bar as a new window
Status: RESOLVED DUPLICATE of bug 427569
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 19.12.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-08 09:35 UTC by drokergeek
Modified: 2020-10-12 23:47 UTC (History)
6 users (show)

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


Attachments
Problematic gwenviewrc config file (420 bytes, text/plain)
2020-07-05 10:32 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description drokergeek 2020-03-08 09:35:26 UTC
Since the 5.18 release my gwenview has behaviouring weirdly: the thumbnails bar sometimes opens in a new window, showing the thumbnail bar in the main window with no thumbnails and bugged behaviour. I have made a video, and uploaded to reddit: https://www.reddit.com/r/kde/comments/ffabgp/gwenview_opens_randomnly_the_thumbnail_bar_in_a/

I tried replicating this in my guest account (account with 0 settings, all deleted in every reboot) and i couldn't. Also, i thought it maybe has anything to do with the scaling i use (hidpi laptop), and applied it in the guest account but still couldn't replicate it.


SOFTWARE/OS VERSIONS
Arch Linux, latest packages.
Plasma 5.18.2, Frameworks 5.67, Qt 5.14.1, linux 5.5.8
Comment 1 M 2020-03-19 00:21:27 UTC
I can confirm this behavior on my end. I'm running Manjaro with the optional KDE git packages from their repos. The exact date when it first started escapes me, it was likely around 2 months ago after a 5.18 prerelease update. Same issue when starting Gwenview from terminal, no relevant error message (only some libpng complaints about mismatching color profiles).

I hope it's alright to set the status to confirmed, there is at least one other person in the linked thread claiming to have this issue.
Comment 2 Nate Graham 2020-04-15 17:44:58 UTC
Weird. Cannot reproduce.
Comment 3 Hannes Schweizer 2020-04-17 21:04:48 UTC
Confirmed on my gentoo box as well:
plasma 5.18.4
frameworks 5.69.0
apps 19.12.3
qtcore 5.14.1

My current workaround: close the separate thumbnail window and click on "Thumbnail Bar" button twice, works consistently.
Comment 4 drokergeek 2020-04-17 21:10:42 UTC
I'm not really sure about this but i think it happens when the image is not cached, thats why it stopped happening in my video when i opened the same image than before, but as soon as i open another one it happens again
Comment 5 tdr 2020-05-13 21:22:02 UTC
I can confirm this as well, and I may have a fix.

Removing ~/.config/gwenviewrc and restarting the program fixed the problem for me. 

Reconfiguring Gwenview to my personal taste did not reintroduce the bug, so I thought this might be an upgrade issue with the configuration file.

I did a diff on the old and newly-generated configuration files. Perhaps the directive "State" may have something to do with it:

gwenviewrc.old
    State=AAAA/wAAAAD9AAAAAAAAAv4AAAGcAAAABAAAAAQAAAAIAAAACPwAAAA

gwenviewrc
    State=AAAA/wAAAAD9AAAAAAAAB3gAAAOiAAAABAAAAAQAAAAIAAAACPwAAAA

I tried replacing the line in the new file with the old one, but it didn't seem to re-trigger the bug.
--
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-29-lowlatency
OS Type: 64-bit
Processors: 4 × AMD Phenom(tm) II X4 955 Processor
Memory: 7.8 GiB of RAM
Comment 6 drokergeek 2020-05-13 22:04:44 UTC
After deleting the config it keeps happening to me
Comment 7 alex dekker 2020-07-04 20:53:48 UTC
*** Bug 421005 has been marked as a duplicate of this bug. ***
Comment 8 postix 2020-07-04 21:42:05 UTC
(In reply to Nate Graham from comment #2)
> Weird. Cannot reproduce.

This only happens to me if the thumbnail bar is already opened when gwenview starts. Deleting the cache or not does not seem to make a difference for me.
Comment 9 postix 2020-07-04 22:21:10 UTC
For what it's worth, I tested it with the self compiled build:

1) v20.04.1 
Bug could be reproduced after the third attempt

2) latest git (73b84a8fde067b4f8c9242a2b8e514eb9b8bbf2a) with the same config file and I could reproduce it.
This means the bug is still there.

---

Next I checked the config files as tdr suggested. For that:
1) mv .config/gwenviewrc .config/gwenviewrc.bak
2) Open gwenview, display the thumbnail bar
3) repeat until the bug triggers:
gwenview ~/images/test.image 
Alt + F4

As I could no longer reproduce the bug (after ~30 attempts) I compared the old with the new generated config file. There were a lot of differences, but I started by putting the following line 
> AnimationMethod=DocumentView::GLAnimation

from the gwenviewrc.bak and copied it to the [ImageView] section of the gwenviewrc config file so that it looked like this

> [ImageView]
> AnimationMethod=DocumentView::GLAnimation
> ThumbnailSplitterSizes=649,187


With that I could easily reproduce the bug again. Maybe you can check your config files for this line too!
Comment 10 postix 2020-07-05 10:32:36 UTC
Created attachment 129916 [details]
Problematic gwenviewrc config file

I tested it extensively again with the config. The only line which triggers it for meis the one given above.

Interestingly the relevant(?) code is already very old:
https://invent.kde.org/graphics/gwenview/-/blame/master/lib/documentview/documentviewcontainer.cpp#L90
https://invent.kde.org/graphics/gwenview/-/blame/master/lib/documentview/documentviewcontainer.cpp#L309

Maybe this is a Qt / QGLWidget bug / regression?
Comment 11 postix 2020-07-05 10:41:37 UTC
Just to complete this report from my side:

AnimationMethod=DocumentView::SoftwareAnimation
AnimationMethod=DocumentView::NoAnimation

don't trigger this bug. Only

AnimationMethod=DocumentView::GLAnimation
Comment 12 postix 2020-07-05 13:49:48 UTC
Additionally, the QGLWidget object, which is created when DocumentView::GLAnimation is used, has been marked deprecated and obsolete since Qt5.4 and was superseded by QOpenGLWidget in 2014. [1]

Maybe porting it to the newer component helps in this case?  


[1] https://www.qt.io/blog/2014/09/10/qt-weekly-19-qopenglwidget
Comment 13 Nate Graham 2020-10-12 23:47:06 UTC

*** This bug has been marked as a duplicate of bug 427569 ***