Bug 122116 - LibreOffice 6.1.* crashes by recovering file at start over and over on Linux
Summary: LibreOffice 6.1.* crashes by recovering file at start over and over on Linux
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.3.0 target:6.2.0.2
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-15 00:55 UTC by Andras
Modified: 2019-05-09 13:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Crash report for - libreoffice-6-2_2018-12-15_02.21.54_LibreOfficeDev_6.2.0.0.beta1_Linux_x86-64_deb (11.71 KB, text/plain)
2018-12-15 14:48 UTC, Andras
Details
Try to get backtrace for LibreOffice with recovery loop issue (18.51 KB, text/x-log)
2018-12-19 19:27 UTC, Andras
Details
LibreOffice backtraces for libreoffice-6.1 (24.15 KB, text/plain)
2018-12-20 03:26 UTC, Andras
Details
backtrace_for_20181221th_libreoffice-6.3_on_problematic_KDE_neon (41.12 KB, text/x-log)
2018-12-22 03:29 UTC, Andras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras 2018-12-15 00:55:58 UTC
Description:
System:
KDE neon 5.14
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
QT Version: 5.11.2
Kernel Version: 4.15.0-42-generic
OS Type: 64-bit

//////////////////////////////////////////
LibreOffice version in issue:
Version: 6.1.3.2
Build ID: 1:6.1.3~rc2-0ubuntu0.18.04.2
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: CL

//////////////////////////////////////////
Used source:
deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main

/////////////////////////////////////////
Current java versions appearing in libreoffice:
10.0.2 - location: /usr/lib/jvm/java-11-openjdk-amd64
1.8.0_191 - location: /usr/lib/jvm/java-8-openjdk-amd64/jre


/////////////////////////////////////////
My notes
(First of all, there is an issue between AppArmor and LibreOffice on this system, a LOT. First I tried allowing everything step by step without success because a myriad profile appeared as denied awesomeness over and over so I just disabled all the basic usr.lib.libreoffice.program.* profile for LibreOffice in AppArmor at the end.)

--------
Obviously, first I tried to use the basic one implemented by given system above what is the very same version seemingly, at least as I noticed. important that this one what comes with the system by default behaves in the very same way.

--------
I hate to use PPAs, especially in neon what got a lot edgy sources in default already. KDE5 VCL is the very only reason I tried to install LibreOffice 6.2 because I thought it'll solve KDE issues such as the above crash, Global Application Menu, QT issues (right click menu appears on other monitor etc), etc.
https://bugs.documentfoundation.org/show_bug.cgi?id=113397

--------
Why I use the PPA?
Prereleases Appimage won't work on this specific system and PC somehow, it closes right after the start, I tried several solution without success and there is not much or serious help for this particular Appimage.
Flatpak stuck with 6.1 and as they said it'll stick with it for a wile and anyways KDE5 VCL will not be implemented even with Flatpak LO 6.2 version (what I don't really understand): https://github.com/flathub/org.libreoffice.LibreOffice/issues/63 .
I '!don't like!' snap and it's also got 6.1 version.
Despite the above PPA also contains only the 6.1 what I realized only later, somehow as it appears it works with Global Menu when I successfully got it open with the crash dialogue below and also it contains a promising package named libreoffice-kde5.


/////////////////////////////////////////
The most important part, the issue itself with PPA above

On a clean start (~/.conf/libreoffice removed relogin) dialogue under LibreOffice Writer for example:
---
"Due to an unexpected error, LibreOffice crashed. All the files you were working on will now be saved. The next time LibreOffice is launched, your files will be recovered automatically.
The following files will be recovered:"
---
(There is no file shown what will be recovered.)
I found several sources what says it can be solved depending how you close it, with 'x' on main window or with 'ok' or 'x' or 'esc' on dialogue, well it doesn't matter. https://askubuntu.com/questions/244661/libreoffice-always-shows-recovery-process-at-startup-due-to-failing-recovery-ite



