Bug 121822 - Macro execution from macro-assigned draw:custom-shape, involving a Save-as (FILESAVE) and subsequent Reload (FILEOPEN), Close and Reopen original makes application crash
Summary: Macro execution from macro-assigned draw:custom-shape, involving a Save-as (F...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2018-11-30 14:29 UTC by Thijs
Modified: 2023-11-22 03:13 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test sheet and macro that reproduces the crash (1.52 KB, application/x-zip-compressed)
2018-11-30 14:36 UTC, Thijs
Details
Test spreadsheet (16.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-12-01 22:13 UTC, Thijs
Details
Export-Test with form control (17.47 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-12-02 07:41 UTC, Oliver Brinzing
Details
14396a70-0449-468c-9142-4dcae7027223.dmp (125.02 KB, application/octet-stream)
2018-12-02 07:56 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thijs 2018-11-30 14:29:33 UTC
Description:
Context description:
In a macro a sheet is being saved as .CSV, subsequently reloaded, the original spreadsheet re-opened and finally the .CSV sheet closed.
This macro has been assigned to a button in the original spreadsheet.
The Macro resides not in an spreadsheet but in the "My Macros" section
Problem happens under WIN10 and Linux alike and on all computers I possess (laptop, desktop under WIN10 and Suse Linux.

Problem description:
When activating this macro via Tools-Macros-Run Macro... (or ALT-F11 - run macro) everything runs normal and with envisioned result, however ..
When activating this macro via the button in the original spreadsheet that has the macro assigned to it, the application Calc crashes somewhere when re-opening (FILEOPEN) the spreadsheet and closing the CSV to which 1 sheet originally was "saved-as" (FILESAVE).


Steps to Reproduce:
1. Open the simple prepared test sheet with the macro available (*** where can I upload that one via this form? ***)
2. Press the button to which the macro has been assigned
3. Press the OK button on all message boxes shown (after the last one the crash follows)

TO run properly do the same, but start the macro "ThemeExport" via Tools|Macros|Run Macro ..


Actual Results:
Crash

Expected Results:
Original sheet would be opened at the point I called the macro; the exported CSV file contains the exported data


Reproducible: Always


User Profile Reset: No



Additional Info:
See Expected Results: saved the designated sheet as CSV export, reload it, reopen the original spreadsheet, close the open CSV sheet
Comment 1 Thijs 2018-11-30 14:36:30 UTC
Created attachment 147177 [details]
Test sheet and macro that reproduces the crash

The zip file contains the test-sheet, as well as the macro "Theme_Export.bas". This macro must be imported into the "My Macros" area in the macro editor. The button in the sheet must be assigned to this macro prior to running and reproducing the test:
- Button press: crash follows after committing all dialogs
- Run Theme_Export from macro editor: no crash and everything is as expected
Comment 2 Oliver Brinzing 2018-12-01 17:14:50 UTC
(In reply to Thijs from comment #1)
> The zip file contains the test-sheet, as well as the macro

the zip file only contains the *.bas file. 
could you please attach the test-file too?
Comment 3 Thijs 2018-12-01 22:13:39 UTC
Created attachment 147206 [details]
Test spreadsheet

Sorry, picked the wrong file when building the zip. Here is the test spreadsheet for reproducing the crash
Comment 4 Oliver Brinzing 2018-12-02 07:41:07 UTC
confirming crash if macro is called from:

<draw:custom-shape draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P2" 
 svg:width="226.37pt" svg:height="24.41pt" svg:x="0pt" svg:y="0.03pt">
 <office:event-listeners>
   <script:event-listener script:language="ooo:script" 
     script:event-name="dom:click" 
     xlink:href="vnd.sun.star.script:Standard.Module1.ThemeExport?
     language=Basic&amp;location=application" xlink:type="simple"/>
  </office:event-listeners>
  <text:p text:style-name="P1">
   <text:span text:style-name="T1">Shell Script Export Button</text:span>
  </text:p>
  <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" 
      [...]
  </draw:enhanced-geometry>
</draw:custom-shape>

but it will *not* crash, if macro is started via a form control.
Comment 5 Oliver Brinzing 2018-12-02 07:41:40 UTC
Created attachment 147215 [details]
Export-Test with form control
Comment 6 Oliver Brinzing 2018-12-02 07:56:10 UTC
Created attachment 147217 [details]
14396a70-0449-468c-9142-4dcae7027223.dmp

adding *.dmp
Comment 7 QA Administrators 2021-11-21 03:58:29 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2023-11-22 03:13:50 UTC
Dear Thijs,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug