Bug 105871 - Save and Quit crash (Mac OS X)
Summary: Save and Quit crash (Mac OS X)
Status: RESOLVED DUPLICATE of bug 103690
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 04:57 UTC by mkhaw
Modified: 2017-05-04 07:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
quit crash Document Recovery dialog window (133.98 KB, image/png)
2017-02-09 17:03 UTC, mkhaw
Details
sample saved Calc document (7.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-09 17:06 UTC, mkhaw
Details
LibreOffice sample Calc document with unsaved change (7.43 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-09 17:07 UTC, mkhaw
Details
Document Recovery dialog shown at post-crash launch (136.06 KB, image/png)
2017-02-09 17:08 UTC, mkhaw
Details
output from Activity Monitor's "Sample Process" on hung LO (98.11 KB, text/plain)
2017-04-24 17:46 UTC, mkhaw
Details
Mac Energy Saver Preference Pane, Battery settings (245.22 KB, image/png)
2017-04-28 16:07 UTC, mkhaw
Details
Mac Energy Saver Preference Pane, Power Adapter settings (268.67 KB, image/png)
2017-04-28 16:08 UTC, mkhaw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mkhaw 2017-02-09 04:57:04 UTC
This is happening on macOS 10.12.3 with all available Software Updates applied, lots of free RAM and free disk space.

When 2 or more Calc windows are open and one or more have changes, quitting Libreoffice results in a dialog saying that Libreoffice crashed and asking if document recovery should be attempted. However, at this point the app is hung (spinning blue ball of death) and does not respond to clicks on the dialog, and must be force quit from the Dock. On subsequent launch, it asks again to attempt document recovery and successfully completes if asked to do so.

In contrast, if the Calc windows are closed so that only 1 (whether or not it needs to save changes to disk) or zero windows are left before quitting, there is no problem quitting.

Unknown if this affects other modules such as Write, Draw, etc., as I use LibreOffice almost exclusively for Calc.
Comment 1 Alex Thurgood 2017-02-09 09:15:43 UTC
@mkhaw: please be more specific and detailed :

- you mention that one of the sheets contains changes - did you save before attempting to quit, or did you just try and quit LibreOffice ? Does it always happen irrespective of the changes you made ?

- were the Calc documents opened as tabs ? (OSX Dock preference) ?
- were you working in fullscreen mode ?

In other words, please provide detailed, step by step reproducible description of how the crash occurs, and preferably also sample Calc documents, if these are deemed to be the root cause of the issue
Comment 2 mkhaw 2017-02-09 17:03:54 UTC
Created attachment 131047 [details]
quit crash Document Recovery dialog window
Comment 3 mkhaw 2017-02-09 17:06:18 UTC
Created attachment 131048 [details]
sample saved Calc document
Comment 4 mkhaw 2017-02-09 17:07:13 UTC
Created attachment 131049 [details]
LibreOffice sample Calc document with unsaved change
Comment 5 mkhaw 2017-02-09 17:08:03 UTC
Created attachment 131050 [details]
Document Recovery dialog shown at post-crash launch
Comment 6 mkhaw 2017-02-09 17:13:57 UTC
I recreated the problem as follows:

1) Launch LibreOffice (just the app itself, w/o opening any document)
2) Choose File->Spreadsheet twice to open 2 new Calc documents (neither is full-screen)
3) Type something into one cell in each of the 2 new documents
4) Save each document (without closing its window)
5) Type something into a cell in one document (so that it has an unsaved change)
6) Type cmd+Q to quit LibreOffice: the attached dialog ("quit crash Document Recovery dialog") results, with a spinning rainbow ball-o-death. I have to Force Quit from the Dock.

Note that Untitled 1.ods had been saved and had no unsaved changes at quit; while Untitled 2.ods had an unsaved change. If I’d closed either one so that only one open document window remained on screen, the quit would have succeeded without a crash.

For completeness, attached are Untitled 1.ods and Untitled 2.ods, though you can see they are quite trivial.

On the next launch of LibreOffice (whether by opening a document or just the application itself), the attached "Document Recovery dialog shown at post-crash launch" appears. LibreOffice then proceeds normally whether I click Discard or Start in the dialog window.
Comment 7 Alex Thurgood 2017-02-10 14:38:25 UTC
No repro with
Version: 5.2.5.1
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
Threads CPU : 8; Version de l'OS :Mac OS X 10.12.3; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 8 Alex Thurgood 2017-02-10 16:19:04 UTC
No repro with 

Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Threads CPU : 8; Version de l'OS :Mac OS X 10.12.3; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

I get asked to save the document, which LO does, and then the app quits - no hang, no crash, no automatic document recovery.
Comment 9 Alex Thurgood 2017-02-13 08:10:54 UTC
There is something we are missing here, as I can't reproduce on my test system, some software setting or hardware difference.

mkhaw : 
- what is your screen resolution ?
- are you connected to an external monitor ? 
- what colour profile are you using ?
- which graphics chip(s) is(are) being used when LO runs ? (some Mac units have 2 graphics chips, an integrated circuit and a dedicated circuit)
Comment 10 mkhaw 2017-02-13 16:24:08 UTC
My hardware is 12" Retina MacBook (early 2015)

