Bug 100732 - hang closing Print Preview with X-icon on menubar
Summary: hang closing Print Preview with X-icon on menubar
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.0
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2016-07-01 17:23 UTC by Terrence Enger
Modified: 2016-10-25 18:38 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
`make debugrun` until program is hung (33.11 KB, text/plain)
2016-07-01 17:30 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2016-07-01 17:23:41 UTC
STR

(1) Run LibreOffice from command line with parameter --calc.  Program
    displays Calc window "Untitled 1"; at the right end of the
    menubar, there is "X" icon

(2) In the toolbar of window "Untitled 1", click icon <Print Preview>.
    Program displays the print preview window "Untitled 1", showing
    grey background with words "No Data"; at right end of the menubar,
    there is icon "Close Document".

(3) In the menubar of the print preview window, click icon
    <Close Document>.

    Expected : the program should close the print preview window and
               display Calc editing window "Untitled 1".

    Observed : the <Close Document> icon is in depressed state, and
               the program hangs with low CPU usage.

The problem is unchanged by using a new user profile or by entering
some data into the spreadsheet.  By contrast, Writer does not have the
problem.

Working in the Linux daily dbgutil bibisect repository, I see that the
bug entered the program in the 61 commits between ...
    good b9c107d 2016-06-08 s-h 439b47e
    bad  f27d282 2016-06-09 s-h 91640c0


In particular, from `git bisect good` (whitespace added) ...

    f27d28246baf0bdbbd63817e5b6ee1eea3750814 is the first bad commit
    commit f27d28246baf0bdbbd63817e5b6ee1eea3750814
    Author: Miklos Vajna <vmiklos@collabora.co.uk>
    Date:   Thu Jun 9 05:43:21 2016 +0200

        2016-06-09: source-hash-91640c080c7a0643cce95f605ca7774da4c4dd77

    :100644 100644 b24777d6226e96daa36a6ed88694f8380de9d7f4
        4eab8abec593cd0f7afecfa35601035ffacb178a M	build-info.txt
    :040000 040000 8c0e730a88e2f16091ac0191d1741db525d5b114
        a76752f58354769f513e3dfa91ecdf2344bd599a M	opt

and from `git bisect log` (whitespace added) ...

    # bad: [c0a7b9f04f2c828cf13780993aa5e0ad5f9f4c95]
       2016-06-27: source-hash-74c01bb89faa1c900fb9b63a04c469a8166996d9
    # good: [5d480e64a972e0a71aa58a261d3d9706336400dd
       2016-05-26: source-hash-a042951ad4db2b84021e1d43361511dec998ce82
    git bisect start 'c0a7b9f04f2c828cf13780993aa5e0ad5f9f4c95'
       '5d480e64a972e0a71aa58a261d3d9706336400dd'
    # bad: [d64690d11f65d9ebd51443b0c1d1a4007f50fb70]
       2016-06-11: source-hash-200039cd022721bdc7847434325aa52f508dbf08
    git bisect bad d64690d11f65d9ebd51443b0c1d1a4007f50fb70
    # good: [8a5681a22f947ca4a6f276379e5a4f23e27ecdd9]
       2016-06-03: source-hash-6b3b352b06d92ef20194b9a992a521af2ef07b48
    git bisect good 8a5681a22f947ca4a6f276379e5a4f23e27ecdd9
    # good: [c316db64b322fa426baf09e3f0552f4a95017248]
       2016-06-07: source-hash-b3f1afc28fa537e6d4ff15de457a4a9dc4af809e
    git bisect good c316db64b322fa426baf09e3f0552f4a95017248
    # bad: [f27d28246baf0bdbbd63817e5b6ee1eea3750814]
       2016-06-09: source-hash-91640c080c7a0643cce95f605ca7774da4c4dd77
    git bisect bad f27d28246baf0bdbbd63817e5b6ee1eea3750814
    # good: [b9c107d6bd22bf387c585c8ef28cc0192c07aea6]
       2016-06-08: source-hash-439b47e84bb12ec1c5cc2332b4c6a9ea59f462ad
    git bisect good b9c107d6bd22bf387c585c8ef28cc0192c07aea6
    # first bad commit: [f27d28246baf0bdbbd63817e5b6ee1eea3750814]
       2016-06-09: source-hash-91640c080c7a0643cce95f605ca7774da4c4dd77
