Bug 108270 - Reloading presentation created with Focus template leaks memory leaks more memory every time (see comment 1)
Summary: Reloading presentation created with Focus template leaks memory leaks more me...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All Windows (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2017-05-31 18:58 UTC by Telesto
Modified: 2023-01-12 03:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (2.44 KB, text/plain)
2017-10-04 08:16 UTC, Telesto
Details
DrMemory (312.88 KB, application/x-zip-compressed)
2018-06-19 21:26 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-05-31 18:58:12 UTC
Description:
Quite likely a dupe of already reported memory leaks (most likely bug 92482) but not 100% sure. So created a new one.



Steps to Reproduce:
The easiest why is to monitor memory usage (for example with Process Explorer) while following the steps. The intention is to increase the working set step by step while manipulating (multiple) document (and letting some of the increase stick). Repeating the exact same steps over and over doesn't seem to work. Using all sorts of different documents helps.

1. Open a random file from start Center https://www.iso.org/files/live/sites/isoorg/files/archive/ppt/en/ims-alerts_9001_14001_overview.ppt
2. Select all slides
3. Change the template (use all available)
4. Close the file (grey cross -> going back to Start Center)

Impress
1. Create Impress Document -> Choose a template
2. Add slides (around 100)
3. Select All of them. Choose switch to different templates (all available)
4. Scroll a bit around in the slide panel
5. Save the file.
6. Close the file (grey cross -> going back to Start Center)

Writer
1. Open a document http://igne.us/Smokie1.odt (from start center0
2. Select all content
3. Play with the formatting (for example everything bold/underlined/all sorts of color highlighted
4. Save the file
6. Close the file (grey cross -> going back to Start Center)

Calc
1. Open a new spreadsheet
2. Select All Cells
3. Change the background color
4. Close the document

5. Open a new spreadsheet
6. Add a shape
7. Change the area to Hatching and select one
8. Close the document

Actual Results:  
Memory usage is steadily increasing

Expected Results:
Memory should stay stable


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 5.5.0.0.alpha0+
Build ID: ec79f3453471ee9b6ae32e71ff16ea99d9b7751c
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-05-28_23:21:44
Locale: nl-NL (nl_NL); Calc: CL

and in
Versie: 4.4.6.3 
Build ID: e8938fd3328e95dcf59dd64e7facd2c7d67c704d
Locale: nl_NL

less prone:
Version: 4.3.7.2
Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Telesto 2017-06-13 14:43:32 UTC
A more effective way to reproduce

Impress
1. Open Impress
2. Select the Focus Template
3. Save the file
4. Choose File -> reload (and keep repeating reload; memory usage will steadily increase)
5. Close the document and go back to the start center (notice that it has no effect on the memory usage)

Writer
1. Open Writer
2. Right Click -> Page
3. Area tab -> Bitmap
4. Choose Roses
5. Save the file
6.  Choose File -> reload (and keep repeating reload; memory usage will steadily increase)
Comment 2 Buovjaga 2017-06-17 16:16:28 UTC
Testing with the Impress Focus template. Repro on Windows, but no repro on Linux.

Doesn't look like a dupe of bug 92482 as that one is also seen on Linux.

I wonder if it's related to bug 108552 as it uses the same template and a dupe had stuff about GDI+..

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 5c81adc51a05a016e754de7961d3a7bdb4494e01
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 16th 2017

Version: 6.0.0.0.alpha0+ (x64)
Build ID: 2404a17e157273430d40ceaa1ab1275e7b50ba6e
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-06-16_23:41:27
Locale: fi-FI (fi_FI); Calc: group
Comment 3 Telesto 2017-10-04 08:16:28 UTC
Created attachment 136749 [details]
Bibisect log

~/bibisect-win32-5.3
$ git bisect bad 55626f94856e6fd30b135168fee376667a503e3c is the first bad commit
commit 55626f94856e6fd30b135168fee376667a503e3c
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Jun 12 11:16:47 2016 -0700

    source 29eac0e49e372092cb119898e9f1116ab4e00532

    source 29eac0e49e372092cb119898e9f1116ab4e00532

:040000 040000 08625739fd99077e08b3da02aad1ddbb7c629fd4 b5b179a40d547520727125175d5b90269b263899 M      instdir
Comment 4 Telesto 2017-10-04 08:18:05 UTC
author	Caolán McNamara <caolanm@redhat.com>	2016-06-12 15:18:00 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2016-06-12 17:59:48 (GMT)
commit 29eac0e49e372092cb119898e9f1116ab4e00532 (patch)
tree 86a1413e7693bf6d41e5c795cafec47972803463
parent 7c983445656e1f1942cf2d7398a77342004ed168 (diff)
Resolves: tdf#100313 OutputDevice::isDisposed doesn't work anymore
since

commit 51fe4d63dfdf0ea24d2fecf75d25cbe607ed1c09
Author: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
Date:   Tue May 3 00:34:05 2016 +0300

    tdf#97527 vcl: reference-count Menu

    Change-Id: Ia12434fede69ad247ed67691517437a9ada31acd
    Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/24596

which created a base-class VclReferenceBase for OutputDevice and
Menu and so moved isDisposed from OutputDevice to VclReferenceBase,
but *duplicated* the mbDisposed in VclReferenceBase so the
bit set by disposeOnce in OutputDevice was a different bit to the
bit returned by isDisposed from VclReferenceBase.

Which meant that the fix of...

commit 26c32cfee9fc9a769adba19f455e4d6c13b6d89d
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Fri Nov 27 16:10:10 2015 +0000

    Resolves: rhbz#1283426 using vdevs based on now dead physical devs is unsafe

no longer worked.

Finish moving the mbDisposed to VclReferenceBase to fix this
Comment 5 Telesto 2017-10-04 08:20:46 UTC
Adding Cc: to Caolán McNamara
Comment 6 Caolán McNamara 2017-10-20 11:56:12 UTC
drmemory didn't report any leaks from reloading a few times and exiting, so hard to see what's accumulating
Comment 7 Telesto 2018-06-19 21:26:51 UTC
Created attachment 142940 [details]
DrMemory

(In reply to Caolán McNamara from comment #6)
> drmemory didn't report any leaks from reloading a few times and exiting, so
> hard to see what's accumulating

I did a drmemory run. Results attached. I get quite a lot of errors. Mostly python35.dll. An example:

Error #271: UNADDRESSABLE ACCESS beyond heap bounds: reading 0x1067d010-0x1067d014 4 byte(s)
# 0 python35.dll!Py_GetAllocatedBlocks +0x3fe    (0x533395ee <python35.dll+0xe95ee>)
# 1 python35.dll!PyObject_Free         +0x11     (0x533391e2 <python35.dll+0xe91e2>)
# 2 python35.dll!PyEval_EvalFrameEx    +0x792    (0x53392323 <python35.dll+0x142323>)
# 3 python35.dll!PyEval_GetFuncDesc    +0x4d3    (0x53396e64 <python35.dll+0x146e64>)
# 4 python35.dll!PyEval_GetFuncDesc    +0x3d2    (0x53396d63 <python35.dll+0x146d63>)
# 5 python35.dll!PyEval_EvalFrameEx    +0x2264   (0x53393df5 <python35.dll+0x143df5>)
# 6 python35.dll!PyEval_EvalFrameEx    +0x410e   (0x53395c9f <python35.dll+0x145c9f>)
# 7 python35.dll!PyEval_GetFuncDesc    +0x53b    (0x53396ecc <python35.dll+0x146ecc>)
# 8 python35.dll!PyEval_GetFuncDesc    +0x3d2    (0x53396d63 <python35.dll+0x146d63>)
# 9 python35.dll!PyEval_EvalFrameEx    +0x2264   (0x53393df5 <python35.dll+0x143df5>)
#10 python35.dll!PyEval_GetFuncDesc    +0x4d3    (0x53396e64 <python35.dll+0x146e64>)
#11 python35.dll!PyEval_GetFuncDesc    +0x3d2    (0x53396d63 <python35.dll+0x146d63>)
#12 python35.dll!PyEval_EvalFrameEx    +0x2264   (0x53393df5 <python35.dll+0x143df5>)
#13 python35.dll!PyEval_GetFuncDesc    +0x4d3    (0x53396e64 <python35.dll+0x146e64>)
#14 python35.dll!PyEval_GetFuncDesc    +0x3d2    (0x53396d63 <python35.dll+0x146d63>)
#15 python35.dll!PyEval_EvalFrameEx    +0x2264   (0x53393df5 <python35.dll+0x143df5>)
#16 python35.dll!PyEval_GetFuncDesc    +0x4d3    (0x53396e64 <python35.dll+0x146e64>)
#17 python35.dll!PyEval_GetFuncDesc    +0x3d2    (0x53396d63 <python35.dll+0x146d63>)
#18 python35.dll!PyEval_EvalFrameEx    +0x2264   (0x53393df5 <python35.dll+0x143df5>)
#19 python35.dll!PyEval_GetFuncDesc    +0x4d3    (0x53396e64 <python35.dll+0x146e64>)
Note: @0:00:38.872 in thread 2632
Note: next higher malloc: 0x1067d020-0x1067d060
Note: prev lower malloc:  0x1067c470-0x1067ca80
Note: instruction: mov    0x10(%edx) -> %esi

Version: 6.2.0.0.alpha0+
Build ID: 66effc66abb1356af0aa54a79a83b1aae53520e4
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-06-19_05:01:54
Locale: nl-NL (nl_NL); Calc: CL

Removing: bibisected, bisected; probably wrong
Comment 8 QA Administrators 2021-01-11 03:54:46 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2023-01-12 03:20:37 UTC
Dear Telesto,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug