Bug Hunting Session
Bug 107847 - CRASH Opening macro tab of properties dialog (images, frames) causes crash
Summary: CRASH Opening macro tab of properties dialog (images, frames) causes crash
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: highest critical
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:5.4.0 target:6.3.0
Keywords: haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2017-05-14 15:54 UTC by Cor Nouws
Modified: 2019-05-10 15:44 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (9.06 KB, text/plain)
2017-05-14 19:40 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2017-05-14 15:54:24 UTC
insert image or frame in Writer document
open properties of image or frame
go to Macro tab > Crash

Version: 5.4.0.0.alpha1+
Build ID: f6fd7dd08b478857234a3b1b5b18e65e9b250174
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-05-11_08:26:56
Locale: nl-NL (nl_NL.UTF-8); Calc: group

A bunch of crash reports must have been sent from my computer the last day's, maybe 10 or so.
Comment 1 Cor Nouws 2017-05-14 15:56:54 UTC
Also with a clean user profile.

The popup reads "Please check the report and if no bug report is connected to the crash report yet, open a new bug report at bugs.documentfoundation.org.
Add detailed instructions on how to reproduce the crash and the shown crash ID into the crash report field.
Thank you for your help in improving LibreOffice daily20170511."

Where to find the crash ID?
Comment 2 Xisco Faulí 2017-05-14 16:43:45 UTC
Regression introduced by:

author	Michael Stahl <mstahl@redhat.com>	2017-01-17 14:38:11 (GMT)
committer	Michael Stahl <mstahl@redhat.com>	2017-01-17 22:42:01 (GMT)
commit	743f9fc86f3d3b6e87bf58c0654bcdccab0ab383 (patch)
tree	b38040b0d02b67e0284f20403d3b5a98ea4a9d66
parent	6ef033669762a0c7ce70c111458437d5e727a4ae (diff)
python3: upgrade to release 3.5.3

Bisected with bibisect-linux-64-5.4.

Adding Cc: to Michael Stahl
Comment 3 Xisco Faulí 2017-05-14 16:56:15 UTC
it doesn't crash for me with a build with debug symbols
Comment 4 Cor Nouws 2017-05-14 19:03:14 UTC
(In reply to Xisco Faulí from comment #2)

> commit	743f9fc86f3d3b6e87bf58c0654bcdccab0ab383 (patch)

2017-01-17 .. odd that I only encounter the problem now.
Comment 5 Julien Nabet 2017-05-14 19:40:43 UTC
Created attachment 133316 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this. (enable-dbgutil + gtk3)
Comment 6 Julien Nabet 2017-05-14 19:43:01 UTC
Xisco: I don't think it's related with Python upgrade (according to description of pb + bt), are you sure about the bibisect?
Comment 7 Julien Nabet 2017-05-14 19:50:04 UTC
Searching about m_xContext which seems lacking here, I found this commit more recent:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=e4d7511d7e49af14e3c8113bb1440e0eb04f40ad (2017-05-09)

Maxim: thought you might be interested in this one.
Comment 8 Xisco Faulí 2017-05-14 19:56:32 UTC
(In reply to Julien Nabet from comment #6)
> Xisco: I don't think it's related with Python upgrade (according to
> description of pb + bt), are you sure about the bibisect?

I've just recalled the problem is in the bisect repository bibisect-linux-64-5.4 when python is required. Same happened when I bisected bug 106117. The problem wasn't introduced by 743f9fc86f3d3b6e87bf58c0654bcdccab0ab383 then. My bad.
Comment 9 Maxim Monastirsky 2017-05-14 20:18:34 UTC
(In reply to Julien Nabet from comment #7)
> Searching about m_xContext which seems lacking here, I found this commit
> more recent:
> https://cgit.freedesktop.org/libreoffice/core/log/
> ?qt=range&q=e4d7511d7e49af14e3c8113bb1440e0eb04f40ad (2017-05-09)
> 
> Maxim: thought you might be interested in this one.
Thanks Julien. That's indeed seems related to my commit.
Comment 10 Julien Nabet 2017-05-14 20:31:29 UTC
Before the patch, we got this line 623:
Image aImage = GetImage( theChild, xCtx, bIsRootNode );
and xCtx is initialized with:
    533     Reference< XComponentContext > xCtx(
    534         comphelper::getProcessComponentContext() );
    535     try
    536     {
    537         Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( xCtx );

Now GetImage is in FillScriptList and use m_xContext:
606                     Image aImage = GetImage( theChild, m_xContext, bIsRootNode );

but m_xContext is empty ref (it was also the case before patch)
Comment 11 Commit Notification 2017-05-14 21:00:02 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

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

tdf#107847 Make sure m_xContext is not empty

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 12 Cor Nouws 2017-05-15 07:10:41 UTC
thanks for the quick fix :)

Ok in Version: 5.4.0.0.alpha1+
Build ID: b9d75dea30adaa53be58c112f255c9fcd3eea400
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-05-15_03:00:16
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 13 Commit Notification 2019-05-09 20:03:19 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

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

uitest for bug tdf#107847

It will be available in 6.3.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.