Bug 159288 - Assertion on insert trend line
Summary: Assertion on insert trend line
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:24.8.0 target:24.2.1
Keywords: haveBacktrace
Depends on:
Blocks:
 
Reported: 2024-01-19 14:42 UTC by Heiko Tietze
Modified: 2024-01-31 10:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt (13.98 KB, text/plain)
2024-01-20 10:51 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2024-01-19 14:42:18 UTC
Writer: insert a chart > insert trendline => crash.
Same for Calc for a chart with a few data points.

soffice.bin: /home/ht/Sources/libreoffice/vcl/source/app/dbggui.cxx:35: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->GetYieldMutex()->IsCurrentThread() && "SolarMutex not owned!"' failed.
Comment 1 Julien Nabet 2024-01-20 10:51:00 UTC
Created attachment 192072 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce the assertion.
Comment 2 Julien Nabet 2024-01-20 11:37:58 UTC
Noel: noticing a2e78d06df22e99f2dc82ee3245ddc4c5de56acf
fix concurrent access to fontcache

I thought you might have some idea how to fix this.
Comment 3 Julien Nabet 2024-01-20 11:42:48 UTC
I tried this:
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 7669d3245a27..3e35f002a9a0 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -36,6 +36,7 @@
 #include <i18nlangtag/mslangid.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <tools/color.hxx>
+#include <vcl/svapp.hxx>
 #include <vcl/outdev.hxx>
 
 using namespace ::com::sun::star;
@@ -340,6 +341,7 @@ void CharacterProperties::AddPropertiesToVector(
 void CharacterProperties::AddDefaultsToMap(
     ::chart::tPropertyValueMap & rOutMap )
 {
+    SolarMutexGuard aGuard;
     const float fDefaultFontHeight = 13.0;
 
     SvtLinguConfig aLinguConfig;

It worked.

Now I know nothing about SolarMutexGuard except the fact we don't want to overuseit.
Comment 4 Noel Grandin 2024-01-30 08:36:20 UTC
Julien's patch looks good
Comment 5 Julien Nabet 2024-01-30 09:24:40 UTC
(In reply to Noel Grandin from comment #4)
> Julien's patch looks good

Thank you for the feedback, I put you in reviewer of https://gerrit.libreoffice.org/c/core/+/162737.
Comment 6 Commit Notification 2024-01-30 12:18:47 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159288: Assertion on insert trend line

It will be available in 24.8.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 7 Julien Nabet 2024-01-30 16:55:10 UTC
Xisco has cherry-picked the fix for 24.2 here: https://gerrit.libreoffice.org/c/core/+/162722
(thank you Xisco!)
Comment 8 Commit Notification 2024-01-31 10:15:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#159288: Assertion on insert trend line

It will be available in 24.2.1.

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.