Bug 163375 - Calc crash when type-in a range in Formula Wizard
Summary: Calc crash when type-in a range in Formula Wizard
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: high major
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:25.2.0 target:24.8.3
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2024-10-10 12:02 UTC by Dietmar Cz
Modified: 2024-10-15 07:30 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: c15c1a02-10a9-4c49-a4b9-29739aabf130


Attachments
bt (4.64 KB, text/plain)
2024-10-12 10:17 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dietmar Cz 2024-10-10 12:02:14 UTC
Description:
fill in a formula with formula dialog in calc (sum product), while entering via keyboard a cell range, libreoffice crashes while hitting the double point to separate beginning og range from end of range
tested on linux debian sid and windows 11

Steps to Reproduce:
1.open calc
2.enter a cell and call formula dialog
3.select sum product
4.start entering cell range via keyboard

Actual Results:
crashes

Expected Results:
continue to finish cell range


Reproducible: Always


User Profile Reset: No

Additional Info:
entering the formula directly into the cell works as expected, entering a cell rang in the formula editor for sum function work stoo
Comment 1 nutka 2024-10-10 14:36:20 UTC
Reproducible (already in 24.8.0.3).

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (pl_PL); UI: en-US
Calc: threaded


User Profile Reset: Yes
Comment 2 Werner Tietz 2024-10-10 19:18:00 UTC
No repro in:

__________________
Version: 24.8.2.1 (AARCH64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Flatpak
Calc: threaded
Comment 3 m_a_riosv 2024-10-10 19:45:39 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode

Please paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 4 Dietmar Cz 2024-10-11 04:29:49 UTC
same behavior in safe mode

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 480(Build:1)
CPU threads: 12; OS: Linux 6.11; UI render: default; VCL: kf5 (cairo+wayland)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 4:24.8.2-2
Calc: threaded

can't put in the windows info at the moment
Comment 5 nutka 2024-10-11 06:12:41 UTC
Same issue on Windows 7 with a new LO 24.8 install


Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 4; OS: Windows 7 Service Pack 1 X86_64 (6.1 build 7601); UI render: Skia/Raster; VCL: win
Locale: en-US (pl_PL); UI: en-US
Calc: CL threaded
Comment 6 ady 2024-10-11 15:20:02 UTC
Repro with:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c3c29d31d77ff93aa50634cfd51c62d12dc0f6ec
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: threaded

When attempting to send a crash report:

"

HTTP response code said error

Please check the report and if no bug report is connected to the crash report yet, open a new bug report at bugs.documentfoundation.org.

"

After the above quoted text, there is additional text (that has no relevance here). To be noted, for the common user, there is no clear method to "check the report...", nor any indication about what to do with that "HTTP response code said error".

The same happens when LO is executed in Safe Mode.

The same happens with Skia disabled in normal mode (UI render: default).

STR:

1. New Calc.
2. While in cell A5, start the Function Wizard.
3. Select the SUMPRODUCT() function; NEXT.
4. In the first "Array1" field, manually type-in:
4.1. "A1:" (without quotation marks).

As soon as we type the colon character ":", Calc crashes.

Raising Importance.
Comment 7 m_a_riosv 2024-10-11 23:15:07 UTC
First one with the issue on the ones I have installed.
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Latest version that works on the ones I have installed.
Version: 24.8.1.0.0+ (X86_64) / LibreOffice Community
Build ID: 2bf3cada925ca49e3ac6a249ec6c342954739986
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 8 BogdanB 2024-10-12 04:21:13 UTC
Balazs, please, can you take a look?
 4015a3f066a322f1215a177150f9f3f90f3b2434 is the first bad commit
commit 4015a3f066a322f1215a177150f9f3f90f3b2434
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Fri Mar 22 10:10:25 2024 +0100

    source ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f
    
    source ba0ec4a5d2b025b675410cd18890d1cca3bc5a2f

 instdir/program/libsclo.so | Bin 25395080 -> 25395080 bytes
 instdir/program/setuprc    |   2 +-
 instdir/program/versionrc  |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)


tdf#159687 sc formula SUMPRODUCT performance fix: add more binary
operators which need to be checked if they are next to a trimmable
DoubleRef arguments or not.
Example:
=SUMPRODUCT(($D:$D>M47:M47)*($D:$D<M48:M48)*($I:$I=N$41)) -->
$D:$D and $I:$I columns are trimmable.

Recalculation of formulas with a lot of SUMPRODUCT where we comparing
full columns could take minutes during editing a sheet. With reducing
the size of the compared ranges to the actual data could significantly
speed up the recalculation.

This takes the recalculation time from ~50 sec to <1 sec on my machine.

Note: probabaly the same could be applied to the SUM function.

Change-Id: I758660d0b638ef7255bd5a41a96755289b5a2b41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Comment 9 ady 2024-10-12 04:41:13 UTC
(In reply to BogdanB from comment #8)
> Balazs, please, can you take a look?

Let's CC Balazs.
Comment 10 Balázs Varga (allotropia) 2024-10-12 09:35:09 UTC
Will check it as soon as possible. Thanks for the report.
Comment 11 Julien Nabet 2024-10-12 10:17:34 UTC
Created attachment 197018 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I attached the relevant bt part.

Also, in gdb, I get:
(gdb) p **(ppTok)
$9 = {_vptr$FormulaToken = 0x7fa8d4f53d18 <vtable for formula::FormulaByteToken+16>, eOp = ocRange, eType = formula::svByte, eRefCntPolicy = formula::RefCntPolicy::ThreadSafe, mnRefCnt = 2}
(gdb) p **(ppTok-1)
$10 = {_vptr$FormulaToken = 0x7fa8bfee3cc0 <vtable for ScSingleRefToken+16>, eOp = ocPush, eType = formula::svSingleRef, eRefCntPolicy = formula::RefCntPolicy::ThreadSafe, mnRefCnt = 2}
(gdb) p *(ppTok-2)
$11 = (formula::FormulaToken *) 0x0
Comment 12 Commit Notification 2024-10-13 18:04:58 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#163375 sc: fix sumproduct crash bacause of non exists token

It will be available in 25.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 13 Commit Notification 2024-10-14 09:34:56 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/58e37b0f091be32e65c10171d463a86df62255b7

tdf#163375 sc: fix sumproduct crash bacause of non exists token

It will be available in 24.8.3.

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 14 BogdanB 2024-10-14 19:49:14 UTC
Verified. Thanks, Balazs Varga.

Working fine in
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 17c4536ebd342bb917df0f5978b1b1b7281ef2b9
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Was not working in (for comparison reason)
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 15 nutka 2024-10-15 07:30:17 UTC
It also works properly in version 24.8.3

Version: 24.8.3.0.0+ (X86_64) / LibreOffice Community
Build ID: b9160c7f95c54028a6948c4f3aff113bd29df686
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (pl_PL); UI: en-US
Calc: threaded