Bug 167892 - Calc hangs when very low number is formatted as a fraction
Summary: Calc hangs when very low number is formatted as a fraction
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.5.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, possibleRegression
Depends on:
Blocks: Performance
  Show dependency treegraph
 
Reported: 2025-08-10 21:34 UTC by Stephane Quenson
Modified: 2025-08-12 04:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Try formatting A1 as fraction hangs Calc (9.87 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-08-10 21:36 UTC, Stephane Quenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Quenson 2025-08-10 21:34:38 UTC
Description:
I tried to format the content of the cell A1, 1E-21, as a fraction, then Calc hangs and become completely unresponsive (I waited for more than 2 minutes).

Steps to Reproduce:
1. Enter in A1: 1E-21 and press Enter. A1 shows 1.00E-21
2. Select the cell A1 and use the menu Format > Cells... 
3. Select Fraction in the category column

Actual Results:
Calc hangs immediately after the click on Fraction

Expected Results:
Calc should display the possible formats 


Reproducible: Always


User Profile Reset: No

Additional Info:
After trial and error, I noticed that numbers greater than 1.09E-19 can be formatted as fractions, while numbers smaller than 1.08E-19 triggers the hang-up.
As 2 ^ 63 is 1.0842E-19, I suspect an overflow in the program.
Comment 1 Stephane Quenson 2025-08-10 21:36:41 UTC
Created attachment 202271 [details]
Try formatting A1 as fraction hangs Calc
Comment 2 Stephane Quenson 2025-08-10 21:42:25 UTC
It is obviously 2 ^ -63 which is between 1.08E-19 and 1.09E-19 (I forgot the minus sign)
Comment 3 m_a_riosv 2025-08-11 00:35:42 UTC
Reproducible
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7f4868348c14b305fcd75744e1e3544d0d3a5d61
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 4 Saburo 2025-08-11 04:12:12 UTC
In 6.4.7 it didn't hang, it just showed 0.
Version: 6.4.7.2 (x86)
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 12; OS: Windows 10.0 Build 26100; UI render: GL; VCL: win; 
Locale: ja-JP (ja_JP); UI-Language: en-US
Calc: CL

bibisected with win64-7.0
Version: 7.0.5.0.0+ (x64)
Build ID: 44d17f8feca372acd41142d1b607d3360282bf30
CPU threads: 12; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

commit 44d17f8feca372acd41142d1b607d3360282bf30
author	Eike Rathke <erack@redhat.com>	Tue Oct 13 21:41:45 2020 +0200
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Wed Jan 06 11:47:06 2021 +0100

Resolves: tdf#137453 Implicit conversion from sal_uInt64 to sal_Int32 is bad..

Change-Id: I5681249808cf623d3b7df09988f285268ea8d85f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104255
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 18f8a7056ac7b4677f4d99aac24ed2db44010140)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108730
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>