Bug 99815 - Extention (WollMux) stop LibreOffice to close the window after saving
Summary: Extention (WollMux) stop LibreOffice to close the window after saving
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Juergen Funk (CIB)
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-13 06:37 UTC by Juergen Funk (CIB)
Modified: 2016-08-09 09:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Funk (CIB) 2016-05-13 06:37:19 UTC
In this case WollMux is conneted then:
 - Start writer, enter a text or open a document and change the text
 - then close the LO-window, the dialog "Save Document?" answer with "Save"
 - after save or save as, LO do not close the window

The main problem is when you close or Log out over KDE, then this process is break and in some situations the KDE freeze.

The problem is not only in WollMux it is in both.

The background is in comment 1
Comment 1 Juergen Funk (CIB) 2016-05-13 08:58:37 UTC
Problem:

- When the WollMux is connect, in this Line 
  http://opengrok.libreoffice.org/xref/core/sfx2/source/control/bindings.cxx#1092 
  it is true. 
  The problem here is here 
  http://opengrok.libreoffice.org/xref/core/sfx2/source/control/bindings.cxx#1105 
  we get not a result and set always to false.

- Without WollMux here 
  http://opengrok.libreoffice.org/xref/core/sfx2/source/control/bindings.cxx#1148 
  we get the result, and in this case it works fine.

- We need a return value but the main problem is the XDispatch-Interface 
  this is asynchon and has no result


Solution:

 - We using the XNotifyingDispatch in this case we get a result, in LO is 
   that synchron, but in the extention i have not found for must synchron.

Problem with XNotifyingDispatch:

- In Lo i must wait of the result, but that run in the main-thread and hang 
  when i wait, my momentan solution is, WollMux works synchron too. 

- The question here, exist a solution for this situation, i think a new 
  thread is not possible, in case of KDE-Closing it must end with result.
  But when exist a extra Session-Manager-Thread in this case we can wait, 
  but we should different between the main-thread and the 
  session-manager-tread, i belive when the main-thread is come we start in 
  this case a new thread, but i'm not sure


Other Problem with this new patch is here
http://opengrok.libreoffice.org/xref/core/sfx2/source/control/unoctitm.cxx#861
pItem is SfxBoolItem and the Value should be True or False but the test is only for a correct pointer that is always, in this case when save was not possible the windows was close, have fixed too.


Here my Patch as a draft https://gerrit.libreoffice.org/24953
Comment 2 Julien Nabet 2016-05-13 19:29:35 UTC
I've noticed some recent work from M Meeks, perhaps you should ping him on IRC or on dev mailing list? (see https://cgit.freedesktop.org/libreoffice/core/commit/?id=02833c03ee856a62d7185829b7c47bc088e086cc)
Comment 3 Juergen Funk (CIB) 2016-05-14 11:57:19 UTC
Hi Julien,

thank you for the hint, but i think the stuff of M Meeks is a new feature, but my patch solved this above descript bug.
I have set Thorsten Behrens as a reviewer, and he looks for other reviewer when it it possible
Comment 4 Commit Notification 2016-06-08 02:18:03 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

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

tdf#99815 use XNotifyingDispatch in sfx2

It will be available in 5.3.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 5 Commit Notification 2016-06-09 13:29:53 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

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

tdf#99815 fixups after XNotifyingDispatch

It will be available in 5.3.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 6 Buovjaga 2016-08-02 12:32:00 UTC
Jürgen: can the status be set to FIXED?
Comment 7 Juergen Funk (CIB) 2016-08-09 09:07:01 UTC
Hi Buovjaga

yes i thinks so, but in this dependent is here a other patch 903e60753f4cf8fb03e27ed312a699f72ac1649a and there is importent, too.

In my case the patch working

juergen