Bug 104101 - Logging out at the KDE desktop, and canceling not saved document, lets the KDE desktop freeze
Summary: Logging out at the KDE desktop, and canceling not saved document, lets the KD...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-22 08:35 UTC by Juergen Funk (CIB)
Modified: 2023-08-08 01:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
X Session Management Library (230.06 KB, application/pdf)
2016-11-22 08:40 UTC, Juergen Funk (CIB)
Details
Better Documentation for the protocol (156.49 KB, application/pdf)
2017-04-28 07:56 UTC, Juergen Funk (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Funk (CIB) 2016-11-22 08:35:06 UTC
When you log off on the KDE Desktop (do not know for other Desktop) and LibreOffice has a not saved document, and you cancel the log off, in this case the KDE-Desktop freeze.

For reproduce set the switch "DocumentStoreUIEnabled" in instdir/share/registry/main.xcd the value to "true". I have use Kubuntu 16.04 (Desktop is in folder-view), and in the most case it freeze. For stoppping this behavior press ALT+Space enter "konsole" and give the command "killall plasmashell && /user/bin/plasmashell --shut-up"
Comment 1 Juergen Funk (CIB) 2016-11-22 08:40:34 UTC
Created attachment 128933 [details]
X Session Management Library
Comment 2 Buovjaga 2016-12-09 13:39:11 UTC
Are you sure this is our bug and not KDE's?
Comment 3 Thomas Hackert 2016-12-18 17:34:13 UTC
Hello Juergen, *,
thank you very much for reporting this bug :) However, I cannot confirm it with

OS: Debian Testing i686
LO: Version: 5.3.0.0.beta1
Build-ID: 690f553ecb3efd19143acbf01f3af4e289e94536
CPU-Threads: 2; BS-Version: Linux 4.8; UI-Render: Standard; VCL: kde4; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
(parallel installed, following the instructions from https://wiki.documentfoundation.org/Installing_in_parallel/Linux)
KDE: 5.8.2-1

sorry ... :( @Juergen: which distro are you using and which version of KDE? And as asked from Buovjaga in comment 2: are you sure that this is our bug?
Have a nice evening
Thomas.
Comment 4 Juergen Funk (CIB) 2017-01-10 08:35:37 UTC
Hi Buovjaga and thackert

sorry for my late answer (sick and holyday).

The bug is with kubuntu 1404 LTS and LibreOffice (build with KDE4) master.

The freeze is only with the LO-Dialog-Question (see description of this bug).

I have made a lot of change in our LO-session-manager and the problem should be better, but is not a way, and in this case i am no really sure is the last piece of the bug in KDE, DBUS or Session-Manager. 
I hope i find the last piece of the problem. 

Kate has not a problem, and this i think is a hint for a problem in LO (but not sure only in LO).

But when i use kubuntu 1604, in this case LibreOffice and Kate hang, in this case i think LO is not guilty.


Juergen
Comment 5 Juergen Funk (CIB) 2017-01-13 11:49:09 UTC
Have made a commit only for loggging (debug) you can see whats going on.
 https://gerrit.libreoffice.org/33034
Comment 6 Juergen Funk (CIB) 2017-01-24 06:54:28 UTC
This patch improve the behavior
https://gerrit.libreoffice.org/#/c/33215/
Comment 7 Juergen Funk (CIB) 2017-01-24 07:39:30 UTC
This patch stop question in context of session manager when cancel a frame
https://gerrit.libreoffice.org/#/c/33311/
Comment 8 Commit Notification 2017-02-07 08:45:42 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f57424cc4c0dd68083c7935ce8a9b795625cf84c

tdf#104101 Improve the session management handling

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2017-04-13 09:08:11 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 10 Juergen Funk (CIB) 2017-04-19 06:54:05 UTC
With this fix, we can not reproduce the bug, now.
But last year, with this same fix, was reproduce the bug sometimes.

But i think it is fixed
Comment 11 Juergen Funk (CIB) 2017-04-28 07:56:39 UTC
Created attachment 132923 [details]
Better Documentation for the protocol
Comment 12 Juergen Funk (CIB) 2017-04-28 08:13:07 UTC
Lot of links

API for the qsessionmanager is 
   here: https://linux.die.net/man/3/qsessionmanager

The better document for the protocol is 
   here: ftp://ftp.x.org/pub/X11R7.0/doc/PDF/xsmp.pdf

The other is 
   here: ftp://ftp.x.org/pub/X11R7.0/doc/PDF/xsmp.pdf 
   here: https://www.x.org/docs/SM/SMlib.pdf

Example code for that 
   here: https://people.gnome.org/~tthurman/docs/metacity/session_8c-source.html
   here: https://cgit.kde.org/kde-workspace.git/tree/ksmserver/shutdown.cpp?h=KDE/4.11

Documentation for the Inter-Client Exchange (ICE) Library is
   here: http://lesstif.sourceforge.net/doc/super-ux/g1ae04e/chap11.html