Bug 165489 - LibreOffice crashes while the WritingTool extension is running
Summary: LibreOffice crashes while the WritingTool extension is running
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://github.com/writingtool-org/wr...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-27 12:29 UTC by Fred Kruse
Modified: 2026-01-24 16:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Kruse 2025-02-27 12:29:32 UTC
Description:
The problem seems to occur in the interface. The trigger is probably a problem in the extension. But since the main application does not send an exception but crashes itself, the error cannot be found in the extension. For the error message when the application crashes, see below.

Background: WritingTool is an extension written in Java that mainly performs a grammar check. Since it operates not only at the level of sentences and paragraphs, but also on the entire text, various LO interfaces are used.

I have two concerns:

1. An extension should not crash the main program. That is a bug. Instead, an exception should be sent to the extension via the interface. The extension can then react to it accordingly.

2. I need a hint as to which interface is causing the problem to be able to find the problem in the extension's code. Can anyone tell from the error output below which interface it is?

The Error output on console:

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string_view::substr: __pos (which is 310) > __size (which is 292)
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string_view::substr: __pos (which is 30) > __size (which is 20)


Fatal exception: Signal 6
Stack:
#0 /app/libreoffice/program/libuno_sal.so.3(_ZN3sal13backtrace_getEj+0x39) [0x78582ef5dec9]
#1 /app/libreoffice/program/libuno_sal.so.3(+0x45549) [0x78582ef69549]
#2 /app/libreoffice/program/libuno_sal.so.3(+0x4579a) [0x78582ef6979a]
#3 /usr/lib/x86_64-linux-gnu/libc.so.6(+0x41140) [0x78582ec3e140]
#4 /usr/lib/x86_64-linux-gnu/libc.so.6(+0x99db4) [0x78582ec96db4]
#5 /usr/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x1e) [0x78582ec3e08e]
#6 /usr/lib/x86_64-linux-gnu/libc.so.6(abort+0xdf) [0x78582ec25882]
#7 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xadf3d) [0x78582e8adf3d]
#8 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xc365a) [0x78582e8c365a]
#9 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt10unexpectedv+0) [0x78582e8ad99d]
#10 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(__cxa_rethrow+0) [0x78582e8c3910]
#11 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZSt24__throw_out_of_range_fmtPKcz+0x15c) [0x78582e8b148e]
#12 /app/libreoffice/program/liblnglo.so(+0x2993a) [0x78582b55e93a]
#13 /app/libreoffice/program/liblnglo.so(+0x58899) [0x78582b58d899]
#14 /app/libreoffice/program/libuno_sal.so.3(+0x4845b) [0x78582ef6c45b]
#15 /usr/lib/x86_64-linux-gnu/libc.so.6(+0x97e0e) [0x78582ec94e0e]
#16 /usr/lib/x86_64-linux-gnu/libc.so.6(__clone+0x44) [0x78582ed197d4]

Steps to Reproduce:
It happens during major changes to the text (entering, deleting, copying, pasting, etc.)

Actual Results:
crash

Expected Results:
Throw an exception


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
See description
Comment 1 m_a_riosv 2025-02-28 00:54:47 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode

If that doesn't solve the issue please test updating to 25.2.1
Comment 2 Fred Kruse 2025-02-28 09:10:44 UTC
That doesn't solve the problem. A restart in safe mode starts LibreOffice without the extension. If I then install it, LO starts again in normal mode.

But it's a problem with the Java interfaces (see description).
Comment 3 m_a_riosv 2025-02-28 12:24:46 UTC
Language tools are now integrated in LibreOffice.
Menu>Tools>Options>Languages and locales>Language Tools server
Comment 4 Fred Kruse 2025-03-05 11:37:07 UTC
I know the integrated LanguageTool, but WritingTool goes a lot further: testing beyond paragraph boundaries, local testing without network connections, managing rules (additional optional rules, turning off unwanted rules, additional settings, ...), ... (see also writingtool.org).
Furthermore, it doesn't change the basic problem that some interface is causing LibreOffice to crash. I would like to help solve the problem, but I have no idea where to look at the moment.
Comment 5 m_a_riosv 2025-03-05 11:49:22 UTC
Have you tested disabling the integrated Language Tools Server'
Comment 6 Fred Kruse 2025-03-08 09:53:05 UTC
Yes, it has to be disabled, otherwise WritingTool doesn't run. The same for Lightproof grammar checker.
Comment 7 QA Administrators 2025-11-25 15:24:51 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2025-11-25 15:38:12 UTC Comment hidden (obsolete)