Bug 153033 - Writer crashes after configuring LanguageTool in Writing Aids
Summary: Writer crashes after configuring LanguageTool in Writing Aids
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.5
Keywords: wantBacktrace
Depends on:
Blocks: Crash LanguageTool
  Show dependency treegraph
 
Reported: 2023-01-15 20:31 UTC by medmedin2014
Modified: 2023-08-13 12:00 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Writer crashes after configuring LanguageTool in Writing Aids (2.33 MB, video/mp4)
2023-01-15 20:31 UTC, medmedin2014
Details
LanguageTool local server config crashes LO (2.73 MB, video/mp4)
2023-03-24 23:09 UTC, medmedin2014
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medmedin2014 2023-01-15 20:31:24 UTC
Created attachment 184673 [details]
Writer crashes after configuring LanguageTool in Writing Aids

If you launch local LanguageTool server and then try to set its config in LibreOffice Writer, the whole app crashes. See attached video for more info.

Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
7.4.3-3
Calc: threaded

Operating System: Manjaro Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.1.1-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 1 Dieter 2023-01-30 07:37:41 UTC
I can't confirm with

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Have you tested with clean user profile?
Could you please retest with LO 7.5?

=> NEEDINFO
Comment 2 medmedin2014 2023-01-30 10:25:51 UTC
(In reply to Dieter from comment #1)
> I can't confirm with
> 
> Version: 7.5.0.3 (X86_64) / LibreOffice Community
> Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
> CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL:
> win
> Locale: de-DE (de_DE); UI: en-GB
> Calc: CL threaded
> 
> Have you tested with clean user profile?
> Could you please retest with LO 7.5?
> 
> => NEEDINFO

The bug is reported for Linux :)
Comment 3 Dieter 2023-02-01 15:50:24 UTC
(In reply to medmedin2014 from comment #2)
> The bug is reported for Linux :)

Sure, but as you know a lot of crashes are not limited to Linux. But nevertheless I think, my two questions are still valid. I can't test with Linux, so I heope that someone else is willing to test.
Comment 4 medmedin2014 2023-02-13 10:19:03 UTC
(In reply to Dieter from comment #3)
> (In reply to medmedin2014 from comment #2)
> > The bug is reported for Linux :)
> 
> Sure, but as you know a lot of crashes are not limited to Linux. But
> nevertheless I think, my two questions are still valid. I can't test with
> Linux, so I heope that someone else is willing to test.



The same crash happens on Linux (Manjaro KDE) with :

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: 50(Build:3)
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
7.5.0-1
Calc: threaded


Operating System: Manjaro Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.11-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 5 Stéphane Guillou (stragu) 2023-03-22 23:12:11 UTC
I could not reproduce on Linux:

Version: 7.4.6.2 / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Can you please update to 7.4.6 and let us know if you can still reproduce the crash?

Thank you!
Comment 6 medmedin2014 2023-03-24 23:09:59 UTC
Created attachment 186201 [details]
LanguageTool local server config crashes LO

I retested with LO 7.5.0.3 and the crash always happens, see my new attached video how to reproduce it.
Comment 7 medmedin2014 2023-03-24 23:12:03 UTC
See new video with 7.5.0.3
Comment 8 Stéphane Guillou (stragu) 2023-05-15 09:31:50 UTC
I also tested the KF5 VCL, still no crash. I am however using the free version (just the https://api.languagetool.org/v2 URL with no credentials).

Can you please test again with the recently released 7.5 version?

Looks like there are a few issues for KDE + LanguageTool users, please have a look on the LanguageTool repository if something fitting has already been reported there: https://github.com/languagetool-org/languagetool/issues?q=is%3Aissue+is%3Aopen+kde+libreoffice
Comment 9 medmedin2014 2023-05-15 10:36:37 UTC
(In reply to Stéphane Guillou (stragu) from comment #8)
> I also tested the KF5 VCL, still no crash. I am however using the free
> version (just the https://api.languagetool.org/v2 URL with no credentials).
> 
> Can you please test again with the recently released 7.5 version?
> 
> Looks like there are a few issues for KDE + LanguageTool users, please have
> a look on the LanguageTool repository if something fitting has already been
> reported there:
> https://github.com/languagetool-org/languagetool/
> issues?q=is%3Aissue+is%3Aopen+kde+libreoffice


The problem is not with online LanguageTool API, you should install the local LanguageTool server https://dev.languagetool.org/http-server.html
Then after launching it, you start LO Writer and configure it to use that local server via http://localhost:8081/v2 then you will get the crash like I did in the attached video.

NB: The issue is still happening with 7.5.2.2.
Comment 10 Stéphane Guillou (stragu) 2023-05-15 12:00:57 UTC
No crash for me with local server neither, using LT Server version 6.1 downloaded today, URL http://localhost:8081/v2 and LO version:

Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

But at the same time, it doesn't look like it is actually using LanguageTool, as I couldn't get it to detect the "to to" example mistake in LO...
Comment 11 medmedin2014 2023-05-15 12:36:54 UTC
(In reply to Stéphane Guillou (stragu) from comment #10)
> No crash for me with local server neither, using LT Server version 6.1
> downloaded today, URL http://localhost:8081/v2 and LO version:
> 
> Version: 7.5.3.2 (X86_64) / LibreOffice Community
> Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: threaded
> 
> But at the same time, it doesn't look like it is actually using
> LanguageTool, as I couldn't get it to detect the "to to" example mistake in
> LO...


The crash happens only after the first configuration of local LanguageTool server with Writer, it means you should follow:

1) close LO,
2) remove "~/.config/libreoffice" folder, 
3) launch local LanguageTool server, and enter http://localhost:8081/v2/check?language=en-US&text=my+text in Firefox to check the server is running
4) open Writer and go to Options dialog
5) select "Language settings" > "LanguageTool Server" and select "Enable LanguageTool", then set "http://localhost:8081/v2" as Base URL,
6) then go to "Language settings" > "Writing Aids" and you should see an entry called "LanguageTool Remote Grammar Checker" make sure you select it then click on "Apply"

If you enable and disable "Auto Spellcheck" 2 or 3 times in "Review" tab, then enter new paragraphs, you will get LanguageTool working inside LO.
Comment 12 Stéphane Guillou (stragu) 2023-05-15 12:51:04 UTC
These are the steps I used, with a profile reset, no crash.
What vendor+version of JRE do you have in use in Tools > Options > LibreOffice > Advanced?
Comment 13 medmedin2014 2023-05-16 20:12:18 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> These are the steps I used, with a profile reset, no crash.
> What vendor+version of JRE do you have in use in Tools > Options >
> LibreOffice > Advanced?

I tested with 3 different versions of OpenJDK: 20.0.1, 11.0.19 and 1.8.0_372, and I verified that the same JRE version is selected inside LO, but the 3 versions yielded to the same crash. I don't know of any way to catch the crash's required info, even running LO through terminal doesn't reports anything.
Comment 14 Stéphane Guillou (stragu) 2023-05-17 08:39:46 UTC
If you are willing to, you could try to get a backtrace with debug symbols using the method in https://wiki.archlinux.org/title/Debuginfod
But I haven't tested, and there might be issues, e.g.: https://forum.manjaro.org/t/debug-symbols-on-manjaro/61157/10
It looks like your LO version needs to match what is listed here: https://debuginfod.archlinux.org/packages

Would be interested to hear how you go with it.
Comment 15 Mike Kaganski 2023-06-02 18:16:51 UTC
Fixed by https://gerrit.libreoffice.org/c/core/+/152529