Created attachment 133368 [details] Sample XLSM that gives error in Calc when run Open the attached Excel spreadsheet with a simple macro, and run the macro. Execution fails with error: "BASIC runtime error. '1' Type: com.sun.star.lang.WrappedTargetRuntimeException Message: non-RuntimeException occurred when accessing an interface type attribute" There's no error message if the first line of the macro is changed - from: Range("A1").Select - to: Range("A1:A5").Select In Excel the macro runs fine in both cases. Occurs in 5.4 master build (68a1cb23ede1d4ae6195850190fca6953c30417f) / Windows 7, doesn't occur in 5.2.0.4. => regression
fe6991c23eaaf231bd985b6d2ab89a3ac034545f is the first bad commit commit fe6991c23eaaf231bd985b6d2ab89a3ac034545f Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Fri Aug 19 12:04:26 2016 -0700 source 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92 # bad: [a374222bc87bd9e75ea2f1ca45d189932a1967f8] source aa09fd58bd499a2a2c3a32c5f613892bad54076c # good: [defb73f1c6e2a66dbd21ba89e684f57427e8bc4b] source 5b168b3fa568e48e795234dc5fa454bf24c9805e git bisect start 'a374222bc87bd9e75ea2f1ca45d189932a1967f8' 'oldest' # bad: [0b4408f0568ad1da0797543c0ee2955c386267ee] source 8f7886c742cae5e012e52029c20925aa7b0fb6ea git bisect bad 0b4408f0568ad1da0797543c0ee2955c386267ee # good: [16b554fa5f3a3d2723e78d894d644ac9303a7991] source 50a6f3d51f32e7176c3b2d036c60bb48d51d6a1a git bisect good 16b554fa5f3a3d2723e78d894d644ac9303a7991 # good: [1d5414e6dc71de667a2e7457f4a169c3575a4a70] source f16c803e7f5186632adeffc2dad579cf2c720b15 git bisect good 1d5414e6dc71de667a2e7457f4a169c3575a4a70 # bad: [5bb9715859cfd0334a6036b5990f659ce6712184] source f82e4c18f0af898725fcb4e2040a4ea4f0461fa7 git bisect bad 5bb9715859cfd0334a6036b5990f659ce6712184 # good: [c20f4971b559c6ae8859524493cd4e0700e1c845] source f2afe318ce800c1b301f7e1aef769194aa676b12 git bisect good c20f4971b559c6ae8859524493cd4e0700e1c845 # bad: [6ccf273eaf66dddca4cfe64c9dc4e5d750c0b86c] source 55b4ca8b5e7283aafc7a539b629dc4c3dad8fb51 git bisect bad 6ccf273eaf66dddca4cfe64c9dc4e5d750c0b86c # bad: [6787dce0e6e5636658b5d8e7335151e673917826] source d33412979a2efe023a9bbaea4c70822c8a443f95 git bisect bad 6787dce0e6e5636658b5d8e7335151e673917826 # bad: [2fecdf60f51b023baff0354cf22ce9aef210f8a8] source 93295a069b9ccccd6fa4da78a6b1ae98c63940f0 git bisect bad 2fecdf60f51b023baff0354cf22ce9aef210f8a8 # good: [7eb3c383e76dcf598c6c49156a0922f6724967ba] source bfbd66f151002af6f65b9c062cc511797690e625 git bisect good 7eb3c383e76dcf598c6c49156a0922f6724967ba # good: [ac8b29a7c60eb642f867370ea9b7daae8655ff4b] source 7a31ae209304730e06e1f33333ebc81e7c7b5de9 git bisect good ac8b29a7c60eb642f867370ea9b7daae8655ff4b # bad: [fe6991c23eaaf231bd985b6d2ab89a3ac034545f] source 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92 git bisect bad fe6991c23eaaf231bd985b6d2ab89a3ac034545f # good: [45cd08b57c4ca17c536650256ab8038f327ac95a] source e527edf06f8befb45b76ee8ebabe62e6dc885e45 git bisect good 45cd08b57c4ca17c536650256ab8038f327ac95a # good: [f45c7f1a4528ed75f559214e1d85745c8f7b1c2f] source b6011f07254f8003929320ad842d8d09daca0e09 git bisect good f45c7f1a4528ed75f559214e1d85745c8f7b1c2f # first bad commit: [fe6991c23eaaf231bd985b6d2ab89a3ac034545f] source 4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92
The issue started with the commit referenced below. Seems like the issue is with determining whether the autofiltered column includes a header or not. Even if there is no error, the first cell is among the autofiltered entries, while before the commit it isn't. https://cgit.freedesktop.org/libreoffice/core/commit/?id=4cd9e45a439b654c8e1ff7983fe7e4bd073b9c92 author Yan Pashkovsky <yanp.bugz@gmail.com> 2016-08-12 20:39:30 (GMT) committer Eike Rathke <erack@redhat.com> 2016-08-18 13:50:30 (GMT) "tdf#91305 fix sort calc"
Confirmed in Version: 5.4.0.0.alpha1+ Build ID: 74d2e606fd3605fe0a585f596eaa215ae4e20d18 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Locale: fo-FO (ca_ES.UTF-8); Calc: group @Eike, would you mind taking a look at it when you have some time ?
I couldn't reproduce it. Method 'HasColHeader()' is not called in AutoFilter because of this patch: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7e728965b3f5a37a6f0bd75d616d2acb16c40f71
Verified there's no error in the following daily build anymore: 2017-08-15_01:59:49 (bebaac5eb6ebd2db3e1ea22b1630111343a9c25c) / Windows 7.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/88424a4adca388c8708b164751a4144a62814224 tdf#107902: sc_macros_test: Add unittest It will be available in 7.1.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.