Bug 395875

Summary: ImageEditor window is blank when opened a second time
Product: [Applications] digikam Reporter: Michael Wilson <wilsoniya>
Component: ImageEditor-LoadAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: albrecht.will, caulier.gilles, Chris, fransaavedrarivera, hizibiz, hy, kde-bugs, kde, kobyeongmin, linux, metzpinguin, public3838, samuel.gilbert, tjunikov, wadehamptoniv
Priority: NOR    
Version: 5.9.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0
Sentry Crash Report:
Attachments: screen capture of bug behavior
Console output of running digikam
Digikam console output when launching without a data directory
Log Digikam running in console.
capture of the bug in video

Description Michael Wilson 2018-06-26 04:09:38 UTC
Created attachment 113574 [details]
screen capture of bug behavior

The image editor window may not be opened more than once. After being closed, the window is blank for all subsequent re-openings. This renders the image editor feature nearly unusable.

The exact version I'm using is 5.9.0-1 on Arch Linux.

Reproduction Steps:

1. open digikam
2. with an image thumbnail selected, click "Image Editor" in the toolbar
3. close the image editor window
4. with an image thumbnail selected, click "Image Editor" in the toolbar
5. image editor window is blank; even the sidebar and menubar are not shown
Comment 1 Michael Wilson 2018-06-26 04:12:35 UTC
Created attachment 113575 [details]
Console output of running digikam

Output has been redacted slightly.
Comment 2 Maik Qualmann 2018-06-26 06:08:16 UTC
Problem is here not to reproduce. Which desktop do you use? Why does the image editor have no menu and no toolbar? Can you please test it with the AppImage of www.digikam.org?

Maik
Comment 3 Michael Wilson 2018-06-26 15:54:33 UTC
Maik:

>Which desktop do you use?
My desktop is i3wm. 

> Why does the image editor have no menu and no toolbar?
Good question :) but unfortunately I don't know. I did not change any settings. 

> Can you please test it with the AppImage of www.digikam.org?
Unfortunately the digikam appimage will not run for me: 

> ./digikam-5.9.0-01-x86-64.appimage 
> -- digiKam AppImage Bundle
> -- Use 'help' as CLI argument to know all available options
> digikam: symbol lookup error: /usr/lib/libfontconfig.so.1: undefined symbol: > FT_Done_MM_Var

Which seems like an issue with the digikam appimage bundle not being fully self-contained.

Kind regards,
Michael
Comment 4 Maik Qualmann 2018-06-27 10:34:13 UTC
The console log file shows no errors. Can you please test it with a new empty user account, if the problem exists there as well?

Maik
Comment 5 Michael Wilson 2018-06-27 16:01:29 UTC
> Can you please test it with a new empty user account, if the problem exists there as well?

