Bug 109381 - LibreOffice 5.3 hangs when opening/saving/running a macro containing "0." (zero followed by period)
Summary: LibreOffice 5.3 hangs when opening/saving/running a macro containing "0." (ze...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 112466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-26 13:39 UTC by Elwin Dijck
Modified: 2018-11-08 07:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
ODS file that causes Calc 5.3 to hang on opening (10.22 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-07-26 13:40 UTC, Elwin Dijck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elwin Dijck 2017-07-26 13:39:58 UTC
Description:
I found that after upgrading LibreOffice to version 5.3, Calc would hang and stop responding during the "calculating" step of opening a specific ODS spreadsheet that worked fine with Calc 5.2 (happened both on a Windows and an openSUSE Linux system after upgrading). I let it run for a night and it hadn't gotten any further the next morning.
I managed to isolate the problem to a macro containing something like "If x <> 0. Then". Note that the hang when opening the file occurred before the warning whether macros should be run at all, it seems LibreOffice gets stuck scanning the macro or something. Changing "0." on that line to "0" or "0.0" or removing the macro makes the file open as usual.


I found an easier way to reproduce the problem, it seems LibreOffice gets stuck on any macro containing "0.". Just writing "0." in a new macro and trying to save or run it causes LibreOffice to stop responding (the problem is not specific to Calc).

Note: I'm not sure whether "0." is actually a valid double constant in LibreOffice BASIC, but it should not hang the program.

Steps to Reproduce:
1. Open a new LibreOffice document
2. Go to macro editing: Menu Tools / Macros / Edit Macros (or Organize Macros / LibreOffice Basic / Edit)
3. Write "0." on an empty line (without the quotes, zero followed by period)
4. Press Ctrl+S or F5

Alternate (my original) way to reproduce problem
1. Open macrozerowithperiod.ods (attached) with Calc (I created this file with Calc 5.2 where it works fine)

Actual Results:  
LibreOffice hangs

Expected Results:
Macros are saved or run

macrozerowithperiod.ods file is opened


Reproducible: Always

User Profile Reset: Yes

Additional Info:
I have tested a couple of LO versions on different OSes.
I can reproduce the problem on Windows 10 (5.3.4.2 and 5.4.0.3), openSUSE Linux (5.3.3.2) and Mac OS X (5.3.4.2).
The hang did not occur with 5.2 and earlier versions, I tested Windows 10 (5.2.7.2) and openSUSE Linux (5.2.5.1).


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Elwin Dijck 2017-07-26 13:40:49 UTC
Created attachment 134872 [details]
ODS file that causes Calc 5.3 to hang on opening
Comment 2 Xisco Faulí 2017-07-26 15:00:01 UTC
Regression introduced by:

author	Eike Rathke <erack@redhat.com>	2016-06-27 19:54:59 (GMT)
committer	Eike Rathke <erack@redhat.com>	2016-06-27 19:57:52 (GMT)
commit 9a6527a98fb968b3fe6bc293ff7520a9480d43d0 (patch)
tree 69e8bc1768eca1dcd4fcf783f799e122a2e47a54
parent 1511f5c399182c003c19cc18b316f2fdaac0501d (diff)
stringToDouble() do not parse separator without digit as 0.0
Occurred in CSV import without "detect special numbers" activated for data like
,.,
where the . dot resulted in a numeric cell value 0

Bisected with bibisect-linux-64-5.3

Adding Cc: to Eike Rathke
Comment 3 Katarina Behrens (Inactive) 2017-11-07 12:35:41 UTC
*** Bug 112466 has been marked as a duplicate of this bug. ***
Comment 4 QA Administrators 2018-11-08 04:07:01 UTC Comment hidden (obsolete)
Comment 5 Roman Kuznetsov 2018-11-08 07:13:28 UTC
don't repro in

Версия: 6.1.2.1
ID сборки: 65905a128db06ba48db947242809d14d3f9a93fe
Потоков ЦП: 4; ОС:Windows 6.1; Отрисовка ИП: по умолчанию; 
Локаль: ru-RU (ru_RU); Calc: group threaded

Status->WFM