---------------------------
After this I try to reopen LibreOffice and TWO dialogues appears right away. The first in background the typical recovery dialogue:
---
"LibreOffice will attempt to recover the stat of the files you were working on before it crashed. Click 'Start' to begin the process, or click 'Discard' to cancel the recovery."
---

The most interesting is that I don't even have time to click anything on the dialogue above, the below dialogue appears at the same time with it:
---
"Due to an unexpected error, LibreOffice crashed. All the files you were working on will now be saved. The next time LibreOffice is launched, your files will be recovered automatically.
The following files will be recovered:
Untitled 1"
---
It's the very same dialogue when LibreOffice crashes so it's just crashing right after it attempts to recovering given file and now an Untitled 1 file appears on the dialogue. Basically above quote simple a paradox, it's simple crashing by recovering the file and it says it will recover the file at the very same time.
After this it's happening over and over when I try to open LibreOffice.


/////////////////////////////////////////
I tried a LOT possible solutions, removing and modifying java, hardware info, OpenCL and Recovery related stuff in these files for example:
~/.config/libreoffice/4/.lock
~/.config/libreoffice/4/user/registrymodifications.xcu
~/.config/libreoffice/4/user/config/javasettings_Linux_X86_64.xml
~/.config/libreoffice/4/cache/opencl_profile.xml
I also tried to mofify or turn off java, OpenCL in Gui, also I turned off KDE compositing for libreoffice.


/////////////////////////////////////////
I don't think so but could be relevant stuff in registrymodifications.xcu file:
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SelectedOpenCLDeviceIdentifier" oor:op="fuse"><value>NVIDIA Corporation 390.77--6.1.3.2--1540842929</value></prop></item>
---
<item oor:path="/org.openoffice.Office.Recovery/RecoveryInfo"><prop oor:name="SessionData" oor:op="fuse"><value>false</value></prop></item>
<item oor:path="/org.openoffice.Office.Recovery/RecoveryList"><node oor:name="recovery_item_1" oor:op="replace"><prop oor:name="Title" oor:op="fuse"><value>Untitled 1</value></prop><prop oor:name="Filter" oor:op="fuse"><value>writer8</value></prop><prop oor:name="Module" oor:op="fuse"><value>com.sun.star.text.TextDocument</value></prop><prop oor:name="TempURL" oor:op="fuse"><value></value></prop><prop oor:name="ViewNames" oor:op="fuse"><value></value></prop><prop oor:name="OriginalURL" oor:op="fuse"><value></value></prop><prop oor:name="TemplateURL" oor:op="fuse"><value></value></prop><prop oor:name="DocumentState" oor:op="fuse"><value>0</value></prop></node></item>

Thanks for possible considering!


Steps to Reproduce:
1. Open LibreOffice. It crashes.
2. Try open again, It'll crash again.

Actual Results:
It's trying to recovery the file and it's crashing at the same time.

Expected Results:
Opening LibreOffice without crash.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Comment 1 Xavier Van Wijmeersch 2018-12-15 08:08:08 UTC
Download LibreOffice from here and retest
Also try to disable opengl 

https://dev-builds.libreoffice.org/daily/libreoffice-6-2/Linux-rpm_deb-x86_64@86-TDF/current/

try to reset your user profile

