Bug 124124 - Writer crashes in KDE5 after document reconstruction / at start
Summary: Writer crashes in KDE5 after document reconstruction / at start
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.2.1 rc
Hardware: All Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2019-03-16 20:04 UTC by Sandra Weddig
Modified: 2019-07-17 11:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace libreoffice (44.75 KB, text/x-log)
2019-03-24 13:12 UTC, Sandra Weddig
Details
New Backtrace libreoffice RC (86.66 KB, text/x-log)
2019-03-31 09:16 UTC, Sandra Weddig
Details
Masterbuild Backtrace libreoffice (1.40 MB, text/x-log)
2019-03-31 10:27 UTC, Sandra Weddig
Details
Different Windowstyle Backtrace libreoffice (1.44 MB, text/x-log)
2019-03-31 10:30 UTC, Sandra Weddig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandra Weddig 2019-03-16 20:04:49 UTC
Description:
Using KDE at openSuSE Tumbleweed I can not start libreoffice.
Problem occurs on 2 computers.

Steps to Reproduce:
1.call "libreoffice" or "soffice" from console
2.restore documents
3.crash

Actual Results:
Console writes "Cannot destroy paint device that is being painted"

Expected Results:
Libreoffice Writer opens


Reproducible: Always


User Profile Reset: No



Additional Info:
Problem does only occur with KDE, gnome works, did updates.
Comment 1 Julien Nabet 2019-03-17 07:31:57 UTC
What kde version do you use? (kde4 or kde5)

Could you give a try to https://wiki.documentfoundation.org/QA/FirstSteps?
If you still reproduce the crash, would it be possible you retrieve a backtrace? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace)
Comment 2 Sandra Weddig 2019-03-17 16:48:45 UTC
I use KDE 5.15.2-1.1 and libreoffice 6.2.2.1-1.1.

I will try the first steps next weekend, work won't let me time before, sorry.
Comment 3 Katarina Behrens (Inactive) 2019-03-18 14:07:15 UTC
Please also try if it stops crashing with --norestore option that skips the document recovery dialog, i.e. 'soffice --norestore' 

Try changing KDE widget styles too(KDE System Settings > Application Style > Widget Style), perhaps it crashes with some but works with others? 

(just between us, I had this happening to me sometimes but I always attributed it to my own development work in progress, I use Breeze widget style for the record)
Comment 4 Xisco Faulí 2019-03-18 21:15:19 UTC Comment hidden (obsolete)
Comment 5 Sandra Weddig 2019-03-24 12:04:05 UTC
I did rename the user profile and tried the first steps, also trying a different KDE style. Nothing changed.

The following line appears ca. 15 times for a single try-start of libreoffice in the system log:

plasmashell[15069]: qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 46484, resource id: 92274694, major code: 142 (Unknown), minor code: 3
Comment 6 Julien Nabet 2019-03-24 12:49:52 UTC
Thank you Sandra for your feedback.

Would it be possible you retrieve a backtrace by following this link? (https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace)
Comment 7 Sandra Weddig 2019-03-24 12:53:49 UTC
Yes, I still install the avaible debuginfo packets and will add the backtrace when I'm finished.
Comment 8 Sandra Weddig 2019-03-24 12:54:04 UTC Comment hidden (obsolete)
Comment 9 Sandra Weddig 2019-03-24 13:12:47 UTC
Created attachment 150251 [details]
Backtrace libreoffice
Comment 10 Julien Nabet 2019-03-24 20:06:01 UTC
Thank you Sandra for the bt, it should help KDE experts to analyze this.
Comment 11 Michael Weghorn 2019-03-24 22:51:22 UTC
The backtrace suggests that the Breeze style is involved here, e.g. this line:

> #1  0x00007fffe74eefae in Breeze::Style::scrollBarSubControlRect

Can you attach the GDB trace when using another widget style? (to see whether it looks like the same problem)

Also, if you have the possibility to check whether the same crash happens with a current daily build of master as available at [1], that would be good very helpful to know, since I cannot reproduce the issue here (master build of LibreOffice on Debian testing, which has breeze 4:5.14.5-1). [2] describes how you can install that in parallel.

