Description: Generally LO works fine, but every now and then when I start it, by clicking on the LO icon in the Dock, my computer crashes (the screen turns black and I have to restart the computer). This first occurred after updating to LO 24.2. No other software is affected. A report was produced (see attachment). Steps to Reproduce: 1. Start LibreOffice Actual Results: The computer crashes. Expected Results: The computer does not crash when LibreOffice starts. Reproducible: Sometimes User Profile Reset: No Additional Info: Version: 24.2.2.2 (X86_64) / LibreOffice Community Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01 CPU threads: 4; OS: macOS 12.7.4; UI render: Skia/Raster; VCL: osx Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
Created attachment 193650 [details] the report generated by macOS I hope the attachment can reveal what's happened. Don't really know what other info to provide other than that this has happened several times now.
Please test in safe mode, Menu/Help/Restart in Safe Mode
The log that you attached has the following line near the top: Panicked task 0xffffff9be3ae16d0: 2 threads: pid 700: fontd So I don't think LibreOffice is causing the crash. I would assume that the "fontd" system process is trying to load a font but hard to tell. Not sure why Apple's fontd code is causing a system crash, but this looks like either a macOS bug or a corrupt font on your system.
Created attachment 193710 [details] the report no. 2 generated by macOS
Created attachment 193711 [details] the report no. 3 generated by macOS
There was another system crash today which occurred as soon as I asked LibreOffice to print to PDF a Writer document. I now remember these crashes not only occur unpredictably when starting LO but also when trying to print something from LO. Two more reports were generated after today's crash. I hope they give some useful information.
(In reply to Sam from comment #6) > There was another system crash today which occurred as soon as I asked > LibreOffice to print to PDF a Writer document. > > I now remember these crashes not only occur unpredictably when starting LO > but also when trying to print something from LO. > > Two more reports were generated after today's crash. I hope they give some > useful information. Still looks like Apple "fontd" background process is crashing macOS. I believe that fontd handles font loading so I wonder if you have a corrupted or unloadable font installed on your Mac. If you validate all of the fonts using the following steps, are there any fonts with warnings or errors?: 1. Launch the /Applications/Font Book application from the Finder 2. Select "All Fonts" in the sidebar on the left 3. Select one of the fonts and then select the Edit > Select All menu item to select all of the fonts 4. Select the File > Validate Selection menu item to start the validation process
(In reply to Patrick Luby (volunteer) from comment #7) > (In reply to Sam from comment #6) > > There was another system crash today which occurred as soon as I asked > > LibreOffice to print to PDF a Writer document. > > > > I now remember these crashes not only occur unpredictably when starting LO > > but also when trying to print something from LO. > > > > Two more reports were generated after today's crash. I hope they give some > > useful information. > > Still looks like Apple "fontd" background process is crashing macOS. I > believe that fontd handles font loading so I wonder if you have a corrupted > or unloadable font installed on your Mac. > > If you validate all of the fonts using the following steps, are there any > fonts with warnings or errors?: > > 1. Launch the /Applications/Font Book application from the Finder > > 2. Select "All Fonts" in the sidebar on the left > > 3. Select one of the fonts and then select the Edit > Select All menu item > to select all of the fonts > > 4. Select the File > Validate Selection menu item to start the validation > process Thanks! I've followed your steps, and Font Validation found 9 fonts with minor problems (warnings). I've now removed/deleted these fonts.
(In reply to Sam from comment #8) > Thanks! I've followed your steps, and Font Validation found 9 fonts with > minor problems (warnings). I've now removed/deleted these fonts. Hopefully that stops the crashing, but if not please post the crash log and I will look for any differences from the previous logs.
I've been working with LO ceaselessly these past few days, frequently quitting and restarting it, never with any problems. But now there was another crash immediately after I restarted LO. I've checked font validation again (via Font Book), and I'm told that still all "font files passed. These files should be safe to use" (that is, none have warnings). I attached the latest crashlog.
Created attachment 193765 [details] the report no. 4 generated by macOS
(In reply to Sam from comment #10) > I've checked font validation again (via Font Book), and I'm told that still > all "font files passed. These files should be safe to use" (that is, none > have warnings). Unfortunately, your latest sytem crash log is still showing "fontd" as the cause of the crash. So it appears that the system crashes aren't due to a particular font and is probably due to some other cause. I took another look at your LibreOffice crash log in attachment #193711 [details] and noticed that LibreOffice was using nearly 4 GB of memory when it crashed. So maybe LibreOffice is slowly grabbing more and more of system memory (i.e. a memory leak) and then, when LibreOffice requests some font data, there is not enough unused memory available for fontd to handle the request. In comment #6 you mentioned that one of the system crashes occurred when you tried to print a document. Printing embeds partial copies of the fonts in your document into the printed output. Also, printing temporarily increases LibreOffice memory usage and that usage may be quite large if your document contains images. Can you launch the /Applications/Utilities/Activity Monitor application and click on the Memory tab? Then, launch LibreOffice and open the document that you were using at the time of the last system crash. In Activity Monitor, find and select LibreOffice. Then, print to Preview in LibreOffice a few times and watch the Memory column for in Activity Monitor. Does LibreOffice's memory usage keep increasing every time you print? If yes, does memory usage drop significantly after you close all documents (but not quit) in LibreOffice?
(In reply to Patrick Luby (volunteer) from comment #12) > > Can you launch the /Applications/Utilities/Activity Monitor application and > click on the Memory tab? Then, launch LibreOffice and open the document that > you were using at the time of the last system crash. In Activity Monitor, > find and select LibreOffice. > > Then, print to Preview in LibreOffice a few times and watch the Memory > column for in Activity Monitor. Does LibreOffice's memory usage keep > increasing every time you print? If yes, does memory usage drop > significantly after you close all documents (but not quit) in LibreOffice? The LO Writer document that I was trying to print just before there was a system crash was only 17 KB. When I open it now, the Activity Monitor reveals that memory usage for LO is about 275 MB. Every time I print to preview, memory usage increases. I've opened a second LO Writer document and printed this to preview several times also. I stopped printing to preview when it reached 573 MB. When I close both LO documents (without quitting LO), memory usage dropped to 442 MB. Not sure whether this drop is significant, though …
Like you, I see a steady climb in memory usage with each print run, but even after 15 minutes of repeatedly printing, I couldn't get LibreOffice's memory usage much higher than 1 GB. So printing in itself isn't likely to be the cause. Maybe the problem isn't due to running out of memory but due to memory corruption. Would it be possible for you to run the Activity Monitor application in the background with LibreOffice in the search field? I assume that macOS will eventually crash, but if you notice a sharp increase in LibreOffice's memory usage just before the crash, I am hoping that will give us some new data to investigate. Also, when the inevitable system crash occurs, would it be possible to run Apple's diagnostic program? IIRC, to run the diagnostic program on Intel Macs, you press and hold the "D" key while booting. After running it, you should see one or more error codes: https://support.apple.com/en-us/102334 On my Silicon Mac, I got only one error: ADP000 which means no errors. Do you see any different error codes?
(In reply to Patrick Luby (volunteer) from comment #14) Thank you! Update: I'm monitoring LO memory usage in the Activity Monitor. It's currently on more than 5 GB although no files are open in LO (I've opened several and printed them to PDF, and worked on others without ever quitting LO). No more system crash yet but I'll report ASA there is one.
Created attachment 193835 [details] Activity Monitor memory usage LO
(In reply to Sam from comment #15) > (In reply to Patrick Luby (volunteer) from comment #14) > > Thank you! Update: I'm monitoring LO memory usage in the Activity Monitor. > It's currently on more than 5 GB although no files are open in LO (I've > opened several and printed them to PDF, and worked on others without ever > quitting LO). > > No more system crash yet but I'll report ASA there is one. Wow! 5 GB with no documents open is a huge amount of memory. I have to think that LibreOffice has a memory leak somewhere. Now the trick is to narrow down what activity in LibreOffice triggers the memory leak. You may want to quit and restart LibreOffice when memory gets that high. That should hopefully prevent a system crash while we try to find where the memory leak is. If you can continue watching Activity Monitor while you are using LibreOffice and if you see memory usage jump a large amount (i.e. 1 GB or more increase), can you try to post what you were doing in LibreOffice immediately before you noticed the large memory usage increase?
Created attachment 194039 [details] Acitivity Monitor with all applications sorted by memory usage
I have a new guess as to what might be causing the system crashes: one or more clipboard history applications are using up most of system memory. After fixing tdf#160855, we now know that one or more clipboard history applications are pasting immediately after copying in Calc and, if you frequently select and copy hundreds of thousands of cells, the data formats that Calc sends to the system clipboard get very large. See my following comment for more background info: https://bugs.documentfoundation.org/show_bug.cgi?id=160855#c26 To test this, would it be possible for you to run the Activity Monitor application in the background but this time with the search field empty? This will display all applications running on your machine. Set the Memory column to sort highest to lowest like shown in attachment #194039 [details]. Then, launch LibreOffice and select 100000+ cells and copy. Repeat this with different cell ranges at least 10 times, get a screen snapshot of the Activity Monitor window, and attach it to this bug? If 10 times causes a system crash, retry but only half the number of times. If one or more clipboard history applications have the highest memory usage, we can check if those applications let you lower the maximum history size.
(In reply to Patrick Luby (volunteer) from comment #19) Thanks! Your explanation is very helpful. I've followed your instructions and monitored the top memory usage of all applications in the Activity Monitor (see attachments). It's become clear now that there are two culprits that cause LO Calc to hang ("Not Responding"): If I quit *both* LaunchBar and Keyboard Maestro, LO 24.2.3.2 has no problems even with A1:H1048576 in my dummy file to copy and paste these cells, which clearly is how it should be. So now I've got to find out how to lower the maximum history size of LaunchBar and Keyboard Maestro so that these applications don't cause the problem with LO Calc.
Created attachment 194063 [details] Activity Monitor memory usage1
Created attachment 194064 [details] Activity Monitor memory usage2
Created attachment 194065 [details] Activity Monitor memory usage3
Created attachment 194066 [details] Activity Monitor memory usage4
(In reply to Sam from comment #20) > (In reply to Patrick Luby (volunteer) from comment #19) > Thanks! Your explanation is very helpful. > > I've followed your instructions and monitored the top memory usage of all > applications in the Activity Monitor (see attachments). > > It's become clear now that there are two culprits that cause LO Calc to hang > ("Not Responding"): If I quit *both* LaunchBar and Keyboard Maestro, LO > 24.2.3.2 has no problems even with A1:H1048576 in my dummy file to copy and > paste these cells, which clearly is how it should be. > > So now I've got to find out how to lower the maximum history size of > LaunchBar and Keyboard Maestro so that these applications don't cause the > problem with LO Calc. So one other option if you can't limit the maximum history is to check if LaunchBar and Keyboard Maestro allow you to exclude certain applications like LibreOffice and LibreOfficeDev. In attachment #194065 [details], LaunchBar is consuming a lot of memory so maybe this option what have the most effect in LaunchBar. Of course, if you copy LibreOffice data from LaunchBar's history list frequently, it may be better to limit LaunchBar's maximum history size and exclude LibreOffice from Keyboard Maestro.
Do you still experience this with the latest versions of all involved apps? Wondering if the fix for bug 159529 helps in any way. Or even bug 155212 (which is not yet included in a release, but you could test a daily build).