Bug 115707 - Crash in: cppu::_copyConstructAny(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *)
Summary: Crash in: cppu::_copyConstructAny(_uno_Any *,void *,_typelib_TypeDescriptionR...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-VBA Crash
  Show dependency treegraph
 
Reported: 2018-02-14 09:13 UTC by dimagsv
Modified: 2022-05-21 05:35 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["cppu::_copyConstructAny(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *)"]


Attachments
file with macros (705.48 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-02-14 09:13 UTC, dimagsv
Details
image1 for step-3-to-reproduce (13.74 KB, image/png)
2018-02-14 10:27 UTC, dimagsv
Details
image2 for step-4-to-reproduce (11.10 KB, image/png)
2018-02-14 10:28 UTC, dimagsv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dimagsv 2018-02-14 09:13:22 UTC
Created attachment 139892 [details]
file with macros

This bug was filed from the crash reporting server and is br-0e9c2ea9-1d9a-4959-b1e5-765f38e75b22.
=========================================

After opening file and enabling macros libreoffice crashes.
Comment 1 Xisco Faulí 2018-02-14 09:37:55 UTC
I can't reproduce it in

Versión: 6.0.1.1
Id. de compilación: 60bfb1526849283ce2491346ed2aa51c465abfe6
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group

I get a BASIC error in line 423, CollectionUnit

Please provide a clearer set of step-by-step instructions on how to reproduce the problem.
I set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided
Comment 2 dimagsv 2018-02-14 10:25:52 UTC
There crash in 6.0.1.1 too. 

Версия: 6.0.1.1 (x64)
ID сборки: 60bfb1526849283ce2491346ed2aa51c465abfe6
Потоков ЦП: 2; ОС:Windows 6.1; Отрисовка ИП: по умолчанию; 
Локаль: ru-RU (ru_RU); Calc: group

Crash report in 6.0.1.1 release: http://crashreport.libreoffice.org/stats/crash_details/757a17a7-6ebd-4947-9c48-3a61f31e5f71
Crash report in 6.0.0.3 release: http://crashreport.libreoffice.org/stats/crash_details/0e9c2ea9-1d9a-4959-b1e5-765f38e75b22

Steps to reproduce:

1. Start LibreOffice.
2. File - Open - Select file "ppv.xlsm"
3. Press "Enable macros" in Security warning window. (image1.png)
4. Crash, displayed window with "Restoring document LibreOffice". (image2.png)
Comment 3 dimagsv 2018-02-14 10:27:29 UTC
Created attachment 139894 [details]
image1 for step-3-to-reproduce
Comment 4 dimagsv 2018-02-14 10:28:17 UTC
Created attachment 139895 [details]
image2 for step-4-to-reproduce
Comment 5 Telesto 2018-02-14 12:23:39 UTC
No repro (the same as comment 1)
Version: 6.1.0.0.alpha0+
Build ID: 8a0b61172a14b8b766a2e85f27762db3558d3af7
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-02-06_03:28:54
Locale: nl-NL (nl_NL); Calc: CL
Comment 6 dimagsv 2018-02-15 08:21:11 UTC
Tested on LO x86 6.0.1.1 - no crash, only BASIC error in line 423, CollectionUnit.

On old LO x64 5.4.3.2 - no crash at start. But there "BASIC error in line 423, CollectionUnit" and crash right after this, when manually start macros ppv.xlsm -> prepr_rub_NEW.xls -> ThisWorkbook -> Workbook_Open.

I think LO 6.0.1.1 x64 start that macros after file loaded and crash after "BASIC error in line 423, CollectionUnit".

Please, test on windows x64 build.
Comment 7 Aron Budea 2018-02-15 10:45:26 UTC
Crash reproduced with LO 6.0.1.1 x64 / Windows 7.
No crash with LO 5.4.4.2 x64.
=> regression

In Linux there is only a macro error in 6.0, which isn't there in 5.4, so maybe that can be bibisected.
Comment 8 Xisco Faulí 2018-02-15 11:36:27 UTC
The error on Linux started after

author	Tamas Bunth <tamas.bunth@collabora.co.uk>	2017-07-06 10:46:48 +0200
committer	Tamás Bunth <btomi96@gmail.com>	2017-07-06 22:37:12 +0200
commit 5ee6862ee420f13133ade382d7ef2be319414d40 (patch)
tree dc255b1cf96f9e8f99d77c3a92b488af87c938db
parent 388041695d9626970b0d4dce89241c849eeffd0e (diff)
Create vba library if it did not exist before
Add basicLibraries to the library container in the ensure function.
It is needed in case of an xlsm file, because the VBAProject library
was not added by the filter.

Bisected with: bibisect-linux64-6.0

Adding Cc: to Tamas Bunth
Comment 9 Aron Budea 2018-07-09 00:34:15 UTC
The problem is that the last parameter of 'VbaApplicationBase::Run(...)' [1] (which is 'const uno::Any& varg30') is an invalid reference. This only occurs with 64-bit Windows builds.

The crash mentioned in comment 6 is the same, and occurs with versions < 6.0:
http://crashreport.libreoffice.org/stats/crash_details/14534211-f195-4792-adc9-210f44bef13b

It's very likel Tamas' commit resulted in this macro running at start, otherwise there's no indicatino it'd be connected to the crash, especially since the commit isn't present in 5.4, but the crash is.

Removing regression-related keywords.

[1] https://opengrok.libreoffice.org/xref/core/vbahelper/source/vbahelper/vbaapplicationbase.cxx#331
Comment 10 Aron Budea 2018-07-09 00:48:04 UTC
Had a 64-bit 5.1.3.2 installer lying around, and it already crashes when running the macro.
Comment 11 QA Administrators 2019-07-10 02:53:32 UTC Comment hidden (obsolete)
Comment 12 Bhavesh Patel 2020-05-19 18:31:11 UTC
The crash is reproducible as of...

Version: 6.4.3.2 (x64)
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
Comment 13 QA Administrators 2022-05-20 03:40:57 UTC Comment hidden (obsolete)
Comment 14 Aron Budea 2022-05-21 05:35:18 UTC
Still in LO 7.4.0.0.alpha1+ (b2467d6c7af988f8ed4e090ebf9472be6c84fb06) / Windows.