Bug 121143 - LibreOffice sends "your system has crashed" message if "Close Application" event is defined
Summary: LibreOffice sends "your system has crashed" message if "Close Application" ev...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2018-11-03 11:57 UTC by Andreas
Modified: 2018-11-08 15:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2018-11-03 11:57:49 UTC
Description:
On starting LibreOffice the application shows message "It seems that LibreOffice crashed when it 
was last run" at the end of the loading process. But program runs without any further problems.

This behavior is a matter of assigning a macro to the "close application" event.

Steps to Reproduce:
1. Deactivate the user profile by renaming it, so LibreOffice creates a fresh one.
2. Create a macro module "mAuto".
3. Within that module create a procedure "pExit"
("Sub pExit
End Sub")
4. In menu "Extras - customize - events" assign the macro procedure to event "close application".
5. Close LibreOffice and open it again.


Actual Results:
At the end of the loading processs message occurs: "It seems that LibreOffice crashed when it was last run".


Expected Results:
Not such message, as LibreOffice didn't crashed after last run.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
The bug is restricted to the Close Apllication event. That is, assigning a macro to event "start application" doesn't result in the misbehaviour.

LibO 5.4.7.2, and still
LibO 6.2.0.0.alpha1 (Build ID: ff46ad24d1d3cbcea45895520483ed1fd4ff488b),
both on Linux Mint 18.3 Cinnamon 3.6.7 64-bit,
Linux Kernel 4.10.0-38-generic, Intel Core i5-4200U CPU 1.60 GHz x 2.
Comment 1 Xisco Faulí 2018-11-03 13:13:56 UTC
I can't reproduce it in

Version: 6.2.0.0.alpha1+
Build ID: 5929d8ea469a971aa77371ed4b841c90a36e7da5
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded
Comment 2 Xisco Faulí 2018-11-03 13:15:16 UTC
Oh wait, I get a Application Error in the console...
Comment 3 Xisco Faulí 2018-11-03 13:22:42 UTC
Reproduced in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

but not in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 Mike Kaganski 2018-11-03 14:07:01 UTC
https://gerrit.libreoffice.org/62810
Comment 5 Mike Kaganski 2018-11-03 14:08:26 UTC
@Xisco Faulí: still, if you had a bibisect results, it could be useful (I'm not entirely sure in the proposed change).
Comment 7 Commit Notification 2018-11-05 19:08:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/ba796f2cddb8e63e1ec99e5c32b71d86fdf8e7d6%5E%21

tdf#121143: don't send OnCloseApp twice; properly cleanup AppBasicManager

It will be available in 6.2.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.
Comment 8 Mike Kaganski 2018-11-05 19:09:53 UTC
Hopefully this is the proper fix.
Comment 9 Xisco Faulí 2018-11-08 15:43:18 UTC
No longer get a crash in

Version: 6.2.0.0.alpha1+
Build ID: 1cfa1d9e1041b0e82d9be90847c428adfd01476e
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Mike Kaganski, thanks for fixing this!