Bug 167186 - Crash when copying large selection of cells (content only integers)
Summary: Crash when copying large selection of cells (content only integers)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cut-Copy Crash
  Show dependency treegraph
 
Reported: 2025-06-24 13:41 UTC by matthewnote
Modified: 2025-09-08 14:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: https://crashreport.libreoffice.org/stats/crash_details/ac462b4f-01bc-4873-b20f-b089370679c2


Attachments
A test file of only integers in A1:ALL500000 every column identical (2.89 MB, application/vnd.oasis.opendocument.spreadsheet)
2025-06-24 13:45 UTC, matthewnote
Details
File of A1:ALL322655 integers is the largest table here to Copy without Crash (1.87 MB, application/vnd.oasis.opendocument.spreadsheet)
2025-07-04 15:20 UTC, matthewnote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthewnote 2025-06-24 13:41:00 UTC
Description:
A sheet of integers is made up of 1000 identical columns.
Each column has every cell as row number 1 down to row number 500000.
The File can be saved and is compact (only 3MB).
The File can be opened and is (as to be expected) very large in GB of RAM.
Using Copy of a selection can cause a crash.



Steps to Reproduce:
1. Check 22GB RAM available on the PC for testing (the test file expands much). 
2. Open the attached 3.0 MB file (integers only in A1:ALL500000)
3. Click on A1; select all using ctrl+shift+> and then v
4. Mouse right click "Copy".  Wait a while then Calc crashes.

Actual Results:
https://crashreport.libreoffice.org/stats/crash_details/ac462b4f-01bc-4873-b20f-b089370679c2


Expected Results:
The selection A1:ALL500000 were available for copying and pasting elsewhere.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 12; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 matthewnote 2025-06-24 13:45:08 UTC
Created attachment 201444 [details]
A test file of only integers in A1:ALL500000 every column identical

The cells are only integer values and set to row number.  The File Save process detects the contiguous sequence from Row 1 all the way down to 500000 so the file is compact;  only 3 MB.  To open it or use it requires 22 GB available RAM.
Comment 2 m_a_riosv 2025-06-24 14:40:13 UTC
Reproducible
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 33560caa34a6532fb27641c19d7cc3bb4dc33057
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: default; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded
Comment 3 matthewnote 2025-06-28 14:37:54 UTC
Testing earlier versions on the same PC, yet boot to Windows 10 here (with eighteen parallel separate installs). Tested first Calc 6.4.7.2 then 7.0.0.1 then 7.3.0.1 then again 25.2.4.3

Unable to reproduce the crash on Windows 10.  All parallel installed versions open the file, can select, copy, paste into new sheet and save all the table A1:ALL500000.  There's a lot of CPU usage, struggle with the memory yet they function without Crash.  However, with Windows 10 on 32GB RAM, after the A1:ALL500000 has been selected (or after copying or pasting or saving), LibreOffice is unable to close.  Has to be forced to close using Task Manager Process "End".

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 8; 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


I notice the crash reported versions have UI render: default
So tested again on Windows 10;  switched off Skia in Options;  changes to "Hardware Acceleration". Restart, open the file using Calc 25.2.4.3
Unable to reproduce the crash.  Calc opens the file, can select, copy, paste, save.  Without SKIA it's very much slower.

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

On Windows 10, with or without SKIA the Crash does not reproduce.
Dualboot back into Ubuntu the crash is always reproducible.
Comment 4 matthewnote 2025-07-04 15:20:36 UTC
Created attachment 201656 [details]
File of A1:ALL322655 integers is the largest table here to Copy without Crash

Hoping this helps.  A table of 1000 columns down only to 322655 rows (all integers) can be selected and copied without crash.  Selecting row 322655 and autofilling down one more row then saved under a new name makes the table cause a crash if copied.
Comment 5 BogdanB 2025-09-08 14:12:55 UTC
32768 is 2 to the power of 15, so there is a limit that is generating a crash.