Bug 101473 - [EDITING] Function wizard crashes LibO when evaluating addin that implement XVolatileResult
Summary: [EDITING] Function wizard crashes LibO when evaluating addin that implement X...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0 target:6.3.0.1 target:6.2.5
Keywords: haveBacktrace
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2016-08-13 12:22 UTC by jeanmarczambon
Modified: 2019-06-01 02:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ExampleAddin compiled from LibreOffice SDK (6.64 KB, application/vnd.openofficeorg.extension)
2016-08-13 12:22 UTC, jeanmarczambon
Details
backtrace log file (3.91 KB, application/tar+gzip)
2016-08-13 21:06 UTC, jeanmarczambon
Details
bt with debug symbols (gtk3) (10.71 KB, text/plain)
2019-05-28 09:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeanmarczambon 2016-08-13 12:22:04 UTC
Created attachment 126781 [details]
ExampleAddin compiled from LibreOffice SDK

When using a custom function (addin) that implements XVolatileResult, all goes right within the classic UI interface, but LibreOffice crashes if one uses the function in the Function wizard.

Steps to reproduce :
- compile and install the ExampleAddin available with the SDK (see attachment)
- open the ExampleAddin.ods file within the same folder in the SDK
- select cell B4 where the COUNTER() function is entered
- open the function wizard -> LibO crashes

