Bug 145843 - Incidental Crash on macOS with skia raster
Summary: Incidental Crash on macOS with skia raster
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.0.0.beta2
Keywords:
: 147302 147563 147638 (view as bug list)
Depends on:
Blocks: Skia
  Show dependency treegraph
 
Reported: 2021-11-23 00:48 UTC by Telesto
Modified: 2022-07-03 01:59 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
BT with symbols ( (8.10 KB, text/rtf)
2021-11-23 00:49 UTC, Telesto
Details
BT with symbols (5.51 KB, application/vnd.oasis.opendocument.text)
2022-01-28 21:16 UTC, Telesto
Details
Original patch (1.42 KB, patch)
2022-07-03 01:59 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-11-23 00:48:35 UTC
Description:
Incidental Crash on macOS with skia raster

Steps to Reproduce:
1. Open attachment 150226 [details] with debugger lldb attached
2. Scroll down to bottom
3. LibreOffice  -> about
4. Press copy about button -> crash

Actual Results:
Crash

Expected Results:
no crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 11800469cc7b3a40c42410be93a12e5107db0efb
CPU threads: 8; OS: Mac OS X 10.16; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2021-11-23 00:49:11 UTC
Created attachment 176437 [details]
BT with symbols (
Comment 2 Luboš Luňák 2021-11-30 10:37:01 UTC
I cannot reproduce.
Comment 3 Telesto 2021-11-30 13:22:32 UTC
(In reply to Luboš Luňák from comment #2)
> I cannot reproduce.

Hmm, pretty sure there is something bug 120727 comment 39 has the same experience.
Based on the BT I would say its bit of a timing problem: SkiaFlushIdle

    frame #6: 0x0000000104d5e0e7 libvcllo.dylib`SkiaSalGraphicsImpl::performFlush() + 215
    frame #7: 0x0000000104d71442 libvcllo.dylib`SkiaFlushIdle::Invoke() + 18
    frame #8: 0x0000000104b85765 libvcllo.dylib`Scheduler::CallbackTaskScheduling() + 4773
    frame #9: 0x0000000106d36197 libvclplug_osxlo.dylib`AquaSalTimer::callTimerCallback() 

Another speculative one:
1. Open Writer
2. Open second Window
3. Go the first LibreOffice -> About -> press copy about button
4. Go to the second window & paste
5. Go again LibreOffice -> About -> press copy button (freeze)


@Steve
Any luck to reproducing this? Is bit of an erratic crash :-(
Comment 4 Telesto 2021-12-01 07:57:25 UTC
1. Open LibreOffice (Start Center)
2. Writer document
3. Help -> Restart in safe mode
4. Cancel
5. LibreOffice About. Press copy button
6. Close dialog
7. LibreOffice About. Press copy button
8. Help -> Restart in safe mode
9. Switch to different app and back
10. Cancel dialog
11. LibreOffice About. Press copy button

Crash should occur somewhere in this dance. Sometimes it crashes instant, other times it takes a little longer
Comment 5 steve 2021-12-01 13:42:36 UTC
Unable to reproduce.

Unsure about step "8. Help -> Restart in safe mode", are you actually restarting?  Since previously you specify "cancel" but don't indicate how to proceed this time around.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Mac OS X 10.16; UI render: Skia/Metal; VCL: osx
Locale: de-DE (en_DE.UTF-8); UI: en-US
Calc: threaded

But then again I am not sure how to switch to "Skia/Raster". I see "Skia/Metal" in about. So I might be holding it wrong (TM)?
Comment 6 Telesto 2021-12-01 15:33:44 UTC
(In reply to steve from comment #5)
> But then again I am not sure how to switch to "Skia/Raster". I see
> "Skia/Metal" in about. So I might be holding it wrong (TM)?

Well Metal won't crash... Needs to be Raster: LibreOffice -> Preferences - View -> Force Skia Raster

Regarding to the dance. No I didn't press Restart in safe-mode.. It has something to do with dialogs causing a crash out of the sudden. I have narrowed it down (but it isn't exact on timing). It does crash within the minute toying around with about/safe-mode dialog (so on my system regularly)
Comment 7 Telesto 2021-12-01 15:34:24 UTC
And well, I forgot, thanks for testing..
Comment 8 Telesto 2021-12-01 15:50:22 UTC
Straight forward crasher:
1. Open soffice (so start center)
2. Click Impress (assuming the wizard enabled)
3. Double click on the slides panel (with wizard still on top) -> crash

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Mac OS X 10.16; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 9 steve 2021-12-01 22:42:40 UTC
Haha, now I ran into a crash while trying to find Skia Raster 😂

I assume this is the same crash since as you correctly state it is related to having some dialog open.

Crash log (1 year): https://bin.disroot.org/?c61ed6e4f58e2301#Bc7jqwpvTJKUUtV76StxSNMLjXyDWkqzNtLbMBjXDN8B

Setting to NEW since I at least once reproduced the crash in question. Could you double check if you note anything from the crash log that matches / confirms it is the "correct" crash we are looking for.

Took another look at Preferences > View > and there is no info about Skia Raster (also LO just instantly crashed as soon as I opened the preferences window).

I have two Skia settings:
Use Skia for all rendering
    Force Skia software rendering

That's it. No raster anywhere in sight.
Comment 10 Telesto 2021-12-02 11:02:18 UTC
(In reply to steve from comment #9)
> Haha, now I ran into a crash while trying to find Skia Raster 😂

Well Skia Raster = Force software rendering; the about screen will show "Skia Raster" if Force software rendering being abled

I personally find this confusing too, but and complained; see bug 144330 (rejected)
Comment 11 Luboš Luňák 2021-12-08 16:41:25 UTC
I still cannot reproduce this using any of the ways described :(.
Comment 12 Telesto 2021-12-08 18:47:28 UTC
(In reply to Luboš Luňák from comment #11)
> I still cannot reproduce this using any of the ways described :(.

Only for my informaton: You're testing on own build or against the pre-published? [Not sure if the build bot is running some different version of Xcode or something like that] 
And which macOS version?
Comment 13 Telesto 2021-12-12 08:25:13 UTC
FWIW. I wanted to setup lode for a build with symbols for the crash, but lode is refusing to install
 lode % ./setup
Unknown Darwin kernel version 21.1.0 (macOS Moneterey)

Few side notes
A)Baseline starting to be ambitious to formally support. 
B)It might be that  the difference between build and runtime environment also starting to cause issues; no clue.
Comment 14 Luboš Luňák 2021-12-14 20:37:46 UTC
(In reply to Telesto from comment #12)
> Only for my informaton: You're testing on own build or against the
> pre-published? [Not sure if the build bot is running some different version
> of Xcode or something like that] 
> And which macOS version?

My own developer build on Mac Mini M1:
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 7e5af164b7d293dd410710bed411e1ca64bbecf7
CPU threads: 8; OS: Mac OS X 11.5.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 15 Telesto 2021-12-14 20:56:44 UTC
(In reply to Luboš Luňák from comment #14)
> (In reply to Telesto from comment #12)
> > Only for my informaton: You're testing on own build or against the
> > pre-published? [Not sure if the build bot is running some different version
> > of Xcode or something like that] 
> > And which macOS version?
> 
> My own developer build on Mac Mini M1:
> Version: 7.4.0.0.alpha0+ / LibreOffice Community
> Build ID: 7e5af164b7d293dd410710bed411e1ca64bbecf7
> CPU threads: 8; OS: Mac OS X 11.5.1; UI render: Skia/Metal; VCL: osx
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

Double checking, as comment 0 isn't mentioning Skia Raster as explicit requirement (it is) and the about here showing Vulkan..
Comment 16 Telesto 2022-01-24 10:24:22 UTC
Finally got LODE setup. My custom build is running fine.  So this or a problem with code signing (I think it's not). Or something with the baseline version used to build LibreOffice.

Will try a more recent Master build soon, to check if it's still present..
Comment 17 Mike Saunders 2022-01-28 16:26:31 UTC
I'm using the TDF Apple Silicon (aarch64) build:

Version: 7.3.0.2 / LibreOffice Community
Build ID: f1c9017ac60ecca268da7b1cf147b10e244b9b21
CPU threads: 8; OS: Mac OS X 11.5.2; UI render: Skia/Metal; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

I can't reproduce the original crash described by Telesto, or the crash steps in comment 8. All seems to be working fine here... Anything else I can test?
Comment 18 Mike Saunders 2022-01-28 16:27:06 UTC
(In reply to Mike Saunders from comment #17)
> I'm using the TDF Apple Silicon (aarch64) build:
> 
> Version: 7.3.0.2 / LibreOffice Community
> Build ID: f1c9017ac60ecca268da7b1cf147b10e244b9b21
> CPU threads: 8; OS: Mac OS X 11.5.2; UI render: Skia/Metal; VCL: osx
> Locale: en-GB (en_GB.UTF-8); UI: en-US
> Calc: threaded
> 
> I can't reproduce the original crash described by Telesto, or the crash
> steps in comment 8. All seems to be working fine here... Anything else I can
> test?

Oh and I ran the graphics test and:

Graphics Backend used: skia
Passed Tests : 14
Quirky Tests : 66
Failed Tests : 24
Skipped Tests : 5
Comment 19 Telesto 2022-01-28 19:08:04 UTC
(In reply to Mike Saunders from comment #17)
> I'm using the TDF Apple Silicon (aarch64) build:
> 
> Version: 7.3.0.2 / LibreOffice Community
> Build ID: f1c9017ac60ecca268da7b1cf147b10e244b9b21
> CPU threads: 8; OS: Mac OS X 11.5.2; UI render: Skia/Metal; VCL: osx
> Locale: en-GB (en_GB.UTF-8); UI: en-US
> Calc: threaded
> 
> I can't reproduce the original crash described by Telesto, or the crash
> steps in comment 8. All seems to be working fine here... Anything else I can
> test?

A) The problem appears to be limited to macOS Monterey (all reports pointing into that direction)

B) It only occurs with Skia Raster mode (aka Software rendering). Tools  -> Options -> View -> Force Skia Software rendering. 

C) It only occurs with Master builds (not self-build)

D) It might be dependent on Haswell processor
Comment 20 Telesto 2022-01-28 21:16:21 UTC
Created attachment 177885 [details]
BT with symbols

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: c1205c1cf6e08d94e6e2e2753679d99bc1842ca0
CPU threads: 8; OS: Mac OS X 12.0.1; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded

OK it does happen with my own build
Comment 21 Telesto 2022-02-17 18:58:00 UTC
*** Bug 147302 has been marked as a duplicate of this bug. ***
Comment 22 Telesto 2022-02-21 13:15:02 UTC
*** Bug 147563 has been marked as a duplicate of this bug. ***
Comment 23 Buovjaga 2022-02-24 13:59:59 UTC
*** Bug 147638 has been marked as a duplicate of this bug. ***
Comment 24 Commit Notification 2022-06-17 04:17:00 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8a5beccc19b4fdffb7b82ba5fd26f4cf316d9811

handle GC* pixmap functions on Mac reading past pixmap (tdf#145843)

It will be available in 7.5.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 25 Commit Notification 2022-06-17 06:24:49 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/c254bdb414ff14db3678b38298fa3cc3a8484f8d

handle GC* pixmap functions on Mac reading past pixmap (tdf#145843)

It will be available in 7.4.0.0.beta2.

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 26 Telesto 2022-07-03 01:56:43 UTC
Still crashing
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 7a89eae97a970939174d59aa58147eaa194acaee
CPU threads: 8; OS: Mac OS X 12.3.1; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 27 Telesto 2022-07-03 01:59:49 UTC
Created attachment 181096 [details]
Original patch

Note the commit is different to the patch I received by e-mail..