[1] https://dev-builds.libreoffice.org/daily/master/
[2] https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 12 Katarina Behrens (Inactive) 2019-03-28 09:51:14 UTC
Let me confirm this in the meantime. I get crashes like this every once in a while (in development environment though) but I'm unable to reproduce reliably
Comment 13 Sandra Weddig 2019-03-30 09:03:50 UTC
I cannot reproduce the bug when using libreoffice via console. It does not open via icon. Which command do I have to use, so that I can do a new backtrace?
Comment 14 Michael Weghorn 2019-03-30 09:37:33 UTC
(In reply to Sandra Weddig from comment #13)
> I cannot reproduce the bug when using libreoffice via console. It does not
> open via icon. Which command do I have to use, so that I can do a new
> backtrace?

If you're using the daily master builds, the following command should work (otherwise the path to the 'soffice.bin' needs to be adapted):

./LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive/program/soffice.bin --writer

It'd be great if you could use a debug build of LibreOffice master (available at [1]) and also install the debug symbols for libQt5widgets.so in addition, to get an even more meaningful backtrace.

[1] https://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@86-TDF-dbg/
Comment 15 Michael Weghorn 2019-03-30 09:40:59 UTC
(In reply to Michael Weghorn from comment #14)

> If you're using the daily master builds, the following command should work
> (otherwise the path to the 'soffice.bin' needs to be adapted):
> 
> ./LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive/program/soffice.bin
> --writer

Ah, sorry, that won't automatically generate a backtrace. Does this work:

./LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_archive/program/soffice --backtrace --writer
Comment 16 Sandra Weddig 2019-03-31 09:16:40 UTC
Created attachment 150422 [details]
New Backtrace libreoffice RC

I will try to install and a backtrace of libreoffice master debug in a few minutes.
Comment 17 Julien Nabet 2019-03-31 10:20:49 UTC
Revert back version since it must correspond to earliest one.
Comment 18 Sandra Weddig 2019-03-31 10:27:24 UTC
Created attachment 150424 [details]
Masterbuild Backtrace libreoffice
Comment 19 Sandra Weddig 2019-03-31 10:30:04 UTC
Created attachment 150425 [details]
Different Windowstyle Backtrace libreoffice
Comment 20 Sandra Weddig 2019-03-31 10:31:22 UTC
I did add a new backtrace, one with a different window style and one of the debug masterbuild (this seems not to run, do I need a different JDK?).
Comment 21 Michael Weghorn 2019-04-03 14:35:59 UTC
(In reply to Sandra Weddig from comment #20)
> I did add a new backtrace, one with a different window style and one of the
> debug masterbuild (this seems not to run, do I need a different JDK?).

Thanks.
The easiest workaround is probably to just disable Java by temporarily starting with the gtk3 VCL plugin, i.e. set the environment variable SAL_USE_VCLPLUGIN=gtk3 before starting LibreOffice and then in "Tools" -> "Options" -> "Advanced" disable the checkbox for "Use a Java runtime environment".

I've set up an openSUSE Tumbleweed VM for testing and could reproduce the JDK issue, but unfortunately not the crash, which makes this hard to analyse.

Looking at the backtrace from comment 18 and the involved code, I'd guess that there's a division by zero (causing the "SIGFPE, Arithmetic exception"), possibly because all the variables in the divisor (i.e. "range" and "scrollbar->pageStep") are 0.

It would be interesting to have that verified, so it'd be of help if you could start the debug version (with the same widget style as for the backtrace in comment 19) with

   gdb --args <SOME_PATH>/instdir/program/soffice.bin --writer

at which point a '(gdb)' prompt appears.
The command 'r' will start the program. If the same crash appears, it'd be good to print the values of the variables involved and the backtrace with these commands then:

 thread apply all bt
 p range
 p scrollbar->pageStep
 p scrollbar->maximum
 p scrollbar->minimum


and attach the result here. Since this is not really straightforward, please feel free to just leave out those steps and just attach the backtrace.

In the meantime, I had the same issue a few times, but couldn't reliable reproduce. Any idea what might help to reproduce this?


AFAICS, the relevant values for the 'QStyleOptionSlider option' variable being passed are set at [1] based on values passed to that method by the ImplControlValue param.


[1] https://gerrit.libreoffice.org/plugins/gitiles/core/+/master/vcl/qt5/Qt5Graphics_Controls.cxx#490
Comment 22 Rigo Wenning 2019-04-08 13:46:30 UTC
I can confirm this. For me everything stopped working with Tumbleweed 20190403. Libreoffice starts normally. As soon as one opens a menu, does page-down or opens the "about" to see the version, Libreoffice crashes. 

It does not crash when using safe-mode. Then the menues can be opened. Even when started with strace, I haven't been able to get any reasonable information. My Libreoffice is 6.2.2.2
Comment 23 Sandra Weddig 2019-04-09 17:35:18 UTC
The problem is solved for me. Updates and a new user profile did the trick.
Comment 24 Michael Weghorn 2019-04-10 07:13:54 UTC
(In reply to Sandra Weddig from comment #23)
> The problem is solved for me. Updates and a new user profile did the trick.

Great, thanks for the update!
Closing as WORKSFORME then.
Comment 25 Michael Weghorn 2019-04-10 07:17:02 UTC
(In reply to Rigo Wenning from comment #22)
> I can confirm this. For me everything stopped working with Tumbleweed
> 20190403. Libreoffice starts normally. As soon as one opens a menu, does
> page-down or opens the "about" to see the version, Libreoffice crashes. 
> 
> It does not crash when using safe-mode. Then the menues can be opened. Even
> when started with strace, I haven't been able to get any reasonable
> information. My Libreoffice is 6.2.2.2

Not sure whether this is the same problem. Can you check whether this also happens with a fresh user profile and a current daily build of master from [1]? [2] describes how you can install that in parallel.

Please report a new bug if the issue is still there then, and also paste the information from "Help" -> "About LibreOffice" there.

[1] https://dev-builds.libreoffice.org/daily/master/
[2] https://wiki.documentfoundation.org/Installing_in_parallel/Linux