Bug 104687 - paste text crash (GTK2)
Summary: paste text crash (GTK2)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All Linux (All)
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords: bibisected, bisected, haveBacktrace, regression
: 104572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-14 22:44 UTC by raal
Modified: 2016-12-23 09:01 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
3 bts got with __cxa_throw (6.59 KB, application/zip)
2016-12-21 21:08 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2016-12-14 22:44:44 UTC
Description:
regression, Version: 5.4.0.0.alpha0+
Build ID: b29ae3dace6a6a2e24e531bb648cd3cb97ea3225
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-12-14_10:19:59

Steps to Reproduce:
1.write text to cell
2.copy
3.right click -> paste only -> text


Actual Results:  
crash

Expected Results:
text pasted


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Julien Nabet 2016-12-14 22:50:51 UTC
Could be a dup of tdf#104481 put in see also.

Anyway, I could reproduce this on pc Debian x86-64 with master sources updated today.

I put the max priority because:
- it's a crash
- it's a regression
- it's a basic use case
Comment 2 Xisco Faulí 2016-12-15 12:50:40 UTC
it looks more like a duplicate of bug 104572
Comment 3 Xisco Faulí 2016-12-20 00:22:39 UTC
Regression introduced by:

author	Kohei Yoshida <kohei.yoshida@collabora.com>	2016-11-22 03:56:46 (GMT)
committer	Kohei Yoshida <libreoffice@kohei.us>	2016-11-22 13:18:00 (GMT)
commit	87e040fd0f04307534920d0765af6d5878794a98 (patch)
tree	8faa3f12d311d9c1fc205d9c333e2b15da934894
parent	a0ef7474521413c8967559a635e6fdc0d88f1df6 (diff)
tdf#71409: Stop listening to objects going out-of-focus.
This helps eliminate the number of AtkListener objects growing
over time.

Adding Cc: to Kohei Yoshida
Comment 4 Xisco Faulí 2016-12-20 00:25:05 UTC
*** Bug 104572 has been marked as a duplicate of this bug. ***
Comment 5 Julien Nabet 2016-12-20 14:21:26 UTC
On pc Debian x86-64 with master sources updated today, I confirm than just reverting 87e040fd0f04307534920d0765af6d5878794a98 (quoted by Xisco) makes the bug not reproduceable.
Comment 6 Julien Nabet 2016-12-20 17:27:50 UTC
I tried to understand why it doesn't work on gtk2 but I'm a bit lost.

I noticed this part on gtk2
#31 0x00002aaac8dc7dc0 in GtkData::Yield (this=0x5555558ae320, bWait=true, bHandleAllCurrentEvents=false) at /home/julien/lo/libreoffice/vcl/unx/gtk/gtkdata.cxx:499
#32 0x00002aaac8dcc1b9 in GtkInstance::DoYield (this=0x5555558b9cc0, bWait=true, bHandleAllCurrentEvents=false, nReleased=0)
    at /home/julien/lo/libreoffice/vcl/unx/gtk/gtkinst.cxx:427
#33 0x00002aaab5b599ad in ImplYield (i_bWait=true, i_bAllEvents=false, nReleased=0) at /home/julien/lo/libreoffice/vcl/source/app/svapp.cxx:506
#34 0x00002aaab5b55784 in Application::Yield () at /home/julien/lo/libreoffice/vcl/source/app/svapp.cxx:551

on gtk3, it goes to vcl/unx/gtk/gtkinst.cxx:427 not in vcl/unx/gtk/gtkdata.cxx:499 but I suppose it's expected.

Caolan: since it concerns vcl and a difference of treatment between gtk2/gtk3, thought you might be interested in this one.
BTW, will LO abandon gtk2 soon or it isn't expected at all in near future (some months)?
Comment 7 Michael Meeks 2016-12-20 22:23:23 UTC
Any chance of a back-trace with symbols ? what does the this object look like inside stopListening ? in particular is it a simple NULL mpWrapper de-reference ?
Comment 8 Julien Nabet 2016-12-20 22:32:55 UTC
Michael: I had put a part of bt here:
https://bugs.documentfoundation.org/show_bug.cgi?id=104481#c3 I got it by typing Ctrl-C when there was the empty popup error.

I didn't keep the complete one of https://bugs.documentfoundation.org/show_bug.cgi?id=104687#c6.

Given the fact that we don't get a crash but an abort, where should I put a break in gdb to retrieve something interesting?
Comment 9 Michael Meeks 2016-12-21 14:45:03 UTC
Could be that Michael Stahl fixed this in bug#104488 ? =)
Comment 10 Xisco Faulí 2016-12-21 14:53:21 UTC
(In reply to Michael Meeks from comment #9)
> Could be that Michael Stahl fixed this in bug#104488 ? =)

it's still reproducible in

Version: 5.4.0.0.alpha0+
Build ID: 5a20df55ff829978c880b22e0a1f32c35d0ba30f
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 11 Julien Nabet 2016-12-21 21:08:29 UTC
Created attachment 129852 [details]
3 bts got with __cxa_throw

Michael: I followed your advice from https://bugs.documentfoundation.org/show_bug.cgi?id=104481#c4
Hope these 3 bt help.
Comment 12 Julien Nabet 2016-12-21 21:34:12 UTC
Reverting https://cgit.freedesktop.org/libreoffice/core/commit/?id=a0ef7474521413c8967559a635e6fdc0d88f1df6 make disappear the crash here but not for tdf#104481
Comment 13 Caolán McNamara 2016-12-22 13:10:01 UTC
@julien FWIW gtk2 isn't going away in any short to medium term
Comment 14 Commit Notification 2016-12-22 13:21:03 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=88dad8fe1a94055dcbb05a6e6f0df2d007914a45

Resolves: tdf#104687 gtk2 paste cell text under a11y is fatal

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Caolán McNamara 2016-12-22 13:22:15 UTC
brute force fix, following bt3 and makes it work here again. Might want to check the other gtk2 things after using a popup menu to see if there are also fixed
Comment 16 Commit Notification 2016-12-22 13:22:26 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=08e6fe3d120ad3e64c42022686579982a8af11c1&h=libreoffice-5-3

Resolves: tdf#104687 gtk2 paste cell text under a11y is fatal

It will be available in 5.3.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Julien Nabet 2016-12-22 13:29:02 UTC
Thank you Caolán for the fix. I've retrieved it and gonna test it once local build will be finished. Hope it'll help for tdf#104481 too.
Concerning gtk2, thank you for your feedback, I wasn't sure about it.
Comment 18 Julien Nabet 2016-12-23 08:55:02 UTC
With master sources updated yesterday (which includes the fix for this bugtracker), I don't reproduce the crash.
The weird thing is I don't see any log corresponding to this part:
catch (const uno::Exception& e) {
    SAL_INFO("vcl.a11y", "exception: " << e.Message);
}
Comment 19 Julien Nabet 2016-12-23 09:01:27 UTC
After changing locally SAL_INFO to SAL_WARN for the test, I got this:
warn:vcl.a11y:17405:1:vcl/unx/gtk/a11y/atkutil.cxx:106: exception: 

so no exception message here.
(idem for tdf#104481)