The problem persists :( The exact steps I took:

1. I moved ~/.digikam to a backup location
2. I started digikam
3. I set up a collection in a directory already containing several images
4. with an image thumbnail selected, click "Image Editor" in the toolbar
5. close the image editor window
6. with an image thumbnail selected, click "Image Editor" in the toolbar
7. image editor window is blank; even the sidebar and menubar are not shown

I will attach the log output, but I doubt it will be enlightening.
Comment 6 Michael Wilson 2018-06-27 16:02:30 UTC
Created attachment 113603 [details]
Digikam console output when launching without a data directory
Comment 7 Maik Qualmann 2018-06-27 19:37:46 UTC
(In reply to Michael Wilson from comment #5)

> 1. I moved ~/.digikam to a backup location

Is this your folder with the image collection? This folder is not created by digiKam. Unless your desktop system uses this folder for cache or configuration files. It would be good if you would rename the ~/.config/digikamrc file and start with a new configuration file.

At the moment I really have no idea what this behavior could trigger. It has never been reported as a bug before. The editor window is not deleted during runtime, but only "hidden". I could imagine a problem with the windowmanager from her desktop...


Maik
Comment 8 caulier.gilles 2018-06-27 20:54:00 UTC
Or perhaps a side effect with the widget style ?

Very strange behavior. I never reproduce this one too...

Gilles Caulier
Comment 9 Francisco Rivera 2018-06-28 19:32:47 UTC
Hi, I'm getting the same error. 

I compiled Digikam recently with QT 5.11.1 in GNU/Linux Gentoo and he started having this problem. With QT 5.10.1 it did not happen, I deleted the file        "~ /.config / digikamrc", I restarted the program and followed the problem.        I also did a test with a new user and I had no luck. I use as desktop      environment Plasma 5.13.1.

I tanslated with google.
Comment 10 Francisco Rivera 2018-06-28 19:35:05 UTC
Created attachment 113632 [details]
Log Digikam running in console.
Comment 11 Francisco Rivera 2018-06-28 19:42:39 UTC
Created attachment 113633 [details]
capture of the bug in video
Comment 12 Maik Qualmann 2018-06-28 20:27:33 UTC
Very strange, I also have Qt-5.11.1 (openSUSE) here and can not reproduce it with the latest git/master version. Francisco, can you also compile and test the digiKam-6.0.0 git/master version? The log file shows no abnormalities.

Maik
Comment 13 Maik Qualmann 2018-06-28 20:32:11 UTC
Can you for testing ~/.local/share/kxmlgui5/digikam rename/delete?

Maik
Comment 14 Maik Qualmann 2018-06-28 21:29:49 UTC
After deleting ~/.local/share/kxmlgui5/digikam I can also reproduce the problem. I'll take a look at it tomorrow...

Maik
Comment 15 Maik Qualmann 2018-06-29 06:00:16 UTC
Git commit 486e34a0b620b934e489d0a5f4bfc5ed1e32a8f5 by Maik Qualmann.
Committed on 29/06/2018 at 05:59.
Pushed by mqualmann into branch 'master'.

first quick fix to image editor save window state

M  +7    -0    core/utilities/imageeditor/main/imagewindow.cpp

https://commits.kde.org/digikam/486e34a0b620b934e489d0a5f4bfc5ed1e32a8f5
Comment 16 Maik Qualmann 2018-06-29 06:11:35 UTC
The cause is not the kxmlgui5 config. It is a difference now whether the Image Editor over Menu-> close or the ToolButton is terminated or over the X from the window. The following entries must be deleted in the digikamrc from the section [ImageViewer Settings]:

[ImageViewer Settings]
MenuBar
SplitterState
StatusBar

Maik
Comment 17 Maik Qualmann 2018-06-29 11:10:28 UTC
Light table window is also affected.

Maik
Comment 18 caulier.gilles 2018-06-29 12:12:00 UTC
Maik, 

I think your patch 486e34a0b620b934e489d0a5f4bfc5ed1e32a8f5 need to be done on top level class which is common to all DK main Windows. So typically in DXmlGuiWindow::closeEvent()...

Gilles
Comment 19 Maik Qualmann 2018-06-29 17:16:53 UTC
Git commit b621054834cf955118bbd32c77d758128f744ee2 by Maik Qualmann.
Committed on 29/06/2018 at 17:15.
Pushed by mqualmann into branch 'master'.

fix wrong saving of the window state
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +2    -3    core/app/main/digikamapp.cpp
M  +10   -2    core/libs/widgets/mainview/dxmlguiwindow.cpp
M  +1    -11   core/utilities/imageeditor/main/imagewindow.cpp
M  +1    -3    core/utilities/import/main/importui.cpp
M  +0    -1    core/utilities/lighttable/lighttablewindow.cpp
M  +1    -1    core/utilities/queuemanager/main/queuemgrwindow.cpp

https://commits.kde.org/digikam/b621054834cf955118bbd32c77d758128f744ee2
Comment 20 Francisco Rivera 2018-06-29 22:41:16 UTC
Compile from the git/master with the fix and the problem was solved for me, including when I delete the directory "~/.local/share/kxmlgui5/".

Thanks for your work Mike :)
Comment 21 Maik Qualmann 2018-07-02 06:08:53 UTC
There actually seems to be a problem with Qt-5.11. Other programs will also lose Menubar, Tollbar or Statusbar, such as KMail or VirtualBox. I was able to reproduce this again with the digiKam main window, when processes are still running in the background and the window was closed.

https://bugreports.qt.io/browse/QTBUG-66800
https://bugreports.qt.io/browse/QTBUG-67426

Maik
Comment 22 Maik Qualmann 2018-07-10 16:40:19 UTC
*** Bug 396374 has been marked as a duplicate of this bug. ***
Comment 23 Maik Qualmann 2018-07-11 04:59:23 UTC
*** Bug 396382 has been marked as a duplicate of this bug. ***
Comment 24 Maik Qualmann 2018-07-11 06:57:04 UTC
More info, Qt-5.11 has a close event patch for QWidgetWindow, which causes problems with some programs. OpenSUSE only needed 2 days to get fixed Qt packages without this patch and thus without any problems with lost Tool, Menu or Status bars.

Maik
Comment 25 Maik Qualmann 2018-07-22 07:18:39 UTC
*** Bug 396740 has been marked as a duplicate of this bug. ***
Comment 26 Maik Qualmann 2018-11-11 16:17:31 UTC
*** Bug 400938 has been marked as a duplicate of this bug. ***
Comment 27 Kristian 2018-11-11 21:04:10 UTC
In the meantime, this bug disappeared in digikam 5.9.0 for me as well. Must have been one of the latest Qt updates.
Comment 28 Maik Qualmann 2018-11-15 13:28:19 UTC
*** Bug 400962 has been marked as a duplicate of this bug. ***
Comment 29 Maik Qualmann 2019-01-01 12:32:08 UTC
*** Bug 402754 has been marked as a duplicate of this bug. ***
Comment 30 Maik Qualmann 2019-01-14 17:23:38 UTC
*** Bug 403207 has been marked as a duplicate of this bug. ***
Comment 31 Maik Qualmann 2019-01-15 17:37:46 UTC
*** Bug 403238 has been marked as a duplicate of this bug. ***
Comment 32 Maik Qualmann 2019-07-10 15:20:14 UTC
*** Bug 409685 has been marked as a duplicate of this bug. ***
Comment 33 Maik Qualmann 2019-09-18 15:44:17 UTC
*** Bug 412022 has been marked as a duplicate of this bug. ***
Comment 34 Maik Qualmann 2019-10-20 16:05:02 UTC
*** Bug 413242 has been marked as a duplicate of this bug. ***
Comment 35 Maik Qualmann 2020-04-02 17:22:40 UTC
*** Bug 419555 has been marked as a duplicate of this bug. ***