Bug 166922 - Memory usage keeps increases when opening/closing the file with hi-resolution images
Summary: Memory usage keeps increases when opening/closing the file with hi-resolution...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2
Keywords: bibisected, regression
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2025-06-08 19:54 UTC by Telesto
Modified: 2025-06-18 08:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Alternative example (22.97 MB, application/vnd.oasis.opendocument.graphics)
2025-06-10 12:43 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-06-08 19:54:02 UTC
Description:
Memory usage keeps increases when opening/closing the file with hi resolution images

Steps to Reproduce:
1. Open Task Manager to check memory usage
2. Open attachment 149162 [details] (bug  123363)
3. Close the document (back to start center)
4. Reopen the file from start center.
5. Close it again
6. Reopen the file
7. Close it again
  

Actual Results:
Memory usage keeps climbing to 1800 MB in my case

Expected Results:
Closing the document should free the memory, I guess


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 17e8dbead42e2d4b55815b1b7b2846b03d62a15d
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2025-06-08 20:00:18 UTC
Found in
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 17e8dbead42e2d4b55815b1b7b2846b03d62a15d
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

Not in
Version: 25.2.2.0.0+ (X86_64) / LibreOffice Community
Build ID: d3c332aa2d721601b14ecfff3f4f83ab8e9cb5a5
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 2 Alan B. 2025-06-08 22:55:39 UTC
I can confirm that this bug is still present in the most recent master build:

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: fef47a8bcc8531e69ccea29f2db5929741e66a3e
CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

It is also NOT present in the most recent stable build:

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 16; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 3 Saburo 2025-06-10 08:14:39 UTC
win64-25.8 f382c1a267a93539f3c169530780889336d20b25..427c83177e2b9c6913c417990f0f9a5df5d32c3e

linux-64-25.8 8a17b7f0a679ebf21bcfb425186b205d996d129b

I'm not sure so can someone please verify this?
Comment 4 Telesto 2025-06-10 12:43:13 UTC
Created attachment 201179 [details]
Alternative example

After a couple of attempts bibisecting this

1. Open the attached file
2. Have activity monitor visible
3. File -> Reload

In the good state: nearly no change in memory usage on file -> reload
In the bad state: bump to 1,2 GB, dropping back at some point with quite some delay

