Bug 149079 - EDITING Calc crashes when editing cell content in inserted rows
Summary: EDITING Calc crashes when editing cell content in inserted rows
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.4
Keywords: haveBacktrace
: 143376 143827 144186 147116 (view as bug list)
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2022-05-13 18:30 UTC by Stefan_Lange_KA@T-Online.de
Modified: 2023-11-23 22:07 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["vcl::unohelper::DragAndDropWrapper::dragGestureRecognized(com::sun::star::datatransfer::dnd::DragGestureEvent const &)","vcl::unohelper::DragAndDropWrapper::dragGestureRecognized(com::sun::star::datatransfer::dnd::DragGestureEvent const&)"]


Attachments
Test document to show the behavior (631.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-05-13 18:30 UTC, Stefan_Lange_KA@T-Online.de
Details
gdb bt (gtk3 rendering) (5.26 KB, text/plain)
2022-05-14 10:10 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan_Lange_KA@T-Online.de 2022-05-13 18:30:53 UTC
Created attachment 180100 [details]
Test document to show the behavior

The behavior described is annoying for me because it often occurs when I edit a special of my documents. I have tried to report the bug several times but because I couldn't surely reproduce the crashes I haven't done until now.
The document is a Corona statistics daily updated by data in a new row. The new row is inserted at the end and temporarily filled with data of the previous row that are updated later.
The crashes happen when I have copied the row content in the new row und I want to change date and time.

With the procedure described I can reproduce the crashes with a propability of about 80 - 90 %:

Reproduce the crash:
- open the attached document "Corona_D_Test.ods"
- change cell content of B228 e.g. to "23:59"
- change comment (note) content of B228 e.g. to "JHU-Stand: 23:20"
- select row 229 (or any cell in the row) and insert one new row above
- select row 228 and copy content to clipboard
- paste clipboard content to inserted new row 229
- double click into cell A229, to change the date
- set the mouse cursor before the first character and try to drag it behind the second character (to select "12" for change to "13)
--> Result: Calc crashes (or occasionally doesn't crash)
- when it doesn't crash, try to change the time:
- double click into cell B229
- set the mouse cursor before the first character and try to drag it behind the last character
--> Result: Calc crashes (or occasionally doesn't crash)

I have reproduced the behavior with LO 3.3.3 (release)
Version: 7.3.3.2 (x64) / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
as well as with LOdev 3.3.4.0.0+
Version: 7.3.4.0.0+ (x64) / LibreOffice Community
Build ID: 958a0d618d78bf12d155aa5af9196757de26281b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL
and with LOdev 3.4.0.0.alpha0+ (Windows 11)
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 172e208e6b0674f42c301c5ee5e280e9138ba1b4
CPU threads: 4; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

Hint: The document contains a hidden sheet. When this sheet is not hidden I have not reproduced the crashes.
Comment 1 Julien Nabet 2022-05-14 10:10:46 UTC
Created attachment 180112 [details]
gdb bt (gtk3 rendering)

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

Remark: every action was very slow.
Comment 2 Julien Nabet 2022-05-14 10:13:37 UTC
Caolán: since the bt shows vcl part, thought you might be interested in this one.
Comment 3 Caolán McNamara 2022-05-14 15:20:15 UTC
I can reproduce, seems to be a missing/skipped disposing for some reason. Apparently editeng related, and the comment thing is my guess given its history as a source of trouble in general :-)
Comment 4 Commit Notification 2022-05-14 17:18:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149079 don't skip disposing DnDListener

It will be available in 7.4.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 5 Caolán McNamara 2022-05-14 17:19:37 UTC
that seems to fix what I see, which is hopefully the same problem as the original reported, it is at least consistent what that. Backport to 7-3 in gerrit
Comment 6 Julien Nabet 2022-05-14 18:11:54 UTC
With master sources updated again to retrieve the Caolán's patch, I confirm I don't reproduce the crash.

Caolán: thank you for the quick fix! :-)
Comment 7 Commit Notification 2022-05-16 09:09:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/5ed1831e22715a615c88da0005521d3c1355f626

tdf#149079 don't skip disposing DnDListener

It will be available in 7.3.4.

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 8 Stefan_Lange_KA@T-Online.de 2022-05-16 18:04:54 UTC
Because of the "success rate" for reproducing the crashes < 100% I have tested repeatedly with several documents with
Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 817b8fe7001a83cb74910eb09b7c14a3b95b8a39
CPU threads: 4; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
build folder: /daily/master/Win-x86_64@tb77-TDF/2022-05-16_17.03.52/

Result: No crash occured!

Therefore for me the bug seems to be fixed in LOdev 7.4.0.0.alpha1.
Comment 9 Stefan_Lange_KA@T-Online.de 2022-05-17 09:22:45 UTC
Today I have also tested the patch for LOdev 7.3.4 with
Version: 7.3.4.0.0+ (x64) / LibreOffice Community
Build ID: 54f0c89ef7a93b12e6be67716bc55a47b69cb9a6
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

Result: Test was successful, no crash occured.
Comment 10 Stéphane Guillou (stragu) 2023-11-23 22:03:26 UTC
*** Bug 143827 has been marked as a duplicate of this bug. ***
Comment 11 Stéphane Guillou (stragu) 2023-11-23 22:05:24 UTC
*** Bug 147116 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Guillou (stragu) 2023-11-23 22:05:47 UTC
*** Bug 144186 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2023-11-23 22:06:00 UTC
*** Bug 143376 has been marked as a duplicate of this bug. ***