Description: When used with Language Tool Server enabled and Language Tool Remote Grammar checker Language module selected Libreoffice crashes often (every 5-10 minutes). Steps to Reproduce: 1.Enable Languagetool: A.Go to Preferences B.In Languages and Locals i. go to Language Tool Server ii. Enable it leaving things as they are (free version) iii. Save iv. Reopen Preferences and in Languages and Locals go to Writing Aids making sure Language Tool Remote Grammar checker Language module is selected v. Save C. Open a document (better if with many pages and comments) D. Wait until words and sentences are underlined (it means that Languagetool is working) Actual Results: E. LO should crash in a few minutes or when closing the document. Expected Results: E. LO should not crash while working or when closing the document. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 24.2.4.2 (AARCH64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx Locale: en-US (en.UTF-8); UI: en-US Calc: threaded
Thank you for reporting the bug. I can not reproduce the bug in: Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: ab5d79c90fc33b0a32604e3cbbbc686d01d85d39 CPU threads: 10; OS: macOS 13.6.6; UI render: default; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded I followed the outlined steps and ensured that LanguageTool Remote Grammar checker Language module was selected. I created a document with text and comments. Please provide a sample file attachment which can be used to reproduce the bug.
Hi, sorry I could not reproduce with files other than the one I am working on which I cannot share for privacy reasons. I created two big files (under 1MG, but they are still smaller than the 2,3 mb I am working on) but the bug does not happen. Then I deduce that it must be the file I am working on that is buggy.
[Automated Action] NeedInfo-To-Unconfirmed
Created attachment 195246 [details] LibreOffice 24.2.4.2 LibreOffice 24.2.4.2 with LanguageTool-6.4 crashes immediately on open and selecting a new Writer file to edit. This is the environment. Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: en-CA (en_CA); UI: en-GB Calc: CL threaded
Hi, I could reproduce. I mean LO crashed with the two attached documents afer a while. The fact that it does not crash immediately does not make me sure 100% that this is the cause, one should also double check disabling Languagetool with the same documents. Of course these are dummy texts, the document I am usually working with and I cannot share is 2,4Megabytes.
Tested with following version: Version: 24.2.5.2 (X86_64) / LibreOffice Community Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59 CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx Locale: en-US (en.UTF-8); UI: en-US Calc: threaded
Created attachment 195297 [details] bigger file
Created attachment 195298 [details] smaller file
(In reply to Daniele from comment #6) > Tested with following version: > Version: 24.2.5.2 (X86_64) / LibreOffice Community > Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59 > CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx > Locale: en-US (en.UTF-8); UI: en-US > Calc: threaded Unfortunately, I cannot reproduce this on my Silicon Mac. I tried with LibreOffice 24.2.5.2 as well as with my local build (both with and without the fix for tdf#161729) as no crash. So, I think the next step is to get a crash log from your machine. When LibreOffice crashes, you should see one of the two windows appear: - A macos "Problem Report for LibreOffice" window or - a "LibreOffice Document Recovery" window The steps for obtaining a crash log are different for each of the above. So if you can tell us which window you see when LibreOffice crashes, I can post the steps for obtaining a crash log.
Created attachment 195407 [details] LibreOffice Document Recovery screenshot
Hi Patrick, as from attached file, it is a "LibreOffice Document Recovery".
Created attachment 195409 [details] Snapshot of Activity Monitor and its dialog for LibreOffice
(In reply to Daniele from comment #11) > Hi Patrick, > as from attached file, it is a "LibreOffice Document Recovery". OK. So the next that the "LibreOffice Document Recovery" dialog appears, do the following steps: 1. Do *not* press the "OK" button or any of the dialog's buttons in the titlebar before do the next steps. By leaving the dialog open, we can get a snapshot of where in the LibreOffice code the crash occurred in. 2. Go to the Finder, navigate to the /Applications/Utilities folder, and launch the Activity Monitor application. 3. In the Activity Monitor application window, put "LibreOffice" in the search field in the top right corner of the window like shown in attachment #195409 [details]. Then double click on the LibreOffice entry to display a "LibreOffice" dialog. 4. In the "LibreOffice" dialog, click on the "Sample" button. After a few seconds, a "Sample of LibreOffice" window will appear. Click the "Save" button in the top right corner of the window and attach the saved file to this bug.
Created attachment 195417 [details] Sample LO
Hi Patrick, thanks, very clear instructions; please find attached the sample. I hope it helps find the origin of the crash.
I am attaching the additional steps which are now shown by LO when crashing. It often says that the file is corrupt.
Created attachment 195418 [details] File is corrupt
Created attachment 195419 [details] File corrupt cannot be opened
Created attachment 195420 [details] Original document recovered If I follow the steps to recover all documents: 1. One of the documents is described as corrupt (this should not happen in the first place) 2. In a window I am told that it cannot be repaired and not be opened 3. In another window I am told that it was indeed recovered: it says Original document recovered with an orange "V" instead of a green one and simply "Successfully recovered". What is the meaning of the different colours and explanations? Why does it warn you that it cannot be repaired in one window and that it is recovered in the next?
(In reply to Daniele from comment #16) > I am attaching the additional steps which are now shown by LO when crashing. > It often says that the file is corrupt. Yes. The cause of the crash is very obvious from your sample file. It appears that LibreOffice's code that reads data from the Language Tool server has an error and that error causes the crash. I will need to read the LibreOffice code where the crash is occurring and see what can be change to prevent errors like this from turning into a crash. I will post again when I have some news to report.
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d81ffa179df1d1279e98ff4aa5c58e1ea4720db1 tdf#161858 prevent crashing by catching any JSON exceptions It will be available in 25.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.
I have committed a fix this bug. The fix should be in tomorrow's (23 July 2024) nightly master builds: https://dev-builds.libreoffice.org/daily/master/current.html Note for macOS testers: the nightly master build installer does not overwrite any LibreOffice official versions. Instead, it will be installed as a separate application called "LibreOfficeDev" in the /Applications folder. Because this is a "test" build, you will need to do the following steps before you launch the LibreOfficeDev application: 1. Go to the Finder and navigate to the /Applications/Utilities folder 2. Launch the "Terminal" application 3. Paste the following command in the Terminal application window and press the Return key to execute the command: xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/d9dc8731f5e06c65fb3228cddeb39bf90a2a6b10 tdf#161858 prevent crashing by catching any JSON exceptions It will be available in 24.8.0.2. 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.
Hi Patrick, I followed the instructions to install the dev version up to xattr command, but I get this: xc@Mac-mini ~ % xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app xc@Mac-mini ~ % xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app xattr: /Applications/LibreOfficeDev.app: No such xattr: com.apple.quarantine xc@Mac-mini ~ % Any ideas why? I can se the dev version all right. Anyway, I tried opening the dev version anyway and tested with the big file and the small file. 1. I can close them and LO does not crash 2. I tried leaving LO open with them and Languagetool activated (and working). After a while I get this error message: Could not establish Internet connection to https://api.languagetool.org/v2/check. Client error message: (22) HTTP response code said error at /Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/ucb/InteractiveNetworkConnectException.hdl:25 And I clicked ok. LibreofficeDev has been open for more than 2h with Languagetool activated and no crash. The fix works! Question, are there any reasons I should not use this Libreofficedev waiting for the stable version to be released? Will it corrupt my files for example?
(In reply to Daniele from comment #24) > Any ideas why? I can se the dev version all right. You only need to run the command once to permanently remove that file attribute. As long as you can launch LibreOfficeDev, then there is nothing to worry about. If you had not removed that file attribute, macOS wouldn't let you launch LibreOfficeDev. > After a while I get this error message: > > Could not establish Internet connection to > https://api.languagetool.org/v2/check. > Client error message: > (22) HTTP response code said error at > /Users/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/ > UnoApiHeadersTarget/offapi/normal/com/sun/star/ucb/ > InteractiveNetworkConnectException.hdl:25 > Sounds like LanguageTool's server might have been temporarily unavailable. But it is good to see that LibreOffice can handle the case where a third-party server is down. > Question, are there any reasons I should not use this Libreofficedev waiting > for the stable version to be released? Will it corrupt my files for example? The big difference is that LibreOfficeDev contains the very latest code changes from all the LibreOffice developers so the nightly builds have been tested much less than a stable release (most testing is done by volunteer users like you and I). I would recommend saving frequently when using LibreOfficeDev. LibreOffice is a huge application so even simple code changes can sometimes cause unintended new bugs that no one else has encountered yet.
Thank you Patrick, I'll stay on the safe side then. It is a big book on which we've been working for months.
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/d4d01d2dbb2babf8de86446e7f1d154d49c3672c tdf#161858 prevent crashing by catching any JSON exceptions It will be available in 24.2.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.