Bug 88672 - SUMIFS causes crash if contains links to other CALC files
Summary: SUMIFS causes crash if contains links to other CALC files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Eike Rathke
URL:
Whiteboard: target:4.5.0 target:4.4.3 target:4.3.7
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2015-01-21 17:59 UTC by giuvi
Modified: 2015-04-03 01:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
error logfile generated fron JRE on LO crash (153.74 KB, text/plain)
2015-01-21 17:59 UTC, giuvi
Details
gdbtrace (2.51 KB, application/zip)
2015-01-21 22:43 UTC, raal
Details
Sample ODS (7.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-03-31 06:54 UTC, Matthew Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giuvi 2015-01-21 17:59:11 UTC
Created attachment 112614 [details]
error logfile generated fron JRE on LO crash

How to produce the error
1. Edit function SUMIF, where sum range and range x refer to an other LO spreadsheet. 
2. LO crashes after you posted the formula or, if you use the function wizard, after you entered the external reference for range 1
3. JRE generates an error logfile (see attach)


Current behavior:
as described above 

Expected behavior:
SUMIFS should calculate the value or give an error. 

Additional Information:
1. I tried comparing the behavior of SUMIFS (with only one range) and SUMIF. While SUMIF give a value back (the correct one), SUMIFS causes the crash.
Comment 1 raal 2015-01-21 22:43:17 UTC
I can confirm with Version: 4.5.0.0.alpha0+
Build ID: 60143f4f7bc50054dcef923218b8c7c3bc154933
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-21_04:58:34

Program received signal SIGSEGV, Segmentation fault.
0x00007fffaf5580e0 in ScMatrix::GetDimensions(unsigned long&, unsigned long&) const () from /opt/libreofficedev4.5/program/../program/libsclo.so
(gdb)
Comment 2 raal 2015-01-21 22:43:37 UTC
Created attachment 112619 [details]
gdbtrace
Comment 3 Matthew Francis 2015-03-31 06:51:28 UTC
Not a regression as such, but a bug which has existed since SUMIFS was first implemented in the below commit


commit f2cb873631b8b21b54a55beaba532f4bd616a9c6
Author:     Marina Plakalovic <makkica@openoffice.org>
AuthorDate: Fri Dec 14 23:40:18 2012 +0100
Commit:     Eike Rathke <erack@redhat.com>
CommitDate: Sat Dec 15 21:42:39 2012 +0100

    calcishmakkica: #i90269# #i95144# #i101466# implement SUMIFS, AVERAGEIFS, COUNTIFS
    
    Merged from Apache OO with adaptions.
    http://svn.apache.org/viewvc?rev=1381447&view=rev
    Original Apache OO committer: Andrew Rist <arist@apache.org>
    
    Original Author: Marina Plakalovic <makkica@openoffice.org>
    Original Committer: Eike Rathke [er] <eike.rathke@oracle.com>
Comment 4 Matthew Francis 2015-03-31 06:54:46 UTC
Created attachment 114484 [details]
Sample ODS
Comment 5 Matthew Francis 2015-03-31 06:58:57 UTC
Specific reproduction instructions:

- Open attachment 114484 [details]
- Create a second, blank spreadsheet and save it
- Select cell A5 of the sample (attachment 114484 [details]) and open the function wizard (the "fx" button)
- Click the select range button for "sum_range"
- Click on A1 in the blank spreadsheet, and press return
Comment 6 Eike Rathke 2015-04-01 16:14:48 UTC
Taking.
Comment 7 Commit Notification 2015-04-01 16:46:40 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#88672 add missing return if error to not crash

It will be available in 4.5.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 8 Eike Rathke 2015-04-01 17:02:00 UTC
Pending review
https://gerrit.libreoffice.org/15111 for 4-4
https://gerrit.libreoffice.org/15112 for 4-3
Comment 9 Commit Notification 2015-04-03 01:52:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

Resolves: tdf#88672 add missing return if error to not crash

It will be available in 4.4.3.

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 10 Commit Notification 2015-04-03 01:54:08 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=035764904eed82610e30ae557e568bb3c04286bf&h=libreoffice-4-3

Resolves: tdf#88672 add missing return if error to not crash

It will be available in 4.3.7.

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.