Bug 152520 - Crash: if macro uses module TITLE_CASE or SENTENCE_CASE in Transliteration module
Summary: Crash: if macro uses module TITLE_CASE or SENTENCE_CASE in Transliteration mo...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.0.0.alpha1+
Hardware: All All
: high major
Assignee: Julien Nabet
URL:
Whiteboard: target:7.6.0 target:7.5.0.0.beta2 tar...
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2022-12-15 13:36 UTC by Kamil Landa
Modified: 2023-01-24 10:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (15.96 KB, text/plain)
2022-12-17 09:59 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Landa 2022-12-15 13:36:11 UTC
Run this macro and Libre will crash.

Sub transliterationCrash
	dim oTr as object, s$, oLoc as new com.sun.star.lang.Locale
	with oLoc
		.Country="US"
		.Language="en"
		.Variant=""
	end with
	oTr=CreateUnoService("com.sun.star.i18n.Transliteration")
	'xray oTr.getAvailableModules(oLoc, 1) 'names of modules
	oTr.LoadModuleByImplName("SENTENCE_CASE", oLoc) 'CRASH for: TITLE_CASE, SENTENCE_CASE
		'OK for: LOWERCASE_UPPERCASE, UPPERCASE_LOWERCASE, TOGGLE_CASE, IGNORE_CASE
	s="AB cd. eF. "
	msgbox oTr.transliterateString2String( s, 0, Len(s) ) 'crash is here
End Sub

Crash:
Version: 7.5.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 2b4d136b65bc79a1248876160e85fab79d52d5d6
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL threaded

Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL


OK in:
Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL
Comment 1 Xisco Faulí 2022-12-15 14:40:24 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2021-09-16 10:36:48 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2021-09-16 12:05:00 +0200
commit c7551e8a46e2f9f8142aa7921a0494221ae096e8 (patch)
tree 1ac1a31fa7993a1e490f1e0d89146cc3cd9524f5
parent 92e8706b6de54b0e2e7d5915f5f9ff299727930d (diff)
speedup CharacterClassificationImpl::toUpper

Bisected with: bibisect-linux64-7.3

Adding Cc: to Noel Grandin
Comment 2 Julien Nabet 2022-12-17 09:59:48 UTC
Created attachment 184205 [details]
bt with debug symbols

Here's a bt retrieved on pc Debian x86-64 with master sources updated today.
Comment 3 Julien Nabet 2022-12-17 10:00:28 UTC
Crash + regression + all env => let's increase priority.
Comment 4 Julien Nabet 2022-12-17 11:08:37 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/144375

I tested with TITLE_CASE and SENTENCE_CASE, it hasn't crashed with the patch. Now the pb is I don't see any difference in the resulting string.

Ab cd. ef. in both cases whereas I would have expected:
Ab cd. ef. for TITLE_CASE and
Ab cd. Ef. for SENTENCE_CASE
but that may be another bugtracker.
Comment 5 Commit Notification 2022-12-17 12:35:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6f7bc75dc1d0fe8227f30afc5eccdd7a9a9c4006

tdf#152520: Crash when using TITLE_CASE/SENTENCE_CASE in Transliteration module

It will be available in 7.6.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 6 Julien Nabet 2022-12-17 12:51:46 UTC
Backport for 7.5: https://gerrit.libreoffice.org/c/core/+/144365
Backport for 7.4: https://gerrit.libreoffice.org/c/core/+/144366

(thank you Noel for the quick feedback on the patch for master!)
Comment 7 Commit Notification 2022-12-18 15:12:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#152520: Crash when using TITLE_CASE/SENTENCE_CASE in Transliteration module

It will be available in 7.5.0.0.beta2.

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 8 Commit Notification 2022-12-18 15:13:05 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#152520: Crash when using TITLE_CASE/SENTENCE_CASE in Transliteration module

It will be available in 7.4.5.

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 9 Kamil Landa 2022-12-19 13:37:52 UTC
Verified, fixed in 7.6.0.0.alpha0

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ad387d5b984c6666906505d25685065f710ed55d
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-US
Calc: CL threaded
Comment 10 Commit Notification 2022-12-20 07:47:47 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#152520: basic_macros: Add unittest

It will be available in 7.6.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 11 Commit Notification 2022-12-20 09:53:42 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4-4":

https://git.libreoffice.org/core/commit/504161ede98e7b97e013f4e270441b3605d428ff

tdf#152520: Crash when using TITLE_CASE/SENTENCE_CASE in Transliteration module

It will be available in 7.4.4.

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 Xisco Faulí 2023-01-24 10:36:24 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard