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
Created attachment 176437 [details] BT with symbols (
I cannot reproduce.
(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 :-(
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
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)?
(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)
And well, I forgot, thanks for testing..
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
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.
(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)
I still cannot reproduce this using any of the ways described :(.
(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?
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.
(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
(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..
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..
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?
(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
(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
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
*** Bug 147302 has been marked as a duplicate of this bug. ***
*** Bug 147563 has been marked as a duplicate of this bug. ***
*** Bug 147638 has been marked as a duplicate of this bug. ***
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.
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.
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
Created attachment 181096 [details] Original patch Note the commit is different to the patch I received by e-mail..
@Patrick Luby Thanks for all the patches in the macOS area. I'm bit opportunistic here.. this bug is still bothering me. LibreOffice crashes regularly with Skia Raster enabled (no issue with Vulkan) Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: da3dd48eaf9086f8ab28d6a6655f9a638e51433a 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
(In reply to Telesto from comment #28) > @Patrick Luby > Thanks for all the patches in the macOS area. I'm bit opportunistic here.. > this bug is still bothering me. LibreOffice crashes regularly with Skia > Raster enabled (no issue with Vulkan) > > Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community > Build ID: da3dd48eaf9086f8ab28d6a6655f9a638e51433a > 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 I was able to reproduce this bug with Skia/Raster. Unfortunately I was only able to reproduce one time. That was on my macOS Intel running macOS Monterey 12.6.2. I am testing by running a local build (checked out from master earlier today) in lldb. Does anyone have any other steps that they use to trigger this crash?
(In reply to Patrick Luby from comment #29) > I was able to reproduce this bug with Skia/Raster. Unfortunately I was only > able to reproduce one time. That was on my macOS Intel running macOS > Monterey 12.6.2. > > I am testing by running a local build (checked out from master earlier > today) in lldb. Does anyone have any other steps that they use to trigger > this crash? Whole problem, I can create the issue with a few steps.. somehow, but not everybody else does. Comment 8 works pretty reliable for me Alternative 1. Open Impress from Start Center 2. Double click BeeHive template 3. LibreOffice -> About Window -> Press Copy About 4. Close the dialog 5. Enter Click to add title 6. CMD+V 7. LibreOffice -> About Window -> Press Copy about -> Might crash here 8. Close the dialog 9. Go to slide 2 10. CMD+V 11. LibreOffice -> About Window -> Press Copy about -> Crash Alternative -> even less predictable 1. Open Writer from Start Center 2. LibreOffice -> Preferences -> View 3. Uncheck Use Skia for all rendering 4. Hoover over the Apply/ OK buttons.. Press Apply button. Close the restart button. Press Cancel in the Preference dialog It appears Window related, the dialogs appear like tip of the day/ template manager/ about window/ preference the often it happens. But will there some kind of timing element.. Sidenote: the patch attachment 181096 [details] authored by Luboš Luňák - received by email - solves the issue. However a different patch got pushed at comment 24 for unknown reasons
Created attachment 184138 [details] Debug patch attachment 181096 [details] is based on output of debug code, attached. Output at that point in time (7 februari 2022) > debug:12486:654528: XXX:0x600003e8e700 > 841x570*2R::1682x1140::2::289x143@(550,427) 1100,854,578,286::6728::6 2::6 > 2 > > 2022-02-07 17:21:50.812613+0100 soffice[12486:654528] > [org.libreoffice.script] copy_read_only: vm_copy failed: status 1.
(In reply to Telesto from comment #30) > > Whole problem, I can create the issue with a few steps.. somehow, but not > everybody else does. > > Comment 8 works pretty reliable for me > > Alternative > 1. Open Impress from Start Center > 2. Double click BeeHive template > 3. LibreOffice -> About Window -> Press Copy About > 4. Close the dialog > 5. Enter Click to add title > 6. CMD+V > 7. LibreOffice -> About Window -> Press Copy about -> Might crash here > 8. Close the dialog > 9. Go to slide 2 > 10. CMD+V > 11. LibreOffice -> About Window -> Press Copy about -> Crash > > Alternative -> even less predictable > 1. Open Writer from Start Center > 2. LibreOffice -> Preferences -> View > 3. Uncheck Use Skia for all rendering > 4. Hoover over the Apply/ OK buttons.. Press Apply button. Close the restart > button. Press Cancel in the Preference dialog > > It appears Window related, the dialogs appear like tip of the day/ template > manager/ about window/ preference the often it happens. > > But will there some kind of timing element.. > > Sidenote: the patch attachment 181096 [details] authored by Luboš Luňák - > received by email - solves the issue. However a different patch got pushed > at comment 24 for unknown reasons Thank you for the steps. I can now reproduce the crash using your first alternative. I now understand why the patch in attachment 181096 [details] was not used: it makes a copy of the bitmap in memory. It fixes the crashing, but it would require a lot more memory and frequently copying of bitmaps. I added the debug patch in attachment 184138 [details] and I noticed the following debug output immediately before the crash: debug:2178:56744: XXX:0x600003e71e00 709x464*2R::1418x928::2::244x232@(399,156) 798,312,488,464::5672::6 2::6 2 debug:2178:56744: XXX:0x600003e71e00 709x464*2R::1418x928::2::200x145@(509,319) 1018,638,400,290::5672::6 2::6 22022-12-14 08:57:10.358900-0500 soffice[2178:56744] [org.libreoffice.script] copy_read_only: vm_copy failed: status 1. Note that the first line doesn't crash and the second one crashes. Both are taking a small subarea of the same bitmap. The difference is that the subarea in the second one aligns with the bottom, right edges of the bitmap. From the above, I think that Luboš Luňák's "HACK for tdf#145843" in vcl/skia/osx/gdiimpl.cxx now makes sense to me. His fix is just missing cases like this. I will see if I am able to expand his fix to handle this case.
I have posted the following patch that fixes this bug for on my macOS 12.6.2 Intel machine: https://gerrit.libreoffice.org/c/core/+/144194 @Telesto, Does the patch fix the bug for you? If no, I have another fix that I can try to work around the "read past the end of the bitmap buffer" bug that Luboš Luňák's found in CGBitmapContextCreate().
(In reply to Patrick Luby from comment #33) > I have posted the following patch that fixes this bug for on my macOS 12.6.2 > Intel machine: > > https://gerrit.libreoffice.org/c/core/+/144194 > > @Telesto, > > Does the patch fix the bug for you? If no, I have another fix that I can try > to work around the "read past the end of the bitmap buffer" bug that Luboš > Luňák's found in CGBitmapContextCreate(). Ignore the above patch. CGBitmapContextCreateWithData() crashes as well just not as frequently as CGBitmapContextCreate().
I have uploaded "Patchset 3" to the following link: https://bugs.documentfoundation.org/show_bug.cgi?id=145843 @Telesto Patchset 3 fixes the crash when running Skia/Raster on my macOS 12.6.2 Intel laptop. Does Patchset 3 fix the crash on your machine?
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9ec57a3dc7925d6f86a19d0e179e065df53e542f tdf#145843 Do not use CGBitmapContextCreate() to create a bitmap context It will be available in 7.6.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.
(In reply to Patrick Luby from comment #35) > I have uploaded "Patchset 3" to the following link: > > https://bugs.documentfoundation.org/show_bug.cgi?id=145843 > > @Telesto > > Patchset 3 fixes the crash when running Skia/Raster on my macOS 12.6.2 Intel > laptop. Does Patchset 3 fix the crash on your machine? Working like a charm Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 102846d45cb9660805e209b6954c7b8d707b8288 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
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/1f58b2e0d941cfb8be10a5068b41096a06b078a6 tdf#145843 Do not use CGBitmapContextCreate() to create a bitmap context It will be available in 7.5.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.
Verified as per https://bugs.documentfoundation.org/show_bug.cgi?id=145843#c37 Thanks Patrick for the fix.