Bug 159272

Summary: Closing LibreOffice with a copy of large range of cells on the clipboard (from a 47KB sized file) triggers a 5 GB ram spike on close
Product: LibreOffice Reporter: Telesto <telesto>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: heiko.tietze, ilmari.lauhakangas
Priority: medium Keywords: needsDevAdvice
Version: 4.3.0.4 release   
Hardware: All   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description Telesto 2024-01-18 20:53:13 UTC
Description:
Closing LibreOffice with a copy of large range of cells on the clipboard (from a 47KB sized file) triggers a 5 GB ram spike on close

Steps to Reproduce:
1. Open attachment 139120 [details] (bug 117997) (file-size 47 KB!)
2. Open a process monitoring tool showing ram usage
3. Download https://www.nirsoft.net/utils/insideclipboard.zip (or some other clipboard viewer)
3. Select the range A1:ACQ114
4. CTRL+C
5. CTRL+Q -> See RAM usage pike at 5 GB and combined with high CPU usage
6. Launch inside clipboard to inspect the content

Actual Results:
* Insane amount of ram used for a 47 KB file
* Information is added to the clipboard in a plethora of formats including Windows Bitmap (714 MB) & CF_DIB (714 MB). Necessary?

Expected Results:
* No massive ram spike
* Is it necessary to add a Bitmap of the sheet to the clipboard? Even twice; using different formats? 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 25276df12abd9d002f7f899900434617b256f745
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Buovjaga 2024-01-31 12:09:52 UTC
RAM spiking seems to be a very old behaviour, also seen to some extent in 4.3 (32-bit, so not able to use that much RAM).
Comment 2 Noel Grandin 2024-01-31 13:49:10 UTC
Yes it is necessary.

Otherwise copying stuff from LO, closing LO, and then pasting to <insert random application here> will break, and users will complain.
Comment 3 Telesto 2024-01-31 16:53:13 UTC
Well different approach would be some warning. Marking this as duplicate of bug 112537

*** This bug has been marked as a duplicate of bug 112537 ***
Comment 4 Telesto 2024-02-10 08:49:53 UTC
*** Bug 132132 has been marked as a duplicate of this bug. ***