Bug 120291 - Attaching a connector makes draw Draw busy-loop and crash
Summary: Attaching a connector makes draw Draw busy-loop and crash
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-10-03 17:27 UTC by Micha
Modified: 2018-10-08 10:30 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Exemplary document (10.42 KB, application/vnd.oasis.opendocument.graphics)
2018-10-03 17:27 UTC, Micha
Details
loop (1.65 KB, text/plain)
2018-10-03 19:48 UTC, Julien Nabet
Details
gdb session with loop detail (4.83 KB, text/plain)
2018-10-03 19:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Micha 2018-10-03 17:27:14 UTC
Created attachment 145357 [details]
Exemplary document

Hi all,

when I attach a connector to some boxes it makes Draw first busy-loop and consume memory and then crash when no memory is available.
It seems only to happen when the connector placement is not trivial.

I'm adding an example document to reproduce with hints where to connect. 

Tested with these versions:

Version: 6.2.0.0.alpha0+
Build ID: 51591ae750df644738bba4e1c8a2bb81d183a572
CPU threads: 12; OS: Linux 4.17; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-10-02_18:11:09
Locale: en-US (en_US.UTF-8); Calc: threaded

Version: 6.2.0.0.alpha0+
Build ID: a906b68a9fff30c2af5c03189e59c1952cd3f69f
CPU threads: 12; OS: Linux 4.17; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-09-30_19:07:59
Locale: en-US (en_US.UTF-8); Calc: threaded

Hint:
I kill LO via ssh from another machine since my Desktop hangs completely after some seconds.
Sometimes I even need to restart mate-panel:

killall /opt/libreofficedev6.2/program/soffice.bin
killall mate-panel

Best Regards,
Michael
Comment 1 Telesto 2018-10-03 17:52:13 UTC
Repro with
Version: 6.2.0.0.alpha0+
Build ID: 52cb73911e661fb636085337374e09845f07783b
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-10-02_01:05:50
Locale: nl-NL (nl_NL); Calc: CL

but not with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 2 Micha 2018-10-03 18:26:20 UTC
Not reproducible with

Version: 6.1.0.0.alpha1+
Build ID: 4ed3137022efa6128ad146e4b4dfae13548431dc
CPU threads: 12; OS: Linux 4.17; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-05-04_01:13:51
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 Julien Nabet 2018-10-03 19:48:56 UTC
Created attachment 145358 [details]
loop

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

I attached the loop sequence.
Comment 4 Julien Nabet 2018-10-03 19:50:18 UTC
Created attachment 145359 [details]
gdb session with loop detail
Comment 5 Xisco Faulí 2018-10-03 21:49:50 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ffe84f49270e0a8818365ca7d1fd5242abff5562

author	Noel Grandin <noel.grandin@collabora.co.uk>	2018-09-20 09:48:50 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-09-21 10:52:46 +0200
commit ffe84f49270e0a8818365ca7d1fd5242abff5562 (patch)
tree 9fc133fc58737afcfbd49242528811eb320705c3
parent 6b28441fb8823ba28a9db6cf1d97aa277cdcd7b4 (diff)
remove SdrObject::GetHdl in favour of AddToHdlList
the code already says that using GetHdl is inefficient, and client code
should be using AddToHdlList, so just drop the bad one

Bisected with: bibisect-linux64-6.2

Adding Cc: to Noel Grandin

Be careful, I had to restart my computer a couple of times as it ran out of memory
Comment 6 Commit Notification 2018-10-04 17:48:48 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120291 Attaching a connector makes draw Draw busy-loop

It will be available in 6.2.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 7 Micha 2018-10-05 04:54:21 UTC
Fix confirmed, tested with most recent nightly build.

Version: 6.2.0.0.alpha0+
Build ID: e539a492597c7312a8d0cccb4b386341bd4ec84a
CPU threads: 12; OS: Linux 4.17; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-10-05_00:43:34
Locale: en-US (en_US.UTF-8); Calc: threaded

Thanks a lot, that was pretty quick feedback!

Best Regards, Michael
Comment 8 Xisco Faulí 2018-10-08 10:30:54 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 4854acc7929ea58632c5d0f7f80a4adc3c62b8cd
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Noel, thanks for the quick fix!