Created attachment 119828 [details] Demo as mentioned in the bug description Steps to reproduce the bug: 1. Create a new Calc document with V4.4.4 or higher. 2. Enter 1, =NA(), and =PI() into A1, B1, C1 respectively. 3. Type =IFERROR(A1:C1;"Error!") into A2 and enter this as an array-formula (Ctrl+Shift+Enter). Expected result: 1, #N/A, 3,1415926536 displayed in A2:C2 consecutively. Actual result: 1, #N/A, #NA in the respective cells. The attached erxample is also demonstrating slightly extended examples and the complications to be accepted using a workaround (redundant calculation again which to avoid IFERROR was invented for). The bug is partly debasing the IFERROR function concerning its intention to avoid redundant (second) evaluation.
1. The description, 'Actual result:', third position should read #N/A (instead of #NA). 2. Just tested Calc version 4.1.5.3 release to the same result. Version changed to 4.1.5.3 release
Investigating.
Actually the results should be 1, "Error!", 3.1415... which they are if values entered in A1:A3 and IFERROR(A1:A3,...) as array formula.
@Eike Rathke You are right with the result o be expected; (I wrongly accepted an #N/A): 1, Error, 3,1415926536 In my demo exactly this result is produce in rows 9 and 18 using an array formula NOT relying on IFERROR. The basical example in row 2 is displaying the WRONG result. 1, #N/A, #N/A So do the examples in rows 8 and 17. In rows 2, 8, 17 the IFERROR function is used under array evaluation.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=968e2faff6d4283dacd9010d31cb4c0df45eb7c5 Resolves: tdf#95226 fix broken IFERROR/IFNA array logic It will be available in 5.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.
Pending review https://gerrit.libreoffice.org/19519 for 5-0 https://gerrit.libreoffice.org/19520 for 5-0-3
https://gerrit.libreoffice.org/19522 for 4-4 https://gerrit.libreoffice.org/19523 for 4-4-6
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3e06388b686e1c4f8547787baababf7ec1d0eec8 unit test for tdf#95226 It will be available in 5.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.
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=748ff17f7780232729d60ef764b0f2995b887b22&h=libreoffice-4-4 Resolves: tdf#95226 fix broken IFERROR/IFNA array logic It will be available in 4.4.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e5314175b3860d2416840e1008305d3f91cee91a&h=libreoffice-5-0 Resolves: tdf#95226 fix broken IFERROR/IFNA array logic It will be available in 5.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-0-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5154b77b88c1b95afb0b2399e765bb3cad9f89fe&h=libreoffice-5-0-3 Resolves: tdf#95226 fix broken IFERROR/IFNA array logic It will be available in 5.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-4-4-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7dcd3a825ce521dc799cd5794c938a6d62276160&h=libreoffice-4-4-6 Resolves: tdf#95226 fix broken IFERROR/IFNA array logic It will be available in 4.4.6. 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.
Tests repeated with V5.03. Patch works for me. Thanks!
Fix appears to be incomplete. New document attached that shows both a working and broken example (tested Win-X64 in 5.1.2 and 2016-03-07 daily). The file has had all formulas not related to the problem removed but I don't understand enough about the problem to narrow the test case further than that. The file is intended to keep track of materials collected in a particular video game and tell you what's currently available for you to craft and for which characters. There are two sheets for searching the data, one lists all uncrafted badges for a specified material, the other lists all uncrafted badges for a specified character. Both searches work in a similar way: an array calculation produces a list of results and SMALL() is used to incrementally display the values returned. Depending on the search eventually SMALL() will run out of values and #VALUE! will be returned instead. IFERROR() is used to catch that and return an empty string but this only works on the material search; on the character search IFERROR() lets the #VALUE error through. Steps to reproduce: 1. Open the attached document to either the "Material Search" or "Character Search" sheets. 2. Adjust the search value in the grey cell. Expected Result: In both searches the formula exists in A3:A100. On both searches the Index column should display an incrementing number of results that can later be used to populate the remaining columns of the search. IFERROR() should ensure blank results after all the search matches have been listed. Actual Result: The Material search sheet works as expected. The Character search sheet instead shows #VALUE! up to cell A100 once search results have been exhausted.
Created attachment 123394 [details] new example of problem still occurring in some cases
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=62b40429946c0e5021912072dc79a60fc11fce06 Resolves: tdf#95226 second case, stack error count in JumpMatrix context It will be available in 5.2.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.
Pending review https://gerrit.libreoffice.org/23089 for 5-1 https://gerrit.libreoffice.org/23091 for 5-0
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ac4560a37dacfa4fee60e36d1b3de7790b81dc20&h=libreoffice-5-1 Resolves: tdf#95226 second case, stack error count in JumpMatrix context It will be available in 5.1.2. 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.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=070fbda4edafb27c91c856039880099014f2b53f&h=libreoffice-5-0 Resolves: tdf#95226 second case, stack error count in JumpMatrix context It will be available in 5.0.6. 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.
Retested on latest daily build. Looks all fixed here. Thanks.