Bibisect result:
$ git bisect good 8ce6efcac5b403333ac4523e637028b426af05a2 is the first bad commit
commit 8ce6efcac5b403333ac4523e637028b426af05a2
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Mar 19 23:48:50 2025 -0700

    source 427c83177e2b9c6913c417990f0f9a5df5d32c3e

    source 427c83177e2b9c6913c417990f0f9a5df5d32c3e
    source 78a66f99958ed258686cb2fac90f361954b5afe4
    source 1d8ff7bd62249ad0f825eaca18ea524d9d7c6c2e
    source bc77818fc726b1a475f9d06ae5d1374aa2ea4f99
    source ce0d72fbe222d8c839d33f9e3ad56bc195e84ce0
    source 599ab8dc3ae9d8b8749b6400e87d98a6dad2a03c
    source 7af8b3d3305fe8344cb9339269c5dc3f1cd44650
    source 15aa055adfb8e52d593a3302e283ec15b03900ff
    source 13df4f19a8bb849417fefeb883c90be32613e5b9
    source 1b03f6ea0362a38c6c4e5e767fcb5cf87ddd28dd
    source 1fa0e101740d2805cebc3b815aaa78927ee9b9fb
    source a59819d0765024b6d2be09eec87f4701d7afbcbe
    source 3bf06ce8df1fa0e121d284914ec0ad65be3473ca
    source d446029007914e23a9b93df1a0164d95e6b8c79b
    source 474b1a67c5f9b6d54a45f7ac6ed1fe3f510b1f58
    source aecaa87a126a6d84a1a8975ef4c150b0be5ae24b
    source 98c8077893044453ca76ad2a34c6d86d9be0c2c7
    source c4c399219932318e04ee98fa89b0a59b56b855e9
    source b29f2a8b00f82a16bee5aaea579ccaab691202ce
    source 08c170b2fa0ceaae388da4ddbed0330bd57a663a
    source 4957d832c76598e78a57324dad5b4de7345a33e2
    source 1c4c24042cbe0ede59513d30a676442f7f238b62
    source 2b1f913c8ea90c60fed50596e27e2328b1a7d788
    source e3bf8e0f58355d1460d190bd0b7751f133934573
    source 808c56f1ea159209ee35d73c7995806df834f46e
    source e9615765771453230e63409062bf96e45aabe339
    source c8bfafbbf802a690d94807b6292852bb754818e0
    source a8ce824a210f6300be4275283518a442737b2e77
    source 067f16627844588b18aba29c2577cd7007134aff
    source f60266597212b12039b9055de7db1724fd06cd3e
    source bac07e37a03b82c5033365f8c4f487445b57caec
    source 4d18e41ca7466ac1488da4e39388a15935991500
    source 036235278ce569ea657fa7f07ac6b2de40301da2
    source 59a18d3c3ca4f4543e0de616eaf7e5bdc4488383
    source 90490e7436ab8d823994b50472622d1c83fa118e
    source 9f687b06fc25156a2a3f4d688b56542612995aa9
    source 65e6adeff4ebe9c25b409bf9f5ac0b7e03403908
    source fbb46a2fd940d1b5f4b2782708756f67659c0f38
    source a2a88f0073bdd5119745679daa61469e87002579
    source 0c5953f1adb36ba3c5658050e6fb4b086839f210
    source e1c7923596f39bac8ce926b56a2450911ffde4d8
    source 950cbe4ccf2a95981e40f2a9589b22a403784557
    source b8167a76f4795a685f5e4d49eccabdcb5d8fddef
    source 7f3b61e5f1c95a9745a9406c213e6616055065e1
    source 39c6e59938f634c2fe40d81620c43a00a1f0e380
    source 5ea1f5d8e05e24c704a987fd86a1f63fea9c9641
    source 95a21d1cd35ca436c5b4a6d0cd923bfc77a2aa22
    source e499c8d2fba41c5958e8611f6cb007cca3e62ed9
    source 478920da0895d8c55827cda8f1d20e1b7fa511ea
    source d022499adacdc753065d79af56608c034de07b5d
    source 74147823a7c933c796239b00cd9bf89edb899eb3
    source 52d3da6b71d12b630d32761fcb0673d2c535b3dc
    source e846c8e5ed07e6b67a4375dd8ab4d4ca30fd9066
    source 288ad65ee8ef93dbcac3334249a39a09ebe4b660
    source 50fcf2f5f2465bb2873d04b1270bc42aec76290b
    source a6917e60975868d7926faa695336d437b7148660
    source 144af82ac9a0e2061a8fbb7f14608093ff0ee895
    source eb443f279243ea22530554ec7c37cf991b7ff48b
    source 1ae9af0e07ebbc5f15505eeabe05aca25320f541
    source 6e8a094a1a1d63ed2684900c5e0c4292f8d833a8
    source 11fccb169bc524d16a1476bec29e990bd0db9f7a
    source c5e050943c53f01c6458107bcd3bf381d3c71062
    source a0914d9c21efee21496ac432d2720ebb7b87f0d4
    source 2cc3a9f4c8c2359b525261ec917bb68fc5e8b6c4
    source 08d2454dd9ce1c201f04a884e322c9e3e08803e5
    source 493e37d16ce673560ab4309f91308cd5a99944d1
    source 8192e71eca228bb181ced36074f8144f604f969a
    source 8a17b7f0a679ebf21bcfb425186b205d996d129b
Comment 5 Telesto 2025-06-10 12:53:47 UTC
@Noel Grandin
There is quite a list of possible causes. These stand out:
https://git.libreoffice.org/core/+/8a17b7f0a679ebf21bcfb425186b205d996d129b%5E%21

and the follow-up
https://git.libreoffice.org/core/+/ce0d72fbe222d8c839d33f9e3ad56bc195e84ce0%5E%21
Comment 6 Roman Kuznetsov 2025-06-11 20:46:59 UTC
https://gerrit.libreoffice.org/c/core/+/186389
Comment 7 Commit Notification 2025-06-12 08:23:41 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b17e0bb5cab4484905dc72172735725bf4460e8e

tdf#166922 reduce memory usage in BufferedDecompositionFlusher

It will be available in 26.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 8 Telesto 2025-06-13 12:53:32 UTC
Everything is back to normal
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 220ef19df9de6ee7a99173a514402a9e701748d1
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL threaded
Comment 9 Commit Notification 2025-06-18 08:03:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/be690ae0ef961c3721504a02fb36cf07c7a008af

tdf#166922 reduce memory usage in BufferedDecompositionFlusher

It will be available in 25.8.0.0.beta2.

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

Affected users are encouraged to test the fix and report feedback.