How to enable LibreOffice logging?

I have been using LO Writer on my newly installed Kubuntu system, and it keeps crashing after a while. I haven’t been able to pin point what exactly triggers the crash, but it seems that one time it was related to the Undo management, and another time with the autocomplete suggestion.

This thread below suggests to use the --backtrace --sync flags to enable logging.

The --sync flags gives me the “Unknown option: --sync” error, but --backtrace gives a some minimal information. Here’s the output I get from the 2 crashes I recorded :
http://pastie.org/8175582
http://pastie.org/8175589

Is there some way to get more verbose logging in LibreOffice?

My system:

  • LibreOffice 4.0.2.2 (Build ID: 400m0(Build:2))
  • Oracle Java 1.7.0_25-b15
  • Kubuntu 13.04 kernel 3.8.0-26 x86_64

Some thoughts about the crashes: I am using very advanced formatting (e.g. lots of cross-references to custom list counters) so I am thinking the problem may be triggered when deleting a section that is referenced by other sections.

If it is section-related then it may be either https://bugs.freedesktop.org/show_bug.cgi?id=45382 or https://bugs.freedesktop.org/show_bug.cgi?id=51845 as both appear to relate to “section+crash”.

My original answer needs updating for accuracy. Full instructions for turning on logging (a.k.a. debugging) are now available on TDF wiki How to debug page.

I usually don’t bother with the playback aspect of the backtrace option i.e., typing bt afterwards. The output from a backtrace is written to gdb.log which can be viewed as plain text. Sadly the instructions on obtaining a backtrace appear to have been erased from the QA part of TDF Wiki. Michael Meeks recently indicated that he would like to see the instructions for obtaining a leak trace (e.g., valgrind) placed onto the QA part of TDF Wiki. In your case it does not appear to be a memory leak, but then again I am not an expert at debugging. It may not hurt to run either an strace or valgrind to confirm this. Instructions for doing doing so are still available on the Japanese QA Bug Report page (in English).

Hi @Oweng, sorry for responding so late. I realized that email notifications were turned off by default, i fixed this in my profile.

The memory leak would be surprising for me. It just happened again this morning and I have plenty of memory unused by the kernel : http://pastie.org/8196964

As I understand it, valgrind helps find memory leak. But kind of informations can strace provide?

There is information over on the OpenSUSE site: http://en.opensuse.org/openSUSE:Bugreport_LO#How_to_get_strace_log that shows strace and backtrace options for LO. I generally just use the native --backtrace option (rather than running LO through gdb as show there) but it appears the output from strace can be useful in certain circumstances. I would suggest running both to see first-hand what the differences are in your particular instance.