Bug 160768 - Changing value in a text box control with a link cell set up, Crash
Summary: Changing value in a text box control with a link cell set up, Crash
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Form-Controls Crash
  Show dependency treegraph
 
Reported: 2024-04-22 03:07 UTC by nobu
Modified: 2024-05-02 13:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (17.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-04-22 03:08 UTC, nobu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2024-04-22 03:07:22 UTC
Description:
Crash when changes are made in a control with a link cell set up.

Steps to Reproduce:
1. Open a new Calc
2. Create a text box
3. Set the link cell to [A1].
4. Edit text in a text box

Actual Results:
5. Crash

Expected Results:
5. No Crash


Reproducible: Always


User Profile Reset: No

Additional Info:
Not Reproduced with
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 4; OS: Windows 10.0 Build 10240; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Reproducible with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 05a1217921b7be283c6750a35b90e4feda6e993e
CPU threads: 4; OS: Windows 10.0 Build 10240; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded
Comment 1 nobu 2024-04-22 03:08:21 UTC
Created attachment 193793 [details]
sample file
Comment 2 Stéphane Guillou (stragu) 2024-04-22 07:35:02 UTC
Reproduced on Linux too, with attachment 193793 [details]: freeze when editing Text Box Control's contents.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 05a1217921b7be283c6750a35b90e4feda6e993e
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 3 nobu 2024-04-22 07:46:27 UTC
The attached sample file shows that it also crashes with checkbox.
Comment 4 Stéphane Guillou (stragu) 2024-04-22 14:40:41 UTC
Bibisected with linux-64-24.8 repo to first bad build [7bd660673f546fc93bf2868cbce6b84e9e1dde8b] which points to:

commit 7510cca63690ea97eb02a43f698fc183c3d0434a
author	Noel Grandin 	Tue Mar 26 15:56:02 2024 +0200
committer	Noel Grandin 	Thu Mar 28 06:42:46 2024 +0100
convert OCellValueBinding to comphelper::WeakComponentImplHelper
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165364

Noel, can you please have a look?
Comment 5 Julien Nabet 2024-04-22 15:54:05 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

part of bt taken at random:
#5  0x00007f936a6ef685 in std::mutex::lock() (this=0x555672f3b248) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/std_mutex.h:113
#6  0x00007f936b06fd6c in std::unique_lock<std::mutex>::lock() (this=0x7ffcbade3d38) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:141
#7  0x00007f936b06dd28 in std::unique_lock<std::mutex>::unique_lock(std::mutex&) (this=0x7ffcbade3d38, __m=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_lock.h:71
#8  0x00007f936b69d9b4 in calc::OCellValueBinding::notifyModified() (this=0x555672f3aff0) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/cellvaluebinding.cxx:466
#9  0x00007f936b69dd29 in calc::OCellValueBinding::modified(com::sun::star::lang::EventObject const&) (this=0x555672f3aff0) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/cellvaluebinding.cxx:487
#10 0x00007f936b7eb0ba in ScUnoListenerCalls::ExecuteAndClear() (this=0x5556734281a0) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/listenercalls.cxx:53
#11 0x00007f936a345ad4 in ScDocument::BroadcastUno(SfxHint const&) (this=0x555672333450, rHint=...) at /home/julien/lo/libreoffice/sc/source/core/data/documen3.cxx:978
#12 0x00007f936b2b6836 in ScDocShell::SetDocumentModified() (this=0x555671e8c9f0) at /home/julien/lo/libreoffice/sc/source/ui/docshell/docsh.cxx:3084
#13 0x00007f936b2b83e9 in ScDocShellModificator::SetDocumentModified() (this=0x7ffcbade4340) at /home/julien/lo/libreoffice/sc/source/ui/docshell/docsh.cxx:3376
#14 0x00007f936b2525ec in ScDocFunc::SetNormalString(bool&, ScAddress const&, rtl::OUString const&, bool) (this=0x555672256450, o_rbNumFmtSet=@0x7ffcbade4427: false, rPos=..., rText="", bApi=true)
    at /home/julien/lo/libreoffice/sc/source/ui/docshell/docfunc.cxx:870
#15 0x00007f936b2561e4 in ScDocFunc::SetCellText(ScAddress const&, rtl::OUString const&, bool, bool, bool, formula::FormulaGrammar::Grammar)
    (this=0x555672256450, rPos=..., rText="", bInterpret=false, bEnglish=false, bApi=true, eGrammar=formula::FormulaGrammar::GRAM_API) at /home/julien/lo/libreoffice/sc/source/ui/docshell/docfunc.cxx:1304
#16 0x00007f936b6445ba in ScCellObj::SetString_Impl(rtl::OUString const&, bool, bool) (this=0x555672cf1900, rString="", bInterpret=false, bEnglish=false)
    at /home/julien/lo/libreoffice/sc/source/ui/unoobj/cellsuno.cxx:5836
#17 0x00007f936b64510f in ScCellObj::setString(rtl::OUString const&) (this=0x555672cf1900, aText="") at /home/julien/lo/libreoffice/sc/source/ui/unoobj/cellsuno.cxx:5956
#18 0x00007f936b69c889 in calc::OCellValueBinding::setValue(com::sun::star::uno::Any const&) (this=0x555672f3aff0, aValue=uno::Any("string": ""))
    at /home/julien/lo/libreoffice/sc/source/ui/unoobj/cellvaluebinding.cxx:289

I reverted locally a4d6700423aeb3f7cbcb3f23352dd05033353fe3
"convert OCellValueBinding to comphelper::WeakComponentImplHelper (II)"
and I don't reproduce the hang.
Comment 6 Commit Notification 2024-04-23 16:51:22 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/979164938007e4774b7718abcb20fded9a00839f

tdf#160768 Changing value in a text box control with a link cell set up, Crash

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 Stéphane Guillou (stragu) 2024-05-02 13:29:44 UTC
Thanks Noel, verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ce454f382d0d005dd3de021c7820be3ffa0bb582
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded