Bug 141384 - Missing hyphenation data for installed language after Writer crash and document recovery
Summary: Missing hyphenation data for installed language after Writer crash and docume...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-31 12:39 UTC by ajlittoz
Modified: 2023-03-06 09:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Recovered document issuing "Missing hyphenation data" (8.92 KB, application/vnd.oasis.opendocument.text)
2021-03-31 12:39 UTC, ajlittoz
Details
testshowingbadengb (14.23 KB, application/vnd.oasis.opendocument.text)
2022-11-23 02:39 UTC, 76066.515
Details
replaced_file (16.35 KB, application/vnd.oasis.opendocument.text)
2022-11-23 03:09 UTC, 76066.515
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ajlittoz 2021-03-31 12:39:25 UTC
Created attachment 170855 [details]
Recovered document issuing "Missing hyphenation data"

Working on https://ask.libreoffice.org/en/question/286107, I tried to reproduce the "Missing hyphenation data" error for a document which was never stored on Google Docs as one user complained.

I created a small document with a paragraph typed Italian (it_IT) in its style definition and another one in French (fr_FR). I have the French language pack installed  but not the Italian one.

Despite all my efforts, I could not reproduce the error. I noticed however after adjusting indents to cause hyphenation (enabled in style definitions) that hyphenation did not occur. Words were divided but not as grammar would tell, suggesting the hyphenation engine was not active.

I checked my package manager for possible missing package but hunspell, hyphenation for French and French language pack were all ther.

Coming back to the document I started to change wildly Tools>Options>Language Settings and to observe the effects.

Suddenly, Writer crashed. I don't remember which setting I was playing with at this moment.

I restarted Writer which offered to recover the document. Yes. As soon the recovered document was opened, "Missing hyphenation data fr"! I saved the document as .fodt and looked for "fr".

All styles and paragraphs were tagged fo:language="fr" fo:country:"FR" except one with "it" and "IT". I changed "fr" to "fr_FR" (perfectly aware it is wrong) and reopened in Writer. This time message was "Missing hyphenation data it" as expected.

Back to the .fodt, I reverted "fr_FR" to "fr" and message became "Missing hyphenation data fr".

In the .odt, I disabled auto-hyphenation in paragraph style definitions and changed it_IT language for the first paragraph to fr_FR. On reopen, I still get "Missing hyphenation data fr".

Not being versed in XML encoding, I attach the .odt document but it is a bit different from the one just recovered.

This bug report was initially a comment in bug 137742. Made an original bug report on Eike Rathke's suggestion.
Comment 1 ajlittoz 2021-03-31 12:40:29 UTC
Forgot important data:

Version: 7.0.5.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: kf5
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 2 Eike Rathke 2021-04-01 08:55:27 UTC
(See also https://bugs.documentfoundation.org/show_bug.cgi?id=137742#c28)

Adding findings from https://bugs.documentfoundation.org/show_bug.cgi?id=137742#c30 so far, to whoever may be interested in.

Code pointers for that:

Check for hyphenator to output the info message happens in sw/source/core/text/inftxt.cxx line 1496 of SwTextFormatInfo::IsHyphenate() with

  if (!xHyph->hasLocale(g_pBreakIt->GetLocale(eTmp)))

where eTmp is LCID 0x040C (1036) for fr-FR and GetLocale() call correctly results in lang::Locale("fr","FR","") and then in my debug build where I do have French hyphenation available xHyph->hasLocale() returns true and does not complain.

The info message in case the locale is not found also only outputs the language, not the full language tag, so that single "fr" there is explained.
Comment 3 ajlittoz 2021-04-01 09:18:44 UTC
Further experiment: I wiped out my user profile and restarted Writer without editing any file so that the user profile is recreated neatly. Closed. Opened the faulty file: dame error message.

The issue does not seem to some parameter impacted by the crash.
Comment 4 InterestedQ 2021-05-15 07:32:27 UTC
I continue to receive the above message re hyphenation (but no crash).  I do not want to hyphenate words words but the message continues to show and insists that I install the hyphenation package.
Comment 5 Dieter 2022-08-19 07:26:56 UTC
Hello Ajlittoz, a new major major release of LibreOffice is available since this bug was reported. Could you please try to  reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 6 76066.515 2022-11-23 02:39:35 UTC
Created attachment 183726 [details]
testshowingbadengb

This file was originally created in 2012. I do not use en-GB, but LO 7.3.7.2 requests I install en-GB.
Comment 7 76066.515 2022-11-23 03:09:36 UTC
Created attachment 183727 [details]
replaced_file

The prior file might no longer show the error message. This one shows it for me. :- Doug.
Comment 8 ajlittoz 2022-11-23 10:05:22 UTC
(In reply to Dieter from comment #5)
> Hello Ajlittoz, a new major major release of LibreOffice is available since
> this bug was reported. Could you please try to  reproduce it with the latest
> version of LibreOffice from
> https://www.libreoffice.org/download/libreoffice-fresh/ ?
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the latest version.

Sorry for late answer.

Made some tests with 7.4.3.2 under Fedora 37. Can't reproduce the behaviour. Apparently, fixed for the test file. Didn't see the mishap with @76066.515@compuserve.com's file but didn't play with its XML as I did with my file.
Comment 9 Buovjaga 2023-03-06 09:29:12 UTC
(In reply to ajlittoz from comment #8)
> (In reply to Dieter from comment #5)
> > Hello Ajlittoz, a new major major release of LibreOffice is available since
> > this bug was reported. Could you please try to  reproduce it with the latest
> > version of LibreOffice from
> > https://www.libreoffice.org/download/libreoffice-fresh/ ?
> > I have set the bug's status to 'NEEDINFO'. Please change it back to
> > 'UNCONFIRMED' if the bug is still present in the latest version.
> 
> Sorry for late answer.
> 
> Made some tests with 7.4.3.2 under Fedora 37. Can't reproduce the behaviour.
> Apparently, fixed for the test file. Didn't see the mishap with
> @76066.515@compuserve.com's file but didn't play with its XML as I did with
> my file.

Don't know if it's relevant, but at least bug 137742 received commits after Eike's comment 2.

Let's call this worksforme, then.