Bug 116713 - Segfault when editing a comment containing just an hyperlink (gtk/gtk3 only - debug)
Summary: Segfault when editing a comment containing just an hyperlink (gtk/gtk3 only -...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.1.0
Keywords: haveBacktrace
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2018-03-30 17:20 UTC by Julien Nabet
Modified: 2018-04-06 20:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
gdb + bt traces (11.70 KB, text/plain)
2018-04-05 20:19 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2018-03-30 17:20:11 UTC
Description:
On pc Debian x86-64 with master sources updated yesterday, I had a crash when testing a bit tdf#33951


Steps to Reproduce:
1. Create a brand new file on Calc
2. Right click on A1 and choose Insert a comment
3. In the brand new blank comment, insert an hyperlink then apply+OK
4. Click A2
5. Right click A1 and choose "Edit comment"
6. Type "Esc"

Actual Results:  
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
I don't reproduce this with LO Debian package 6.0.2.1


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Buovjaga 2018-04-02 17:15:33 UTC
No problem

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 6acda2a36c9025e0d3fe94d6ca8788ab60c3203e
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 2nd 2018
Comment 2 Julien Nabet 2018-04-05 20:19:52 UTC
Created attachment 141150 [details]
gdb + bt traces
Comment 3 Julien Nabet 2018-04-05 20:23:28 UTC
(In reply to Buovjaga from comment #1)
> No problem
> 
> Arch Linux 64-bit
> Version: 6.1.0.0.alpha0+
> Build ID: 6acda2a36c9025e0d3fe94d6ca8788ab60c3203e
> CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
> Locale: fi-FI (fi_FI.UTF-8); Calc: group
> Built on April 2nd 2018

Indeed, I don't reproduce this kde4 or gen but could reproduce this with gtk and gtk3.

Caolán: thought you might be interested in this one since it concerns specifically gtk/gtk3.
Comment 4 Xisco Faulí 2018-04-05 22:30:37 UTC
I can't reproduce it in

Version: 6.1.0.0.alpha0+
Build ID: abf9ec7bef2c341ad9c914fd909dd03b4a784f18
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

debug only ?
Comment 5 Xisco Faulí 2018-04-06 08:45:23 UTC
Reproduced in

Version: 6.1.0.0.alpha0+
Build ID: 5231050887ef88dcb542d9bdb738d4820b2e8bb3
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86@71-TDF-dbg, Branch:master, Time: 2018-03-20_00:14:10
Locale: ca-ES (ca_ES.UTF-8); Calc: group

which is a debug build...
Comment 6 Caolán McNamara 2018-04-06 12:26:53 UTC
I can see it under valgrind. I don't think its gtk specific. I think a listener doesn't get deregistered because ownership of an outliner was transferred out of the view and so returns null when the listener wants to deregister. I suspect the release() call of 2affed9bfd72628549df3049ed9f6e6a30fdb5b8 is the trigger
Comment 7 Caolán McNamara 2018-04-06 13:21:31 UTC
yeah, that's the problem
Comment 8 Commit Notification 2018-04-06 14:24:07 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=79ae6cc6b3b19252473f6987106ea7d8aa17a5ea

Resolves: tdf#116713 Revert "loplugin:useuniqueptr in SdrObjEditView"

It will be available in 6.1.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 9 Julien Nabet 2018-04-06 20:20:07 UTC
On pc Debian x86-64 with master sources updated today (7dcda19e4a5580dd526eeab07feba12f4212e4f1), I don't reproduce this.
Thank you Caolán for your quick fix!