Best regards
Comment 2 Andras 2018-12-15 14:48:23 UTC
Created attachment 147574 [details]
Crash report for - libreoffice-6-2_2018-12-15_02.21.54_LibreOfficeDev_6.2.0.0.beta1_Linux_x86-64_deb
Comment 3 Andras 2018-12-15 14:49:34 UTC
(In reply to Xavier Van Wijmeersch from comment #1)
Thanks for the quick response. I think something fundamentally wrong between my system and LibreOffice 6.1.*, 6.2.*. The latest 'libreoffice-6-2_2018-12-15_02.21.54_LibreOfficeDev_6.2.0.0.beta1_Linux_x86-64_deb.tar.gz' gives the same result what the prerelease Appimage gave.
Despite I think this is just redundantly extend the already long thread, I attached the crash result for the above latest devLO.
Comment 4 Telesto 2018-12-15 17:31:19 UTC
Curious: did you try --safe-mode (as command line switch)
Comment 5 Andras 2018-12-15 18:15:29 UTC
(In reply to Telesto from comment #
Yes as I mentioned above. Here is the result from console with disabled OpenGL for example:
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2064, resource id: 35675335, major code: 40 (TranslateCoords), minor code: 0
QSocketNotifier: Invalid socket 10 and type 'Read', disabling...
QSocketNotifier: Invalid socket 5 and type 'Read', disabling...
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = soffice.bin path = /opt/libreofficedev6.2/program pid = 13036
KCrash: Arguments: /opt/libreofficedev6.2/program/soffice.bin --nocrashhandler 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
Comment 6 Julien Nabet 2018-12-16 11:56:45 UTC
According to the bt, crash seems related to kde5.
On a console, could you try:
export SAL_USE_VCLPLUGIN=gen
then launch soffice from console.
The goal is to workaround crashes if you need LO for your work.

Then, if you time and want to contribute to tackle this one, it could be interesting you build LO.
See https://wiki.documentfoundation.org/Development/BuildingOnLinux
Since we need to debug this, it'll be relevant to use enable-dbgutil option.

I know very few about gtk3, kde5, plasma.
Here are 2 options to build:
--enable-kde5
"Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and KF5 are available"

--enable-gtk3-kde5
"Determines whether to use Gtk3 vclplug with KDE file dialogs on platforms where Gtk3, Qt5 and Plasma is available"

Since you use Plasma, it seems you should opt for --enable-gtk3-kde5
Perhaps, a safe choice could be to use both (I don't know if it's possible).

Once your built is done (depending on your config, it may takes several hours) you can retrieve even more useful backtraces even test some patches which some people may propose.

Michael: knowing your work about kde5 and qt part, thought you might be interested in this one.
If you don't want to be put on cc, don't hesitate to tell and I'll stop to do it.
Comment 7 Michael Weghorn 2018-12-16 16:25:30 UTC
As Julien already mentioned in comment 6, the backtrace shows that the qt5 vcl plugin is involved, so it'd be interesting to know what happens for the 'gen' plugin instead (or 'gtk', 'gtk3', though the initial report mentions 'gtk3', so this seems to fail in some way as well).

When building LibreOffice yourself, you can use both '--enable-gtk3-kde5' and '--enable-kde5'. When running Plasma, the 'kde5' vcl plugin will then be used by default, but you can choose to use 'gtk3_kde5' instead by setting the environment variable 'SAL_USE_VCLPLUGIN=gtk3_kde5' (just like Julien wrote in comment 6 for the 'gen' plugin).

Since you write that apparmor might be involved: Can you try to (temporarily) uninstall the apparmor package, reboot your computer and try whether the issue still occurs then?

Julien: Thanks for adding me in CC. Feel free to continue doing so, though I can't promise I'll be able to help with every single qt5/kde5 bug.
Comment 8 Andras 2018-12-16 19:05:59 UTC
(comment #6 and comment #7)

I just noticed a very important fact that one of my PC got the very same KDE neon installation and LO prereleases PPA works there so I'm confused now. I desperately searched for differences between the two installation and tried to reconcile packages and settings without success so far.

Yes, with 'export SAL_USE_VCLPLUGIN=gen' or without libreoffice-gnome, -gtk3, -kde5 LO works (VCL x11).

("though the initial report mentions 'gtk3'" in comment #7)
Yes, I installed a lot version of LibreOffice from a lot different sources and also I tried to keep and install significantly related packages separately such as libreoffice-gtk3 and -kde5, etc. My point is, probably thanks to this varied events I missed the VCL particularly in this bug. I also thought and I agree with that gtk-kde5 inclued in libreoffice-kde5 packages sould be used in KDE environment and the thing is that it wasn't installed at the time of this report, sorry for this mismatch. Don't get me wrong and you're right, the very similar if not the same situation occurs with VCL gtk3_kde5 too.

("Apparmor")
I don't know if uninstalling Apparmor would solve this however since it wipes a lot packages from the system, I won't mess with it. Also as I wrote same LO on same system works with Apparmor installed (LO profiles disabled). Although I don't know if it's the same as removing it, I disabled Aparmor service and reboot, LO is still crashing unfortunately.

("build")
To be honest in short, I never built something from git clone and currently I think it'd be more complicated unnecessarily and it'd take longer than find out what's wrong on my problematic neon installation. I'd try while this issue is still unsolved though.
Comment 9 Michael Weghorn 2018-12-16 20:15:04 UTC
(In reply to Andras from comment #8)
> ("though the initial report mentions 'gtk3'" in comment #7)
> [...]
> and you're right, the very similar if not the same situation occurs
> with VCL gtk3_kde5 too.

Thanks for the clarification. I think it's important though to clarify what to handle in this bug report. While it may basically look like a similar same issue from a user perspective, the underlying issue might be another one. In particular, I think it's important to focus on one specific problem, i.e. LibreOffice version and VCL plugin for now (and handle potential other problems in separate bug reports, should they still exist after that one has been dealt with).

I think it's important to distinguish between these VCL plugins:

* gtk3: native gtk/GNOME integration
* gtk3_kde5: basically the same as gtk3, but with native KDE file dialogs
* qt5: native Qt 5 implementation
* kde5: uses "qt5", with some extensions for better KDE integration, e.g. file dialogs

The latter two are only available from LibreOffice 6.2 on (and in my personal opinion not really ready for "production" use yet).

What's a bit misleading is that the Ubuntu PPA package called "libreoffice-kde5" in version 1:6.1.3~rc2-0ubuntu0.18.04.2 actually includes the "gtk3_kde5" VCL plugin (not the "kde5" one, which does not exist for LibreOffice 6.1).

> ("Apparmor")

I totally agree that AppArmor doesn't seem to be problematic in your case then (disabling should be enough). I just remembered having had all kinds of issues with AppArmor in the past, so thought it would be good to be able to make sure it's not involved here.


> ("build")

I think there's no desperate need for you to build from source yourself right now.


What do you think would be the best way to continue now? Do you think it makes sense if you first try to identify the difference between your two computers and possibly make it work this way?

For the qt5/kde5 crash, I'd suggest to open a separate bug report, once this is what you want to use (and possibly it's reproducible on another computer as well, to make sure it's not the result of some "remainders" of previous testing, etc.).
Comment 10 Andras 2018-12-16 23:39:32 UTC
Thanks for the help so far and I understand if you close this report since given LO works on same OS on other PC. Obviously some further assistance would be great but also it's understandable every case needs to be narrowed down by reported results. Strictly considering given information only, it's not LO but conflicted even corrupted OS issue. I'd like to note that I think it'd be great if LO would be able to handle situation when leftover files or orphan packages appears in its libraries if that's the case here. Let me ask why these cases with recovery loop and other very similar end results are occurring over and over again, I found reports even from 2012. I don't want to connect the two cases, it's only example from the latest I found:
https://askubuntu.com/questions/1093419/libreoffice-crash-recovery-loop-no-documents-to-recover
Please don't take it as insinuation, I see it as something larger or more hidden part(s) of LibreOffice still problematic at least in Debian based distros for years while individual cases solved regarding only that given particular circumstances, OS, LO. Obviously give no credit for my now-nothing point of view, I'm just speculating. I'll try to solve this on the next few days and I don't expect you keep this open and anyways it's just the latest partial glitch under the actual problem if above hunch would be correct. Thanks again and I hope there is specifically something with QT, KDE or whatever environment only and there is no mishandling or other issue by LO itself.
Comment 11 Michael Weghorn 2018-12-17 20:42:10 UTC
Thanks for your understanding.

I understand your point and it is possible that it's LibreOffice's fault, even if it only occurs one one computer. The problem is that the underlying issue could be pretty much anything and that it's quite hard and time-consuming to analyze problems you can't reproduce yourself, and it *might* turn out it's not LibreOffice's fault and nothing that LibreOffice can do much about. - I just can't say right now.

Since you say it's OK for you, I'd actually like to close this bug as WORKSFORME, and I'm doing so now.

However, I'm still interested in giving you help if needed. So if you need help to get LibreOffice working on this one computer, please just leave a quick comment here. What will be helpful then is to have a backtrace with the actual setup you're having there, i.e. of the package from the Ubuntu PPA. There's also a repository with the corresponding packages holding the debug symbols at http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu/dists/bionic/main/debug/ . Adding this and installing the corresponding debug packages will help to get a more meaningful backtrace.
Comment 12 Andras 2018-12-18 23:29:47 UTC
(In reply to Michael Weghorn from comment #11)
I have to note again it works without kde or gtk however it's not the preferred vcl obviously for the user, various errors and instability related to kde environment, etc.
I'd have been happy to provide backtrace at the first glance already however it's an infinite loop and that's why I started with direct results. Anyways I don't know what the heck it means but when I try to get backtrace it says it's not in executable format, unbelievable.
---
gdb libreoffice 2>&1 | tee ~/gdb-libreoffice.txt
...
"/usr/bin/libreoffice": not in executable format: File format not recognized
---
Whenever you have a chance let me know what did I do wrong, how should I get backtrace or what should I do. I absolutely understand if you say it's a dead end or you have no more time. Thanks
Comment 13 Michael Weghorn 2018-12-19 17:20:05 UTC
(In reply to Andras from comment #12)
> I'd have been happy to provide backtrace at the first glance already however
> it's an infinite loop and that's why I started with direct results. Anyways
> I don't know what the heck it means but when I try to get backtrace it says
> it's not in executable format, unbelievable.
> ---
> gdb libreoffice 2>&1 | tee ~/gdb-libreoffice.txt
> ...
> "/usr/bin/libreoffice": not in executable format: File format not recognized

'/usr/bin/libreoffice' is a shell wrapper, while 'gdb' only works with compiled binaries. 

Can you try 'gdb /usr/lib/libreoffice/program/soffice.bin' (or check whether exact location differs on your system).
Comment 15 Andras 2018-12-19 19:27:21 UTC
Created attachment 147679 [details]
Try to get backtrace for LibreOffice with recovery loop issue
Comment 16 Andras 2018-12-19 19:29:45 UTC
Thanks for the hints. I don't know what am I doing wrong but it keeps saying:
"Reading symbols from /usr/lib/libreoffice/program/soffice.bin...(no debugging symbols found)...done."

This is the source I use currently, exactly how is appears in my sources list:
deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main
It should contain the debug library too, isn't it?

Anyways, I attached one of the result above for libreoffice --backtrace
Comment 17 Michael Weghorn 2018-12-19 21:29:44 UTC
A backtrace with symbols installed would actually be good.

(In reply to Andras from comment #16)
> This is the source I use currently, exactly how is appears in my sources
> list:
> deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu
> bionic main
> It should contain the debug library too, isn't it?

As far as I can see, you probably have to add

deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main/debug

in addition and install the debug packages from there, called like the "normal" packages with a "-dbgsym" suffix added (e.g. 'libreoffice-writer-dbgsym', 'libreoffice-core-dbgsym', etc.).
Comment 18 Andras 2018-12-19 22:37:41 UTC
(In reply to Michael Weghorn from comment #17)
I don't want to increase the length of this thread and maybe I don't know or see something but as I said not the system should get debugging packages already from .../ubuntu/bionic web address with line:
"deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main"
In short, only "bionic main" ending works, there is no option for "bionic debug" or "bionic main/debug" etc, correct me if I'm wrong about this. Is it possible debugging packages are available if you build it (what isn't so simple for me) or from other direct sources?
Comment 19 Michael Weghorn 2018-12-20 01:47:51 UTC
(In reply to Andras from comment #18)
> (In reply to Michael Weghorn from comment #17)
> I don't want to increase the length of this thread and maybe I don't know or
> see something but as I said not the system should get debugging packages
> already from .../ubuntu/bionic web address with line:
> "deb http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu
> bionic main"

As far as I can see, the debug packages are not available in this repo, but they are in the separate one I wrote about. I quicky tested adding these two entries into my /etc/apt/sources.list on debian:

deb [trusted=yes] http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main
deb [trusted=yes] http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic main/debug

After running the command 'apt update', I can then run

$ apt policy libreoffice-writer-dbgsym
libreoffice-writer-dbgsym:
  Installed: (none)
  Candidate: 1:6.1.3~rc2-0ubuntu0.18.04.2
  Version table:
     1:6.1.3~rc2-0ubuntu0.18.04.2 500
        500 http://ppa.launchpad.net/libreoffice/libreoffice-prereleases/ubuntu bionic/main/debug amd64 Packages

with the given output, which suggests that the debug packages should be in the repository I mentioned ('... main/debug').

I did not try to actually install packages (since packages are targeted at the specific Ubuntu version 18.04 and probably won't work on Debian testing anyway). It can be that there's some other issue I don't see right now, though, that may cause this not to work for you.

> In short, only "bionic main" ending works, there is no option for "bionic
> debug" or "bionic main/debug" etc, correct me if I'm wrong about this. Is it
> possible debugging packages are available if you build it (what isn't so
> simple for me) or from other direct sources?

Yes, you'll get debug symbols if you build the source yourself with the corresponding options. Please refer to comment 6 for details.


Another (probable the easiest and quickest) way to get a build with debug symbols, is to download a build that contains debug symbols from the LibreOffice daily builds, e.g. those for master available at https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@86-TDF-dbg/

The following 3 commands will download and start LibreOffice to get a backtrace (this uses the 'gtk3' VCL plugin, which should give the same result as 'gtk3_kde5', since file dialogs are not involved):

> wget https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@86-TDF-dbg/2018-12-19_02.03.20/master_dbg~2018-12-19_02.03.20_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive.tar.gz
> tar xvf master_dbg~2018-12-19_02.03.20_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive.tar.gz
> SAL_USE_VCLPLUGIN=gtk3 LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive/program/soffice --backtrace 

The last two scenarios also have the advantage that the builds are not from some "third party", thus eliminating the possibility that any of the packaging done by the PPA maintainer might have caused any problems...
Comment 20 Andras 2018-12-20 03:26:16 UTC
Created attachment 147687 [details]
LibreOffice backtraces for libreoffice-6.1

Currently I can provide debugging through originally implemented ddebs.ubuntu packages on my system. I decided to get back to the originally implemented LibreOffice 6.0.7.3 because even this one crashes too on my system and I wasn't able to get dbgsym packages for newer one yet, I will try the solution above if it's still necessary though. Sorry if this one is still not enough or it was simple a bed idea. Thanks for the suggestion how to get 6.3 dgbsym precisely, I'll try as soon as possible.
Comment 21 Michael Weghorn 2018-12-21 16:24:01 UTC
Thanks for the backtrace. This one actually contains more useful information. That one is for the "kde4" VCL plugin, so it seems "bad things" happen for pretty much any LibreOffice version and VCL plugin. I'm looking forward to comparing that to the backtrace for 6.3.

Do you remember having installed any additional software in addition to that from the Ubuntu repository (and the LibreOffice packages from the PPA)? That might be one aspect that might interfere here.
Comment 22 Andras 2018-12-22 03:29:18 UTC
Created attachment 147773 [details]
backtrace_for_20181221th_libreoffice-6.3_on_problematic_KDE_neon
Comment 23 Andras 2018-12-22 04:07:03 UTC
(In reply to Michael Weghorn from comment #21)
Backtrace for LibreOffice 6.3 is attached above. I don't understand how these packages running without implementing them into the system. Are these still using parts from the system? I assume yes since the issue still appears and given version still won't run and it still has issues.
I also don't really understand the question about additional software. Ubuntu gives no option for dbgsym packages by default, it has to be implemented separately:
https://wiki.ubuntu.com/Debug%20Symbol%20Packages
That's all I added to my system. It's about debugging packages only nothing else.
Also I think the LibreOffice PPA nothing else then then LibreOffice, I mean I didn't installed anything else on problematic system from that PPA what isn't installed on other system where LibreOffice works.
Please let me know if there is any specific package or software I should looking for. In short, I don't remember any additional software.
Comment 24 Michael Weghorn 2018-12-22 08:34:04 UTC
Thanks for the backtrace and sorry if my questions were a bit unclear or confusing. Yes, LibreOffice still uses a multitude of libraries from the system, which is why I asked. Installing library and programs from arbitrary sources may therefore mess up your system and might have caused LibreOffice to fail starting. Good to know this does not seem to be the case here. :-)

With that new backtrace, I have an idea what seems to cause the issue. Can you please try setting the environment variable 'SAL_DISABLE_CPD' to some value and try to start LibreOffice again from command line, i.e. run

    SAL_DISABLE_CPD=true .../PATH/TO/YOUR/soffice

and see whether it works then?
Comment 25 Andras 2018-12-22 15:45:03 UTC
(In reply to Michael Weghorn from comment #24)
Awesome, 6.3 works with SAL_DISABLE_CPD=true on the problematic KDE neon installation. Should I attach backtrace for it too? Is it something bigger issue with this system specifically and I should reinstall the OS or there is something specific I can fix this mismatch on my system?
Comment 26 Michael Weghorn 2018-12-22 17:17:10 UTC
(In reply to Andras from comment #25)

Good to hear. Actually, looking again at the backtrace from comment 20, that looks like the same problem, so I suppose the same should be working with LibreOffice 6.1 as well. There's no need to attach any additional backtraces right now.

The problem is caused by the Common Print Dialog (CPD) and its integration into LibreOffice. There was an initial implementation as part of a GSOC (Google Summer of Code) project, but it's probably not yet "ready for production". (I don't know about CPD in general, s. e.g. https://github.com/OpenPrinting/cpdb-libs if you're interested in more details.)

Unless you installed CPD intentionally and need it for some reason (e.g. integration of Google Cloud Printing,...), the easiest way to get rid of the problem quickly is probably to just uninstall the CPD-related packages. You'll probably see those when you run

    dpkg -l 'libcpd*' 'cpdb*'

(But please check carefully to not install another unrelated package that you still need.)

(I'll possibly have a quick look at the underlying issue once I find time to do so and to set up an Ubuntu VM for testing. There's probably something that should be changed in LibreOffice to avoid that crash in the future...)
Comment 27 Andras 2018-12-22 19:46:16 UTC
I knew it has to be a package what cause this issue and that's why I desperately searched what kind of packages differs on other system where LibreOffice works and I looked for related packages only. I'd never have found out this particular package was the cause. Probably I installed it with no real reason when I was about to set up cups on that system.
Well, I already learned long ago there are packages with several incompatibility issues and don't install what isn't necessary to install. Unfortunately it could be vice versa sometimes.
What I learned now I should give backtrace or other result first what really worth something instead of long explanations.
Thank you so much guys for your work, time and patient, I really appreciate it! Without your help, probably I'd reinstall given system right now with all the headache it comes with. I uninstalled cpdb related packages (cpdb-backend-cups, libcpdb-libs-common0) and LibreOffice works flawlessly.
Comment 28 Michael Weghorn 2018-12-23 00:10:42 UTC
(In reply to Andras from comment #27)
Your welcome, thanks for your reply!

https://gerrit.libreoffice.org/#/c/65576/ is meant to prevent that others experience the same issue in the future.
Comment 29 Commit Notification 2018-12-23 01:07:24 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/87d90b6e60659e9c976daa9692ae99ec87a6978c%5E%21

tdf#122116 Only create CPDManager if D-Bus descriptions present

It will be available in 6.3.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.
Comment 30 Xisco Faulí 2018-12-26 12:56:18 UTC
Hi Michael Weghorn,
Thanks for fixing this issue. Should it be backported to 6-2 and 6-1 branches ?
Comment 31 Andras 2018-12-26 21:09:39 UTC
(In reply to Commit Notification from comment #29)
> Affected users are encouraged to test the fix and report feedback.
I'm not sure if it's unnecessary however I can confirm it works now. As I wrote at the end of comment #27 all LibreOffice version started without 'cpdb' packages and and crashed with 'cpdb' packages installed. Now, every LibreOffice version are still crashing except this one I downloaded just now:
master_dbg_2018-12-26_00.08.41_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive.tar.gz
It would be awesome to see KDE neon or at least the official LibreOffice PPA beta upgrading to 6.3 not only because of this cpdb glitch but because of the more complete kde5 vcl too. Probably it's years from now unfortunately.
Thanks again for helping me out here and for this fix.
Comment 32 Michael Weghorn 2018-12-27 00:43:47 UTC
(In reply to Xisco Faulí from comment #30)
> Hi Michael Weghorn,
> Thanks for fixing this issue. Should it be backported to 6-2 and 6-1
> branches ?

Hi Xisco, I'm not sure how many people are currently actually using the Common Print Dialog, but it sure won't hurt, so please feel free.
Comment 33 Xisco Faulí 2018-12-27 08:42:03 UTC
(In reply to Andras from comment #31)
> (In reply to Commit Notification from comment #29)
> > Affected users are encouraged to test the fix and report feedback.
> I'm not sure if it's unnecessary however I can confirm it works now. As I
> wrote at the end of comment #27 all LibreOffice version started without
> 'cpdb' packages and and crashed with 'cpdb' packages installed. Now, every
> LibreOffice version are still crashing except this one I downloaded just now:
> master_dbg_2018-12-26_00.08.41_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-
> 64_archive.tar.gz
> It would be awesome to see KDE neon or at least the official LibreOffice PPA
> beta upgrading to 6.3 not only because of this cpdb glitch but because of
> the more complete kde5 vcl too. Probably it's years from now unfortunately.
> Thanks again for helping me out here and for this fix.

Thanks for testing. Setting to VERIFIED FIXED
Comment 34 Xisco Faulí 2018-12-27 08:45:23 UTC
(In reply to Michael Weghorn from comment #32)
> (In reply to Xisco Faulí from comment #30)
> > Hi Michael Weghorn,
> > Thanks for fixing this issue. Should it be backported to 6-2 and 6-1
> > branches ?
> 
> Hi Xisco, I'm not sure how many people are currently actually using the
> Common Print Dialog, but it sure won't hurt, so please feel free.

Ok, let's cherry-picked it to 6-2 at least... https://gerrit.libreoffice.org/#/c/65634/
Comment 35 Commit Notification 2018-12-27 22:30:22 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/773e4896521ccf29ab040f977a3faaadd805c8d8%5E%21

tdf#122116 Only create CPDManager if D-Bus descriptions present

It will be available in 6.2.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.