or (with the same extension installed :

- open a new calc document
- open the function wizard
- choose the COUNTER() function and enter a name
- LibO crashes as soon as the closing quote is typed in.

The crashes occure with other addins implementing XVolatileResult : the one I'm currently working on (see https://forum.openoffice.org/fr/forum/viewtopic.php?p=281123#p281123) and a third one a found digging around : Obba.oxt (http://extensions.openoffice.org/en/project/obba).

As I said, all goes find within the UI classic interface.
OpenOffice does not crash.

Tested on 64bit Linux et Windows systems, with LibO 5.1 and 5.2.

[As you see I'm not an English native speaker. Please forgive any mistake.]
Comment 1 Julien Nabet 2016-08-13 17:28:51 UTC
Would it be possible you retrieve a backtrace by using this link?
https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace
Comment 2 jeanmarczambon 2016-08-13 21:06:55 UTC
Created attachment 126821 [details]
backtrace log file

Thank for your response.
I have attached the backtrace log file.
Comment 3 Julien Nabet 2016-08-14 07:19:11 UTC
Thank you for your feedback.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff53577fd in SvtListener::StartListening(SvtBroadcaster&) () from /opt/libreoffice5.2/program/libmergedlo.so
#0  0x00007ffff53577fd in SvtListener::StartListening(SvtBroadcaster&) () from /opt/libreoffice5.2/program/libmergedlo.so
#1  0x00007fffbb3e6519 in ScInterpreter::ScExternal() () from /opt/libreoffice5.2/program/../program/libsclo.so
#2  0x00007fffbb3e9464 in ScInterpreter::Interpret() () from /opt/libreoffice5.2/program/../program/libsclo.so
#3  0x00007fffbb2e13a3 in ScSimpleFormulaCalculator::Calculate() () from /opt/libreoffice5.2/program/../program/libsclo.so
#4  0x00007fffbb2e15d9 in ScSimpleFormulaCalculator::GetErrCode() () from /opt/libreoffice5.2/program/../program/libsclo.so
#5  0x00007fffbb749c2f in ScFormulaDlg::calculateValue(rtl::OUString const&, rtl::OUString&, bool) () from /opt/libreoffice5.2/program/../program/libsclo.so
#6  0x00007fffbac74590 in formula::FormulaDlg_Impl::CalcStruct(rtl::OUString const&, bool) () from /opt/libreoffice5.2/program/../program/libforuilo.so
#7  0x00007fffbac75e8b in formula::FormulaDlg_Impl::Update(rtl::OUString const&) () from /opt/libreoffice5.2/program/../program/libforuilo.so
#8  0x00007fffbb74aac5 in ScFormulaDlg::ScFormulaDlg(SfxBindings*, SfxChildWindow*, vcl::Window*, ScViewData*, formula::IFunctionManager*) () from /opt/libreoffice5.2/program/../program/libsclo.so
#9  0x00007fffbb9f42b1 in ScTabViewShell::CreateRefDialog(SfxBindings*, SfxChildWindow*, SfxChildWinInfo*, vcl::Window*, unsigned short) () from /opt/libreoffice5.2/program/../program/libsclo.so
#10 0x00007fffbb9bc3b5 in ScFormulaDlgWrapper::ScFormulaDlgWrapper(vcl::Window*, unsigned short, SfxBindings*, SfxChildWinInfo*) () from /opt/libreoffice5.2/program/../program/libsclo.so
#11 0x00007fffbb9bc4e6 in ScFormulaDlgWrapper::CreateImpl(vcl::Window*, unsigned short, SfxBindings*, SfxChildWinInfo*) () from /opt/libreoffice5.2/program/../program/libsclo.so
#12 0x00007ffff4faef1d in SfxChildWindow::CreateChildWindow(unsigned short, vcl::Window*, SfxBindings*, SfxChildWinInfo&) () from /opt/libreoffice5.2/program/libmergedlo.so
#13 0x00007ffff4ff673d in SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl*, bool) () from /opt/libreoffice5.2/program/libmergedlo.so
Comment 4 Xisco Faulí 2017-01-30 23:51:37 UTC
@Julien,
Are you able to reproduce the crash locally ?
Comment 5 Julien Nabet 2017-01-31 20:04:11 UTC
(In reply to Xisco Faulí from comment #4)
> @Julien,
> Are you able to reproduce the crash locally ?

No I had just extracted the bt because it was on tar.gz
I don't know how to test SDK related bugtrackers.
Comment 6 Buovjaga 2017-02-05 12:23:29 UTC
(In reply to jeanmarczambon from comment #0)
> or (with the same extension installed :
> 
> - open a new calc document
> - open the function wizard
> - choose the COUNTER() function and enter a name
> - LibO crashes as soon as the closing quote is typed in.

No crash here.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 1bdef25291dea612305fa2cb8dd806466aa97773
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 4th 2016
Comment 7 Xisco Faulí 2017-11-01 23:25:25 UTC
Dear Reporter,
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 8 jeanmarczambon 2017-11-05 16:39:17 UTC
I just try with LibO 5.4.2.2 (Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4): bug is still present.
Comment 9 Xisco Faulí 2018-11-26 19:17:16 UTC
(In reply to jeanmarczambon from comment #8)
> I just try with LibO 5.4.2.2 (Build ID:
> 22b09f6418e8c2d508a9eaf86b2399209b0990f4): bug is still present.

Do you still get the crash with 6.1.3.2 ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 10 QA Administrators 2019-05-26 02:52:59 UTC Comment hidden (obsolete)
Comment 11 jeanmarczambon 2019-05-26 07:39:16 UTC
My first message could have been a little bit unclear. Actually, the bug is not related to the sdk. I took the example addin from it, has it was supposed to be functional.

I've tested on LibO 6.2.2.2, the program still crashes following these steps :
1. install the ExampleAddin.oxt attached to the first message and let the office restart;
2. in Calc, open the function wizard and double-clic on the COUNTER function under the AddIn category;
3. enter a value in the Name argument field, i.e. "abc".

LibreOffice crashes. OpenOffice does not.

Thanks for all.
Comment 12 Julien Nabet 2019-05-28 09:50:23 UTC
Created attachment 151731 [details]
bt with debug symbols (gtk3)

On pc Debian x86-64 with master sources updated today + oxt provided I could reproduce the crash
Comment 13 Eike Rathke 2019-05-31 17:08:48 UTC
Taking.
Comment 14 Commit Notification 2019-06-01 00:27:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#101473 handle volatile Add-In results without formula cell

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.
Comment 15 Commit Notification 2019-06-01 00:27:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves: tdf#101473 handle volatile Add-In results without formula cell

It will be available in 6.3.0.1.

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 16 Eike Rathke 2019-06-01 00:29:01 UTC
Pending review https://gerrit.libreoffice.org/73300 for 6-2
Comment 17 Commit Notification 2019-06-01 02:08:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

Resolves: tdf#101473 handle volatile Add-In results without formula cell

It will be available in 6.2.5.

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.