Bug Hunting Session
Bug 122509 - EDITING Calc crashes when manipulating Negative numbers in red on Currency ( not gtk3 )
Summary: EDITING Calc crashes when manipulating Negative numbers in red on Currency ( ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.1 rc
Hardware: All All
: highest critical
Assignee: Eike Rathke
URL:
Whiteboard: target:6.3.0 target:6.2.1 target:6.2....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-01-05 18:25 UTC by Emil Tanev
Modified: 2019-03-30 16:22 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["SvNumberformat::HasPositiveBracketPlaceholder()"]


Attachments
Backtrace (3.25 KB, text/plain)
2019-01-06 05:28 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2019-01-05 18:25:31 UTC
Open Calc
Write 2 in cell A1
Open Format cells dialog on A1
Go to Numbers 
Select Currency, -1,234.99 USD (the red one)
Check/uncheck the Negative numbers in red checkbox a couple of times

Issue: Crashes
https://screencast-o-matic.com/watch/cqVhFq3VMj


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 49fcd3bbb30f93763fc5cb80fa6ac5cec5d00834
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-24_22:40:25
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 Telesto 2019-01-05 21:08:11 UTC
Repro
Version: 6.3.0.0.alpha0+
Build ID: 6e5c4001c7b5cab2b2cc6419072acbe5fa7cb04a
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (nl_NL); UI-Language: en-US
Calc: CL

not with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 2 Aron Budea 2019-01-06 05:27:53 UTC
Bibisected to the following commit using repo bibisect-win32-6.2 (I suspect it's not platform-dependent, so setting OS to All until someone claims otherwise). Adding Cc: to Eike Rathke, please take a look sometimes.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=e607f1da329a2d4dd91904053d7ff86ac05c77bf
author		Eike Rathke <erack@redhat.com>	2018-10-03 00:00:08 +0200
committer	Eike Rathke <erack@redhat.com>	2018-10-04 15:02:13 +0200

Select the current format if multiple instead of first matching format code
Comment 3 Aron Budea 2019-01-06 05:28:48 UTC
Created attachment 148067 [details]
Backtrace
Comment 4 Oliver Brinzing 2019-01-06 15:03:36 UTC
repro with:

Version: 6.2.0.1 (x64)
Build-ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

*no* repro with:

Version: 6.1.4.2 (x64)
Build ID: 9d0f32d1f0b509096fd65e0d4bec26ddd1938fd3
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: group threaded
Comment 5 Xavier Van Wijmeersch 2019-01-06 15:43:40 UTC
repro with

Version: 6.3.0.0.alpha0+
Build ID: 2ca06709e52569b563f3003157817798d2846e6e
CPU threads: 2; OS: Linux 4.19; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-01-05_00:41:25
Locale: nl-BE (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Eike Rathke 2019-01-16 13:11:01 UTC
Investigating.
Comment 7 Eike Rathke 2019-01-16 14:03:50 UTC
Can't reproduce on Linux, no crash, neither in 6.2 nor in 6.3

But I see some odd behaviour that when deactivating "Negative numbers in red" the format code changes from
#,##0.00 [$USD];[RED]-#,##0.00 [$USD]
to
#,### [$USD];-#,### [$USD]
that instead should be
#,##0.00 [$USD];-#,##0.00 [$USD]

(result best seen with a decimal value like -1.23 or a 0 value as cell content to see that no digit is displayed in that case)

Don't know if that's related, but is anyway a bug and not restricted to currency formats.
Comment 8 Eike Rathke 2019-01-16 14:11:01 UTC
FWIW, that's

Version: 6.2.0.2.0+
Build ID: c3d38f3f0b54db8522c01f01299c48f1cf39efb2
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

so newer than what was tested to reproduce above.
Comment 9 Xisco Faulí 2019-01-16 14:27:31 UTC
Hi Eike,
Please, try with SAL_USE_VCLPLUGIN=gtk instdir/program/swriter, I can reproduce it in

Version: 6.3.0.0.alpha0+
Build ID: 1bf68dbf53f4b5308e295058226abd6d6fb49c3d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

but not with gtk3
Comment 10 Eike Rathke 2019-01-16 14:39:31 UTC
That indeed helps to reproduce.. thanks.
Comment 11 Commit Notification 2019-01-16 19:26:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c9d19b70c93b02e5c666414097e835039c598731%5E%21

Resolves: tdf#122509 we have a second list with generated currency formats

It will be available in 6.3.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 12 Eike Rathke 2019-01-16 19:27:50 UTC
Pending review
https://gerrit.libreoffice.org/66477 for 6-2
https://gerrit.libreoffice.org/66478 for 6-2-0
Comment 13 Commit Notification 2019-01-16 19:36:50 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d807d6a65f439da88623e45b1dabe7d9ef36cd3c%5E%21

Related: tdf#122509 prevent access of not existing base format

It will be available in 6.3.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 14 Commit Notification 2019-01-17 09:25:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/1b47b2b7cc71a75373df7fd656e2a6bdc0d9a21f%5E%21

Resolves: tdf#122509 we have a second list with generated currency formats

It will be available in 6.2.1.

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 15 Xisco Faulí 2019-01-17 12:35:42 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 5e89aad61e143ad6a52291ef7065f5b22e348c85
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Eike, Thanks for fixing this!
Comment 16 Commit Notification 2019-01-17 13:03:05 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2-0":

https://git.libreoffice.org/core/+/f69f0173b51ed502bf175ecbd3ef5fb1486a57fd%5E%21

Resolves: tdf#122509 we have a second list with generated currency formats

It will be available in 6.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 17 Eike Rathke 2019-01-17 14:41:43 UTC
Created bug 122786 for the behaviour mentioned in comment 7.
Comment 18 Commit Notification 2019-01-17 16:43:17 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/7fcab5877558c23c8772c07fc9af00f2c3dd7a84%5E%21

Related: tdf#122509 prevent access of not existing base format

It will be available in 6.1.6.

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 19 Commit Notification 2019-01-17 18:11:05 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/aee0babb24f18c6f47f315ffce504e0b49363a68%5E%21

Related: tdf#122509 prevent access of not existing base format

It will be available in 6.2.1.

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 20 Commit Notification 2019-03-30 16:22:06 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a16e16a3669dbe992c3073ae0ff4545830618c76%5E%21

uitest for bug tdf#122509

It will be available in 6.3.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.