Comment 1 Terrence Enger 2016-07-01 17:30:16 UTC
Created attachment 126027 [details]
`make debugrun` until program is hung

line  command
----  -------
  90  info threads
 128  thread apply all backtrace
 196  thread apply all backtrace full
Comment 2 Terrence Enger 2016-07-01 17:32:56 UTC
Setting keywords regression, bibisected, haveBacktrace
Comment 3 Julien Nabet 2016-07-02 13:15:25 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

#1  0x00002aaaaad1fdea in osl_waitCondition (Condition=0x2fbcb10, pTimeout=0x0) at /home/julien/lo/libreoffice/sal/osl/unx/conditn.cxx:228
#2  0x00002aaab87182ea in osl::Condition::wait (this=0x2e704b0, pTimeout=0x0) at /home/julien/lo/libreoffice/include/osl/conditn.hxx:84
#3  0x00002aaab874b3ff in framework::DispatchHelper::executeDispatch (this=0x2e70460, xDispatch=uno::Reference to (framework::CloseDispatcher *) 0x244e0d8, aURL=..., 
    SyncronFlag=true, lArguments=empty uno::Sequence) at /home/julien/lo/libreoffice/framework/source/services/dispatchhelper.cxx:148
#4  0x00002aaab874b148 in framework::DispatchHelper::executeDispatch (this=0x2e70460, xDispatchProvider=uno::Reference to ((anonymous namespace)::Frame *) 0x27bf638, 
    sURL=".uno:CloseWin", sTargetFrameName="_self", nSearchFlags=0, lArguments=empty uno::Sequence)
    at /home/julien/lo/libreoffice/framework/source/services/dispatchhelper.cxx:107
#5  0x00002aaad98f07cb in framework::LayoutManager::MenuBarClose (this=0x27c8b40) at /home/julien/lo/libreoffice/framework/source/layoutmanager/layoutmanager.cxx:2630
Comment 4 Caolán McNamara 2016-07-09 20:13:31 UTC
This is a regression since...


commit f9bb13419549d621ffd55d9d81e0732a89560e2e
Author: Juergen Funk <juergen.funk_ml@cib.de>
Date:   Fri May 13 10:42:17 2016 +0200
Comment 5 Caolán McNamara 2016-07-09 20:26:55 UTC
Though maybe that only uncovers a problem with...

commit d0c3c24da2506bff1719a276f2eff34589fa7663
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Wed Jun 6 01:28:55 2012 -0400

    Check if the system window has a close handler, and if yes, call it.
    
    This allows the close event in the preview window to be handled in a
    custom fashion, instead of having it call the normal "close window"
    command.
Comment 6 Commit Notification 2016-07-09 20:30:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#100732 hang closing Print Preview with X-icon on menubar

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 7 Commit Notification 2016-07-11 19:23:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1bb21a08054d6909725ac46be8a4d6d7e5141d7c&h=libreoffice-5-2

Resolves: tdf#100732 hang closing Print Preview with X-icon on menubar

It will be available in 5.2.1.

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 8 Juergen Funk (CIB) 2016-07-12 08:43:50 UTC
Hi Caolán,

thank you for the patch

Juergen
Comment 9 Terrence Enger 2016-07-14 15:30:55 UTC
Setting status VERIFIED FIXED.

I see the problem gone in daily Linux dbutil bibisect repository
version 2016-07-12.  Thank you, Caolán.
Comment 10 Commit Notification 2016-07-15 16:38:36 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e4001d9c652fe658c7c3d5fff03a315400530513&h=libreoffice-5-2-0

Resolves: tdf#100732 hang closing Print Preview with X-icon on menubar

It will be available in 5.2.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.