Bug 107920 - Changing conditional format condition through api crashes LibO
Summary: Changing conditional format condition through api crashes LibO
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:5.5.0 target:5.3.4 target:5.4.0.1
Keywords: bibisected, bisected, haveBacktrace
Depends on:
Blocks:
 
Reported: 2017-05-17 19:33 UTC by jeanmarczambon
Modified: 2017-07-10 15:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["forlo.dll"]


Attachments
Simple macro that crashes LibO (9.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-05-17 19:33 UTC, jeanmarczambon
Details
bt with debug symbols (9.29 KB, text/plain)
2017-05-17 21:21 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeanmarczambon 2017-05-17 19:33:34 UTC
Created attachment 133380 [details]
Simple macro that crashes LibO

When trying to change the condition of a conditional format (of whatever type) with macro using the uno api, the program systematically crashes.

You can reproduce with the simple macro embedded in the attached file.
Tested on Linux and Win7 with LibO 5.2 and 5.3, using either basic or python.


A one line error message is displayed on the terminal :
(soffice:12264): GLib-GObject-WARNING **: /build/glib2.0-prJhLS/glib2.0-2.48.2/./gobject/gsignal.c:3486: signal name 'selection_changed' is invalid for instance '0x2f1b800' of type 'OOoAtkObjCompTxt'


The backtrace log :
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
0x00007fffc4e1839a in ScCompiler::NextSymbol(bool) () from /opt/libreoffice5.3/program/../program/libsclo.so
#0  0x00007fffc4e1839a in ScCompiler::NextSymbol(bool) () from /opt/libreoffice5.3/program/../program/libsclo.so
#1  0x00007fffc4e20d48 in ScCompiler::NextNewToken(bool) () from /opt/libreoffice5.3/program/../program/libsclo.so
#2  0x00007fffc4e21b4e in ScCompiler::CompileString(rtl::OUString const&) () from /opt/libreoffice5.3/program/../program/libsclo.so
#3  0x00007fffc5354550 in ScConditionEntryObj::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) () from /opt/libreoffice5.3/program/../program/libsclo.so
#4  0x00007fffb54b772f in (anonymous namespace)::ImplIntrospectionAccess::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) () from /opt/libreoffice5.3/program/libintrospectionlo.so
#5  0x00007ffff4c0034f in SbUnoObject::Notify(SfxBroadcaster&, SfxHint const&) () from /opt/libreoffice5.3/program/libmergedlo.so
#6  0x00007ffff50ad86d in SfxBroadcaster::Broadcast(SfxHint const&) () from /opt/libreoffice5.3/program/libmergedlo.so
#7  0x00007ffff4caa7a3 in SbxVariable::Broadcast(unsigned int) () from /opt/libreoffice5.3/program/libmergedlo.so
#8  0x00007ffff4ca5fbc in SbxValue::Put(SbxValues const&) () from /opt/libreoffice5.3/program/libmergedlo.so
#9  0x00007ffff4ca7225 in SbxValue::operator=(SbxValue const&) () from /opt/libreoffice5.3/program/libmergedlo.so
#10 0x00007ffff4ca961f in SbxVariable::operator=(SbxVariable const&) () from /opt/libreoffice5.3/program/libmergedlo.so
Comment 1 Xisco Faulí 2017-05-17 20:25:57 UTC Comment hidden (obsolete)
Comment 2 Regina Henschel 2017-05-17 21:03:54 UTC
Crashes with Version: 5.4.0.0.alpha1+
Build ID: 965494c544dd8f35ae83b7cf38549009da06c367
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-10_23:06:27
Locale: de-DE (de_DE); Calc: group
Comment 3 Julien Nabet 2017-05-17 21:21:20 UTC
Created attachment 133382 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 4 Xisco Faulí 2017-05-17 21:56:08 UTC
it started to crash after af56ed1ca1e4d37bdef0875757bdee050c35cfef when the condition was changed. Before that the lang::IllegalArgumentException was thrown. I don't consider this a regression.

Bisected with bibisect-50max
Comment 5 Julien Nabet 2017-05-17 22:06:32 UTC
I submitted to review this patch on master:
https://gerrit.libreoffice.org/#/c/37739/
Comment 6 Commit Notification 2017-05-18 11:32:29 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#107920: Crash when using ScCompiler in condformat

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 7 Julien Nabet 2017-05-18 12:29:27 UTC
Branching happened just before the push on master.
For 5.4: https://gerrit.libreoffice.org/#/c/37755/
For 5.3: https://gerrit.libreoffice.org/#/c/37756/
Comment 8 Commit Notification 2017-05-18 13:11:44 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#107920: Crash when using ScCompiler in condformat

It will be available in 5.3.4.

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 Commit Notification 2017-05-18 13:21:22 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=202c5747d23df7fae477f097648135b0bd675c07&h=libreoffice-5-4

tdf#107920: Crash when using ScCompiler in condformat

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