Bug 167138 - assertion failure on editing input line
Summary: assertion failure on editing input line
Status: RESOLVED DUPLICATE of bug 168674
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-20 23:31 UTC by Regina Henschel
Modified: 2025-10-03 11:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File to reproduce the crash (10.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-06-20 23:31 UTC, Regina Henschel
Details
Errormessage and Call Stack of VS 2022 (5.39 KB, text/plain)
2025-06-20 23:32 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2025-06-20 23:31:06 UTC
Created attachment 201385 [details]
File to reproduce the crash

Open attached file. Click on cell D2. Then click into the input line and edit the formula so that you exchange 9 with 5. Finish editing by clicking on the OK-icon. => crash

I see the assertion in my debug build Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 23621ef302bf2e6a4dfae827ce83f31be2cd6056
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 1 Regina Henschel 2025-06-20 23:32:35 UTC
Created attachment 201386 [details]
Errormessage and Call Stack of VS 2022
Comment 2 Michael Warner 2025-06-21 19:09:47 UTC
I did not reproduce it on Mac:

Version: 25.2.4.3 (AARCH64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 10; OS: macOS 15.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 raal 2025-06-22 07:44:43 UTC
I cannot confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 09a1a5b8c8331437f88230f169bbb36cb83ed922
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 4 mikhail.machine 2025-06-24 07:13:58 UTC
Hello Regina Henschel,

I cannot confirm that the bug is present in master.

Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded
Comment 5 Warren 2025-07-15 02:01:41 UTC
Tried to replicate with the following environment:

Version:        25.2.4.3 (X86_64)
Build:          33e196637044ead23f5c3226c
Environment:    CPU Threads: 8 OS Windows 7 Service Pack 1 X86_64 (6.1 build 7601)
User Interface: UI render: Skia/Raster; VCL:win
Locale:         en-US (en_US);  UI: en-US
Misc:           Calc:threaded


Could not replicate. Exchanged the 9 for a 5 in three different places as follows:
1. directly in the input line
2. by selecting the Function button to open the function dialog and then made the change in the Result vector field and pressing OK button
3. by selecting the Function button to open the function dialog and then made the change in the Formula field and pressing OK button

In no case did the change result in a crash.
Comment 6 Regina Henschel 2025-08-10 23:46:30 UTC
Do you have used a debug build for testing?

The problem is, that commit e1972743d692c8d8611912c31aae2cb08ae7636d has exchanged the OSL_ENSURE in ImpEditEngine::PaMtoEditCursor() with an assert(). And assert() crashes in a debug build, but not an OSL_ENSURE. The modern equivalent to an OSL_ENSURE would be a SAL_WARN_IF.

If I disable the assert(), I can work with the input line in Calc without problems. There might be other places, where IsUpdateLayout() may not be false, but not for the Calc input line. Unfortunately, I do not find, where UpdateLayout is set to false in this case.
Comment 7 Regina Henschel 2025-10-03 11:58:29 UTC
Fixed with https://git.libreoffice.org/core/commit/f6c809b021312dbda2964aa98beebb872bdbd81a in bug 168674

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