Bug 116100 - MATCH applied to a search array introduced by an OFFSET subexpression results in Err:504.
Summary: MATCH applied to a search array introduced by an OFFSET subexpression results...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2018-03-01 00:36 UTC by Wolfgang Jäger
Modified: 2018-03-28 23:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The demo mentioned in the text (16.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-03-01 00:36 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2018-03-01 00:36:46 UTC
Created attachment 140235 [details]
The demo mentioned in the text

A formula like =MATCH($B$3;OFFSET($C$3;G3:G8;H3:H8;1;1);0) fails returning Err:504.
The OFFSET subexpression turned into the formula =OFFSET($C$3;G3:G8;H3:H8;1;1) elswhere returns the expected array, however.

Conclusion: MATCH does not correctly accept a search array returned by an OFFSET expression under (iterative) array-evaluation due to arrays on the second and the third parameter position. 

Older versions evaluate expressions of the mentioned kind correctly as expected.

I came about this trying to answer a user question about searching in 2D-arrays in a forum. I tried to reactivate older examples using formulae of the kind that had worked but did no longer.

A reduced example is attached.
Comment 1 Jacques Guilleron 2018-03-02 07:15:34 UTC
Hi Wolfgang,

I reproduce with
LO 6.1.0.0.alpha0+ Build ID: 3c913c3844acae8ee0d80ab174133bdc7677efea
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-02-14_00:19:27
Locale: en-US (fr_FR); Calc: CL
LO 6.0.0.0.alpha0+ Build ID: 9e4502f0e393d2bc2810488b3ebb0a5c23038436
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-16_08:52:00
Locale: fr-FR (fr_FR); Calc: CL
but not with
LO 5.4.4.2 Build ID: 2524958677847fb3bb44820e40380acbe820f960
Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: CL

Thank you to have reported it.
Comment 2 Xisco Faulí 2018-03-05 18:06:44 UTC
Regression introduced by:

author	Eike Rathke <erack@redhat.com>	2017-05-19 21:44:17 +0200
committer	Eike Rathke <erack@redhat.com>	2017-05-22 11:00:56 +0200
commit b086633566cbcc5e73add5d195ce0ab207ea8f7c (patch)
tree c5a1eb9c17e4c3a0942dbee30ba996d75ac50224
parent 3a3064fcb4778b050398d98598d6ed61e8298134 (diff)
Create RefList at JumpMatrix if current function returns Reference, tdf#58874

Bisected with: bibisect-linux64-6.0

Adding Cc: to Eike Rathke
Comment 3 Eike Rathke 2018-03-06 14:08:57 UTC
Taking.
Comment 4 Eike Rathke 2018-03-06 18:06:22 UTC
Committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#116215 fewer array of references cases, tdf#58874 related

(note wrong bug number)

It will be available in 6.1.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 5 Eike Rathke 2018-03-06 18:40:49 UTC
Pending review https://gerrit.libreoffice.org/50842 for 6-0
Comment 6 Commit Notification 2018-03-21 11:29:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b52ca1a7cf9e3652ebd433753b6642b6f5124d1f&h=libreoffice-6-0

Resolves: tdf#116100 fewer array of references cases, tdf#58874 related

It will be available in 6.0.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 7 Jacques Guilleron 2018-03-21 11:43:01 UTC
Hi all,

Works fini with
LO  6.1.0.0.alpha0+ Build ID: 0d1479cbd442c3ec3bdd20333c341ea24dcca21e
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-10_01:47:26
Locale: fr-FR (fr_FR); Calc: CL

Thank you Eike.
Comment 8 Commit Notification 2018-03-28 21:54:48 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f0705b5037fefec43fcf234127b3d1fd84f846f&h=libreoffice-6-0-3

Resolves: tdf#116100 fewer array of references cases, tdf#58874 related

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