Bug 101957 - Crash when inserting an row in Writer using the context menu (likely GTK2-related)
Summary: Crash when inserting an row in Writer using the context menu (likely GTK2-rel...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, needsDevAdvice
Depends on:
Blocks: Cell-Add-Delete Crash
  Show dependency treegraph
 
Reported: 2016-09-07 09:37 UTC by Henk Jan Priester
Modified: 2020-05-16 21:34 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
gdbtrace.log (10.59 KB, text/plain)
2016-09-08 11:56 UTC, Henk Jan Priester
Details
gdbtrace of version 5.2.1 (28.04 KB, text/plain)
2016-09-08 13:26 UTC, Henk Jan Priester
Details
gdbtrace of version 5.2.2 (8.66 KB, text/plain)
2016-09-30 07:44 UTC, Henk Jan Priester
Details
valgrind log of 5.2.2 (942.23 KB, application/x-troff-man)
2016-09-30 07:47 UTC, Henk Jan Priester
Details
valgrind log of 5.3.0 (1.70 MB, text/plain)
2017-03-03 09:03 UTC, Henk Jan Priester
Details
gdbtrace of version 5.3.0 (9.48 KB, text/plain)
2017-03-03 09:05 UTC, Henk Jan Priester
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henk Jan Priester 2016-09-07 09:37:08 UTC
Libreoffice writer crashing when inserting a row into a table using the context menu.
On the terminal there are a few messages:
(soffice:8349): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed
(soffice:8349): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed
(soffice:8560): GLib-GObject-WARNING **: gsignal.c:3081: signal name `selection_changed' is invalid for instance `0x1f06c80'
pure virtual method called
terminate called without an active exception

The problem can be reproduced with a small write document with only a table of 2x3 and then inserting a row using a context menu.

On Windows it seems to work correct but on Linux it crashes.
Comment 1 Henk Jan Priester 2016-09-07 09:39:27 UTC
the workaround is to use the insert row table using the menu bar.
Comment 2 Henk Jan Priester 2016-09-08 08:26:03 UTC
I get many many crashes...it is very unstable.
The system is a redhat enterprise 6.8 and the build comes from the LibreOffice site. When running valgrind I get some memory corruption. 

=19792== Invalid read of size 8
==19792==    at 0x1695C43D: ooo_window_wrapper_real_finalize (in /opt/libreoffice5.1/program/libvclplug_gtklo.so)
==19792==    by 0x3FC0210793: g_object_unref (in /lib64/libgobject-2.0.so.0.2800.8)
==19792==    by 0x3FC520E3B0: ??? (in /usr/lib64/libatk-1.0.so.0.3009.1)
==19792==    by 0x3FC0210793: g_object_unref (in /lib64/libgobject-2.0.so.0.2800.8)
==19792==    by 0x1694DCE9: idle_defunc_state_change (in /opt/libreoffice5.1/program/libvclplug_gtklo.so)
==19792==    by 0x3FBF240641: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2800.8)
==19792==    by 0x3FBF244C97: ??? (in /lib64/libglib-2.0.so.0.2800.8)
==19792==    by 0x3FBF244E4B: g_main_context_iteration (in /lib64/libglib-2.0.so.0.2800.8)
==19792==    by 0x1696060A: GtkData::Yield(bool, bool) (in /opt/libreoffice5.1/program/libvclplug_gtklo.so)
==19792==    by 0x7705350: Application::Yield() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x7706EB4: Application::Execute() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x67F6661: desktop::Desktop::Main() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x770AE28: ImplSVMain() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x770AE71: SVMain() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x68177B1: soffice_main (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x40075A: main (main.c:48)
==19792==  Address 0x1b1508d8 is 120 bytes inside a block of size 160 free'd
==19792==    at 0x4A06430: free (vg_replace_malloc.c:446)
==19792==    by 0x74FC3B4: WindowImpl::~WindowImpl() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x750705F: vcl::Window::dispose() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x7506E0B: vcl::Window::dispose() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x750ABAD: vcl::LazyDeletor::~LazyDeletor() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x76F0F4E: vcl::LazyDelete::flush() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x77053C4: Application::Yield() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x7706EB4: Application::Execute() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x67F6661: desktop::Desktop::Main() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x770AE28: ImplSVMain() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x770AE71: SVMain() (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x68177B1: soffice_main (in /opt/libreoffice5.1/program/libmergedlo.so)
==19792==    by 0x40075A: main (main.c:48)
==19792== 
pure virtual method called
terminate called without an active exception
==19792== 
==19792== HEAP SUMMARY:
==19792==     in use at exit: 26,730,948 bytes in 335,288 blocks
==19792==   total heap usage: 2,455,062 allocs, 2,119,774 frees, 415,347,904 bytes allocated
Comment 3 Henk Jan Priester 2016-09-08 11:56:29 UTC
Created attachment 127218 [details]
gdbtrace.log

added a gdbtrace.

note this bug looks similar as 

https://bugs.documentfoundation.org/show_bug.cgi?id=100775
Comment 4 Henk Jan Priester 2016-09-08 13:26:05 UTC
Created attachment 127219 [details]
gdbtrace of version 5.2.1
Comment 5 Henk Jan Priester 2016-09-08 13:32:14 UTC
Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
CPU Threads: 4; OS Version: Linux 2.6; UI Render: default; 
Locale: en-US (en_US.utf8); Calc: group
Comment 6 Aron Budea 2016-09-10 02:16:46 UTC
Something definitely seems to be wrong based on the logs, but nfortunately I don't get the crash with v5.1.5.2 / Ubuntu 16.04 when adding rows via context menu.
Comment 7 Aron Budea 2016-09-10 02:25:44 UTC
I was thinking it might be GTK3-related, but not getting it with the GTK3-enabled v5.1.4.2 included in Ubuntu 16.04, either.

Thank you for the details and traces.
Comment 8 Henk Jan Priester 2016-09-14 12:08:43 UTC
On RedHat 6.8 I get many crashes both with the 5.1.5 and 5.2.1

On with platform is the install rpm from the libreoffice site created?
Comment 9 Aron Budea 2016-09-14 21:37:22 UTC
(In reply to Henk Jan Priester from comment #8)
> On with platform is the install rpm from the libreoffice site created?

Christian, can you answer this?

Also, requesting developer assistance for checking the traces.
Raising severity to critical, since it's a crash.
Comment 10 Henk Jan Priester 2016-09-15 12:25:00 UTC
I have also installed the Libreoffice 5.2.1  64bit Linux RPM on a Centos 7.2 (similar as Redhat 7.2) system and can not reproduce the crash.

On Redhat 6.8 the crash can be reproduced but also a copy paste using right click results in a crash. 
The problem looks RedHat 6.8 proably 6.x specific.
Comment 11 Christian Lohmaier 2016-09-15 16:06:45 UTC
(In reply to Henk Jan Priester from comment #8)
> 
> On with platform is the install rpm from the libreoffice site created?

https://wiki.documentfoundation.org/Development/ReleaseBuilds
Comment 12 Henk Jan Priester 2016-09-30 07:44:21 UTC
Created attachment 127736 [details]
gdbtrace of version 5.2.2
Comment 13 Henk Jan Priester 2016-09-30 07:47:04 UTC
Created attachment 127737 [details]
valgrind log of 5.2.2

I just upgraded to LibreOffice 5.2.2.2 rpm and can reproduce the crashes.
Comment 14 arnaud.malfoy 2016-10-09 05:05:14 UTC
I can not reproduce the bug in Ubuntu 16.04.1 with Libre Office 
Version: 5.2.2.2
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 15 V Stuart Foote 2016-10-09 05:40:32 UTC
Windows builds do not seem to be affected, can not reproduce on Windows 10 Pro 64-bit (1607) en-US with either

Version: 5.3.0.0.alpha0+
Build ID: 89a3f825559753d6600807342ca96c169cd58c87
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-29_23:19:33
Locale: en-US (en_US); Calc: group

or

Version: 5.2.2.2 (x64)
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-US (en_US); Calc: group

Rows insert from context menu before or after current row, with or without OpenGL rendering.
Comment 16 Caolán McNamara 2016-10-24 11:12:58 UTC
definitely gtk2 from the backtrace
Comment 17 Henk Jan Priester 2016-11-04 09:41:32 UTC
the system redhat 6.8 system only has gtk2.
this particular crash is not a problem on windows. 

i have installed LO 5.2.3 and the crash is the same as with 5.2.2 and 5.1.5
To me it looks related to the "right click menu".

I tried 5.2.2 in a virtual machine with Centos 6 and could not reproduce the crash. 

Any idea what is causing the problem on RedHat 6.8?
Comment 18 Julien Nabet 2017-03-02 22:01:53 UTC
On pc Debian x86-64 with LO Debian package 5.2.5.1 + gtk rendering I don't reproduce this.

Henk: would you have some time to give a try to a 5.2.5 or 5.3.0? (with a brand new LO profile, see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux)
Comment 19 Xisco Faulí 2017-03-02 23:00:17 UTC
Setting to NEEDINFO until we get feedback from the reporter
Comment 20 Henk Jan Priester 2017-03-03 09:03:53 UTC
Created attachment 131594 [details]
valgrind log of 5.3.0
Comment 21 Henk Jan Priester 2017-03-03 09:05:34 UTC
Created attachment 131595 [details]
gdbtrace of version 5.3.0
Comment 22 Henk Jan Priester 2017-03-03 09:09:19 UTC
I remove the old profiles:
cd $HOME
rm -rf .config/libreoffice
rm -rf .libreoffice

Can produce the crash with 5.3.0

109 gavia : /home/hj % libreoffice5.3 --backtrace
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/libreoffice5.3/program/soffice.bin...(no debugging symbols found)...done.
log will be saved as gdbtrace.log, this will take some time, patience...

** (soffice:22672): WARNING **: Exception in getAccessibleName()
110 gavia : /home/hj % 

the log of valgrind and gdb backtrace are attached. This problem seems specific to this RedHat system. Maybe a confict with a system lib.
Comment 23 Julien Nabet 2017-03-03 09:42:30 UTC
Thank you for your detailed feedback.

Let's put this one to NEW then since there's a bt + Valgrind trace.

Caolán: thought you might be interested in this one since it concerns gtk2 on RedHat. The reporter attached bt + Valgrind trace, do you think about any other information needed here from him?
Comment 24 QA Administrators 2018-03-04 03:45:39 UTC Comment hidden (obsolete)
Comment 25 David 2018-04-17 13:41:46 UTC
Still happening with version 6.1.0 alpha.  Also crashed when adding a row from the main menu.
Comment 26 Xisco Faulí 2018-04-17 15:25:21 UTC
Do you reproduce the crash with  SAL_USE_VCLPLUGIN=gen soffice?
OTOH, which is your gtk version?
Comment 27 David 2018-04-21 15:51:36 UTC
I am using Debian stable, which has versions 3.22.11 and 2.24.31 installed.  I have not tried it without kde or gtk extensions.
Comment 28 David 2018-04-26 15:59:23 UTC
It has crashed again for me in 64bit linux, with the latest version 6.1.0.0. alpha0, dated 4/23/2018.  I currently do not have the either the kde or gtk extensions installed and it happened the first time I tried to insert a row after opening my document.
Comment 29 Caolán McNamara 2018-04-26 20:12:42 UTC
The original reporter, Henk, was on rhel 6.8 which is a very old distro by now. I don't see any information in the last few comments from David that indicates that its the same crash.
Comment 30 QA Administrators 2019-05-19 02:51:01 UTC Comment hidden (obsolete)
Comment 31 Henk Jan Priester 2019-05-29 08:20:30 UTC
Well on my RedHat 6.10 system all version up to 6.1.x are crash generators.

I just tried: libreoffice 6.2.4

And that version does not start:
100 gavia : /home/hj % libreoffice6.2 
/opt/libreoffice6.2/program/oosplash: /lib64/libz.so.1: version `ZLIB_1.2.3.4' not found (required by /opt/libreoffice6.2/program/oosplash)
/opt/libreoffice6.2/program/oosplash: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/libreoffice6.2/program/oosplash)
/opt/libreoffice6.2/program/oosplash: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /opt/libreoffice6.2/program/libuno_sal.so.3)
/opt/libreoffice6.2/program/oosplash: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/libreoffice6.2/program/libuno_sal.so.3)

RedHat 6 comes with GLIBC 2.12.

NOTE: this page seems to be outdated. It mentions GLIBC 2.5 
https://www.libreoffice.org/get-help/system-requirements/#Linux

It seems RedHat 6 is not supported at all anymore.
Comment 32 Julien Nabet 2019-08-15 09:35:12 UTC
Just for information gtk2 support will be dropped in future 6.4.0.
Also I noticed this commit:
Author: Tor Lillqvist <tml@collabora.com>
Date:   Tue Jul 14 11:01:48 2015 +0300

    With --enable-gtk3 we need GLib >= 2.38
    
    The G_ADD_PRIVATE used in libreofficekit/source/gtk/lokdocview.cxx is from
    2.38.
    
    Change-Id: I2058932f8252d2715f970f020160f4f960987125

So GLIBC_2.14 won't make it.

Caolán: I agree with Henk, https://www.libreoffice.org/get-help/system-requirements/#Linux should be updated to put glib 2.14 instead of 2.5
What do you think?
Comment 33 Caolán McNamara 2019-08-15 11:56:11 UTC
tor's commit is wrt glib, rather than glibc.

It is quite likely the original crash is due to some hidden assumption on the version of gtk or glib available which isn't met on the older system.

on the glibc side

glibc 2.14 is presumably the version used on the baseline centos machine used to create the binary builds.

I imagine that the "glibc2 version 2.5" in the website was cut and paste from readlicense_oo/docs/readme.xrm which also states 2.5 so we should probably update that. The other requirements there are probably also stale.
Comment 34 Julien Nabet 2019-08-15 12:57:23 UTC
Thank you Caolán for your feedback.

About glibc, version history from https://sourceware.org/glibc/wiki/Glibc%20Timeline shows:
GLIBC 2.12.2: 2010-12-13
GLIBC 2.14: 2011-06-01

So RedHat 6 seems to use very old libs and isn't compatible anymore with LO.

I just saw that https://www.libreoffice.org/get-help/system-requirements/#Linux indicated now glibc2 2.14
As you may have seen, i've submitted this patch on gerrit:
https://gerrit.libreoffice.org/#/c/77517/
about readlicense_oo/docs/readme.xrm

Should we put RESOLVED/WFM (or WONTFIX ?) or do you have something else on mind?
Comment 35 Commit Notification 2019-08-15 21:01:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Related tdf#101957: glibc2 should be at least 2.14

It will be available in 6.4.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 36 Julien Nabet 2020-05-16 21:34:12 UTC
gtk2 support has been dropped with https://cgit.freedesktop.org/libreoffice/core/commit/?id=1ae450504cf57457f9702684b1517fda1dd3c481
author	Caolán McNamara <caolanm@redhat.com>	2019-08-13 10:37:50 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2019-09-30 16:53:32 +0200
commit 1ae450504cf57457f9702684b1517fda1dd3c481 (patch)
tree 2b1fc3870594dcc01217e3e406322ab084e258ef
parent 25ca657f8d0f1febaf0d5984bc862f3072ad197b (diff)
drop gtk2 support
Change-Id: Ie838cabfecfef7e3225c1555536d5c9cf3b43f15
Reviewed-on: https://gerrit.libreoffice.org/77405
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>

=> WONTFIX

Don't hesitate to reopen this tracker if you still reproduce this with a recent LO version (6.4.3) and with other rendering than gtk2.