Bug 162728 - Crash on saving in Math Formula editor
Summary: Crash on saving in Math Formula editor
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2024-08-31 15:55 UTC by Regina Henschel
Modified: 2024-09-09 12:05 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Callstack by VS (3.96 KB, text/plain)
2024-08-31 15:55 UTC, Regina Henschel
Details
gdb bt (7.22 KB, text/plain)
2024-09-01 10:42 UTC, Julien Nabet
Details
WinDbg 2nd chance SfxFrameDescriptio::SetActualURL (68.67 KB, text/plain)
2024-09-01 17:25 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2024-08-31 15:55:40 UTC
Created attachment 196145 [details]
Callstack by VS

Start a current debug build.
Start Math Formula document.
From sidebar, examples insert "Newton's second law" formula.
Save.
=> Crash.

The crash is independent of whether visual editor is used or not.
Comment 1 Regina Henschel 2024-08-31 19:36:57 UTC
It crashes also with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8843081f91e206b4749b83b186caaceaf1f8c4e3
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

No crash with Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 2 m_a_riosv 2024-08-31 23:09:07 UTC
Reproducible
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 47fbbd7c6b9ea6b4a20f05fdf8870cb9e125fb21
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 V Stuart Foote 2024-09-01 02:06:23 UTC
On Win10 with TB77 build 2024-08-29, no issue

So debug builds only?

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c52f139b4f7140033144dde29f70a39ebedb6aa0
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 4 Regina Henschel 2024-09-01 06:19:14 UTC
Crashes for me in Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c52f139b4f7140033144dde29f70a39ebedb6aa0
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

A Windows 11 problem?
Comment 5 Julien Nabet 2024-09-01 10:42:34 UTC
Created attachment 196158 [details]
gdb bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I've got also lots of these in console:
warn:legacy.osl:27399:27399:starmath/source/cfgitem.cxx:447: localized symbol-name not found
warn:legacy.osl:27399:27399:starmath/source/cfgitem.cxx:451: localized symbolset-name not found
warn:legacy.osl:27399:27399:starmath/source/symbol.cxx:272: expected Font with ITALIC_NONE, failed.
Comment 6 V Stuart Foote 2024-09-01 12:29:29 UTC
fired up a Win11 laptop, attached 25.2.0 20240829 TB77 build to WinDbg with the current 24.8 release symbols downloaded.

I do see the same warnings (at cfgitem.cxx 447/451 and symbol.cxx 272), but no assert halt/crash. My en-US locale?

Noticed there were ~54 of the symbol warnings--looks to match the number of named symbols in the iGreek config table?

Nothing too recent with sm:

Heiko just toggled off the inline edit mode
https://gerrit.libreoffice.org/c/core/+/172241

Noel tweaked the fonts for the symbols mid-July  https://gerrit.libreoffice.org/c/core/+/170684
Comment 7 V Stuart Foote 2024-09-01 17:25:38 UTC
Created attachment 196162 [details]
WinDbg 2nd chance SfxFrameDescriptio::SetActualURL

Do get a crash when saving new formula to ODF.

Attached stack with partial symbols, 2nd chance access violation but seems removed from sm -- SfxFrameDescriptor::SetActualURL ?
Comment 8 V Stuart Foote 2024-09-01 17:29:49 UTC
(In reply to V Stuart Foote from comment #7)
> Created attachment 196162 [details]
> WinDbg 2nd chance SfxFrameDescriptio::SetActualURL
> 
> Do get a crash when saving new formula to ODF.
> 
> Attached stack with partial symbols, 2nd chance access violation but seems
> removed from sm -- SfxFrameDescriptor::SetActualURL ?

That was on Win10
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c52f139b4f7140033144dde29f70a39ebedb6aa0
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

but same stack trace access violation when on a Win11 system.
ersion: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c52f139b4f7140033144dde29f70a39ebedb6aa0
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 9 Xisco Faulí 2024-09-05 10:03:40 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2024-08-13 13:43:25 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2024-08-14 18:05:59 +0200
commit ece0729e18b4b306933439d1a329df192fc504d3 (patch)
tree 65d9c2e48d1c9e8bf7cc1c8057c105c10de11695
parent 52d0e53fa8a90b51332f5db9702816cd294dbaa6 (diff)
use less exception throwing for flow control

Bisected with: bibisect-linux64-25.2
Comment 10 Julien Nabet 2024-09-05 10:44:07 UTC
With this patch, it works:
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3cd788f5dc4b..79cae14cf75b 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -226,7 +226,7 @@ public:
         try
         {
             uno::Reference< lang::XMultiServiceFactory > xDocSettingsSupplier( xModel, uno::UNO_QUERY );
-            if (xModel)
+            if (xModel && xDocSettingsSupplier)
             {
                 m_xDocumentSettings.set(
                     xDocSettingsSupplier->createInstance( u"com.sun.star.document.Settings"_ustr ),

but as often, perhaps it's just hidding the pb?
Comment 11 Commit Notification 2024-09-05 11:51:41 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70b6d04570b22e766d1f04921cf05f9f9cdd3108

tdf#162728 Crash on saving in Math Formula editor

It will be available in 25.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 12 Julien Nabet 2024-09-06 06:47:33 UTC
On pc Debian x86-64 with master sources updated today, I confirm that it works now. Thank you Noel! :-)
Comment 13 Xisco Faulí 2024-09-09 12:05:44 UTC
(In reply to Julien Nabet from comment #12)
> On pc Debian x86-64 with master sources updated today, I confirm that it
> works now. Thank you Noel! :-)

I guess we can close this now