- what is your screen resolution ?
2304 x 1440 (226 dpi Retina display)
- are you connected to an external monitor ? 
No
- what colour profile are you using ?
Color LCD (default)
- which graphics chip(s) is(are) being used when LO runs ? (some Mac units have
2 graphics chips, an integrated circuit and a dedicated circuit)
Mac has Intel HD Graphics 5300 1536 MB
Comment 11 Alex Thurgood 2017-02-17 10:42:11 UTC
(In reply to mkhaw from comment #10)
> My hardware is 12" Retina MacBook (early 2015)
> 
> - what is your screen resolution ?
> 2304 x 1440 (226 dpi Retina display)
> - are you connected to an external monitor ? 
> No
> - what colour profile are you using ?
> Color LCD (default)
> - which graphics chip(s) is(are) being used when LO runs ? (some Mac units
> have
> 2 graphics chips, an integrated circuit and a dedicated circuit)
> Mac has Intel HD Graphics 5300 1536 MB

What, if any, energy saving settings (OSX System Prefs > Energy Saving  do you have ?
Comment 12 mkhaw 2017-02-17 19:23:40 UTC
Energy Saver settings

on Battery
Turn display off after: 10 min
Put hard disks to sleep when possible: ON
Slightly dim the display while on battery power: OFF
Enable Power Nap while on battery power: ON

on Power Adapter
Turn display off after: 10 min
Prevent computer from sleeping automatically when the display is off: OFF
Put hard disks to sleep when possible: ON
Wake for Wi-Fi network access: ON
Enable Power Nap while plugged into a power adapter: ON

Same crash-on-quit behavior observed whether running on battery alone or with AC power connected
Comment 13 Alex Thurgood 2017-04-07 07:51:13 UTC
@mkhaw : have you tried starting LO with a fresh LO user profile ?

Alternatively, have you tried restarting LO in "safe mode" (LibreOffice application menu > Help > Restart in safe mode ?
Comment 14 mkhaw 2017-04-07 20:53:17 UTC
Opens and quits successfully in Safe Mode.

In Safe Mode, I Reset to Factory Settings, checking both boxes: (a) Reset settings and user interface modifications, and (b) Reset entire user profile; then clicked Apply Changes and Restart.

I opened the 2 Calc documents, made a change in one and Quit, and got the same crash again.
Comment 15 Buovjaga 2017-04-17 17:01:09 UTC
(In reply to mkhaw from comment #14)
> Opens and quits successfully in Safe Mode.

I can't think of anything except Tools - Options - View - Disable "Use hardware acceleration".
Comment 16 mkhaw 2017-04-17 18:30:57 UTC
"Use hardware acceleration" is NOT enabled, and in fact is greyed-out so I can't even enable it.
Comment 17 Alex Thurgood 2017-04-24 09:13:32 UTC
Ideally, we'd need a backtrace of a debug build at the time a crash occurs.

mkhaw : does the Apple crash reporter ever get started and produce a report ? Having this would at least be a help in trying to see what might be causing the problem.
Comment 18 Alex Thurgood 2017-04-24 09:16:07 UTC
mkhaw : just another thought - you indicate that you are using 5303 - is this LibreOffice Vanilla from the AppStore, or LibreOffice DMG downloaded from the TDF website ?
Comment 19 mkhaw 2017-04-24 17:36:55 UTC
I downloaded LO from TDF website.

I just induced a crash-by-quit 5 minutes ago, the LO Crash Recovery dialog popped up, immediately followed by the spinning beach ball. Activity Monitor shows LO to be "Not Responding" with CPU usage fluctuating around 70%, and slowly increasing counts for context switches, page faults and Unix system calls. Memory load remains unchanging.

I just Force Quit LO from the Dock: there's no system crash reporter dialog.
Comment 20 mkhaw 2017-04-24 17:46:40 UTC
Created attachment 132800 [details]
output from Activity Monitor's "Sample Process" on hung LO
Comment 21 mkhaw 2017-04-24 17:47:26 UTC
Output from Activity Monitor's "Sample Process" on hung LO (soffice) process attached
Comment 22 Alex Thurgood 2017-04-28 09:03:22 UTC
@mkhaw : you don't have an option "Automatic graphics switching" under Energy Saver in the General System Preferences by any chance ?
Comment 23 mkhaw 2017-04-28 16:07:55 UTC
Created attachment 132941 [details]
Mac Energy Saver Preference Pane, Battery settings
Comment 24 mkhaw 2017-04-28 16:08:33 UTC
Created attachment 132942 [details]
Mac Energy Saver Preference Pane, Power Adapter settings
Comment 25 mkhaw 2017-04-28 16:09:45 UTC
My Mac's Energy Saver Preference Pane doesn't have "Automatic graphics switching" as an option. See the attached window captures
Comment 26 Alex Thurgood 2017-05-03 08:44:28 UTC
@mkhaw:

If you start LibreOffice from a terminal with :

/Applications/LibreOffice/Content/MacOS/soffice

do you still get a crash ?
Comment 27 mkhaw 2017-05-03 16:23:41 UTC
@Alex Thurgood

No crash when started from Terminal as

/Applications/LibreOffice/Content/MacOS/soffice filename1.ods filename2.ods

Spotlight finds only 1 instance of LibreOffice, and it's the one in /Applications. What's the distinction between launching via command line vs. double-clicking in Finder?
Comment 28 Alex Thurgood 2017-05-04 07:38:56 UTC
(In reply to mkhaw from comment #27)
> @Alex Thurgood
> 
> No crash when started from Terminal as
> 
> /Applications/LibreOffice/Content/MacOS/soffice filename1.ods filename2.ods
> 
> Spotlight finds only 1 instance of LibreOffice, and it's the one in
> /Applications. What's the distinction between launching via command line vs.
> double-clicking in Finder?

Setting as Duplicate of 103690
The problem appears to be some kind of synchronisation issue, per comment 10 and comment 21 of that bug report.

*** This bug has been marked as a duplicate of bug 103690 ***