Bug 108838 - LibreOffice freezes while changing the template of many slides ( gtk/gtk3 )
Summary: LibreOffice freezes while changing the template of many slides ( gtk/gtk3 )
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: high major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.0.2 target:5.3.5
Keywords: accessibility, haveBacktrace, perf
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2017-06-28 15:03 UTC by Xisco Faulí
Modified: 2017-08-03 10:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB trace of hang with master (22.18 KB, text/plain)
2017-06-29 19:03 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-06-28 15:03:51 UTC
Steps to Reproduce:
1. Open the attachment 134347 [details] from bug 108833
2. Select all slides in the slide pane
3. Click Master Pages in the sidebar.
4. Select a random template and apply
5. LibreOffice Freezes

Reproduced in

Version: 6.0.0.0.alpha0+
Build ID: 7931ef2abbcef22de5cdddd26738e4dd8d1d8ca5
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

but not in

Version: 6.0.0.0.alpha0+
Build ID: 7931ef2abbcef22de5cdddd26738e4dd8d1d8ca5
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Buovjaga 2017-06-29 19:03:56 UTC
Created attachment 134392 [details]
GDB trace of hang with master

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 98befbb26217b0bf3f35354e418a355280c52cfc
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 29th 2017
Comment 2 Michael Stahl (allotropia) 2017-06-30 15:26:22 UTC
oh, didn't notice there was a bug for this

fixed with:

commit b2b085441dc79fb78607dbf1969c12a40db58214
Author: Michael Stahl <mstahl@redhat.com>
Date:   Fri Jun 30 15:23:15 2017 +0200

    accessibility: fix horrible memory leak in AccessibleTabBarBase
    
    Reproducing tdf#108833 failed because applying the Master Page takes
    > 2 hours; the time is spent calling vcl::Window listeners, of which
    there were some 39525 after a couple minutes, almost all of which
    AccessibleTabBarBase.
    
    AccessibleTabBarBase::WindowEventListener() has an inverted condition
    that suppresses the event that is generated from TabBar::Clear()
    and thus when DrawViewShell::ResetActualPage() calls Clear() no
    AccessibleTabBarPage is removed but then the InsertPage() calls create
    duplicate objects that again register as listeners.
    
    The condition is obviously inverted given the CVS commit message:
    
    1.2.88.1
    log
    @#135353# do not pass VCLEVENT_TABBAR_PAGEREMOVED (all) to objects other than AccessibleTabBarPageList
    @
    text
    a69 8
    
            if( ( pWinEvent->GetId() == VCLEVENT_TABBAR_PAGEREMOVED ) &&
                ( (sal_uInt16)(sal_IntPtr) pWinEvent->GetData() == TAB_PAGE_NOTFOUND ) &&
                ( dynamic_cast< AccessibleTabBarPageList *> (this) != NULL ) )
            {
                return 0;
            }
    
    Change-Id: I2a3b86bbd0f0251a966f41b316a3b313517df24f
Comment 3 Commit Notification 2017-07-04 10:32:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4ce1abe8e375dfcbcbaf4454b6de20231373ab40&h=libreoffice-5-4

tdf#108838 accessibility: fix horrible memory leak in AccessibleTabBarBase

It will be available in 5.4.0.2.

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 4 Commit Notification 2017-07-11 14:33:50 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5f345e3a19bf7cad56951ed90fdf78f03a15b96a&h=libreoffice-5-3

tdf#108838 accessibility: fix horrible memory leak in AccessibleTabBarBase

It will be available in 5.3.5.

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 Xisco Faulí 2017-08-03 10:25:34 UTC
Verified in

Version: 6.0.0.0.alpha0+
Build ID: 3f16306964d5bb81dda3c681bcabbacadf424e7b
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group