Bug 162166 - crash when drag-and-dropping empty sheet into text field or combobox (gen)
Summary: crash when drag-and-dropping empty sheet into text field or combobox (gen)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Sheet-Tabs-Bar Drag-and-Drop Crash
  Show dependency treegraph
 
Reported: 2024-07-24 04:52 UTC by Stéphane Guillou (stragu)
Modified: 2024-07-29 03:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["libc.so.6"]


Attachments
bt (8.79 KB, text/plain)
2024-07-25 11:43 UTC, Julien Nabet
Details
bt when pasting in name box (3.76 KB, text/plain)
2024-07-26 09:05 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-07-24 04:52:15 UTC
We have related bug 137511 already, but that one has morphed into a touch-screen / assert issue. Opening this report to have a clean description.

Steps:
1. Open new Calc spreadsheet with gen VCL plugin
2. Drag-and-drop bottom sheet tab into a field that accepts text (e.g. Name Box or Font Name comboboxes in toolbars, Quick Find search field, Formula bar, or Function search field in the sidebar...)

Result: crash 

Expected:
As with gtk3 VCL plugin currently: no crash.
(It used to be reproducible with gtk2/3, e.g in 5.3 to 6.4, but not since 7.0. See bug 137511.)

Reproduced in:

Recent trunk build:
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ba0e0093b0ed2816a18e54eef0a92220d7b04a4d
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
https://crashreport.libreoffice.org/stats/crash_details/3711dfae-ff82-4bb1-85d0-f5dba4502622

Last mentioned source from crash report is vcl/source/treelist/transfer.cxx:430

Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5
https://crashreport.libreoffice.org/stats/crash_details/038e5075-2da6-4009-aff9-53de3dedbb60

LO 6.0: https://crashreport.libreoffice.org/stats/crash_details/aa0e64f1-0473-4323-9cd4-886c9d1d80bd
And in 5.3.0.3 as well.

LO 5.2.0.4 didn't crash.

In terminal:

terminate called after throwing an instance of 'com::sun::star::datatransfer::UnsupportedFlavorException'

gen crash bibisected with linux-64-5.3 repo to first bad build [2ca4e74acabe756a4eb6d443b34b18338bec54c9] which is:

commit 432b27ec73940738bb0b4f9d3d749c70a2525700
author	Pranav Kant	Fri Jun 03 00:46:48 2016 +0530
committer	Pranav Kant	Fri Jun 03 00:55:41 2016 +0530
sc: Don't export in case of invalid range

Pranav is not active anymore.
Comment 1 Julien Nabet 2024-07-25 11:43:57 UTC
Created attachment 195496 [details]
bt

On pc Debian x86-64 with master sources updated today, I got an assertion.
Comment 2 Julien Nabet 2024-07-25 11:47:27 UTC
Are you sure about the bibisect?
Indeed, even when reverting 432b27ec73940738bb0b4f9d3d749c70a2525700, I got the same assertion.
Comment 3 Stéphane Guillou (stragu) 2024-07-25 13:42:13 UTC
(In reply to Julien Nabet from comment #2)
> Are you sure about the bibisect?
Yes, I just checked again, for gen VCL plugin.
(Not able to check for gtk as it freezes at startup in that range.)
Comment 4 Stéphane Guillou (stragu) 2024-07-25 13:42:54 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Yes, I just checked again, for gen VCL plugin.
(testing dropping into the Name Box)
Comment 5 Julien Nabet 2024-07-26 08:47:01 UTC Comment hidden (off-topic)
Comment 6 Julien Nabet 2024-07-26 08:52:30 UTC
(In reply to Julien Nabet from comment #5)
> I gave a try with this patch:
> https://gerrit.libreoffice.org/c/core/+/171065

Sorry, wrong bug.
Comment 7 Julien Nabet 2024-07-26 09:00:47 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> (In reply to Stéphane Guillou (stragu) from comment #3)
> > Yes, I just checked again, for gen VCL plugin.
> (testing dropping into the Name Box)

Ok in the name box, the revert works but not in the formula box.
Comment 8 Julien Nabet 2024-07-26 09:05:16 UTC
Created attachment 195529 [details]
bt when pasting in name box

Bt is different than the one when pasting in formula box.
Comment 9 Stéphane Guillou (stragu) 2024-07-29 03:43:32 UTC
(In reply to Julien Nabet from comment #7)
> Ok in the name box, the revert works but not in the formula box.
Good to know, thank you.
For me, the latest daily build does not crash when drag-and-dropping into the formula bar.
I do however get a lot of warnings in the console:

warn:vcl:1746119:1746119:vcl/source/window/dndeventdispatcher.cxx:137: rejecting drag enter due to missing listeners.
[...]
warn:legacy.osl:1746119:1746125:editeng/source/editeng/impedit2.cxx:3403: GetTextHeight: Not formatted
warn:legacy.tools:1746119:1746125:editeng/source/editeng/impedit.cxx:1502: Scroll: Not formatted!
warn:legacy.osl:1746119:1746125:sc/source/ui/app/inputhdl.cxx:2663: SetTopSelection: Para != 0
[...]
warn:svl:1746119:1746125:svl/source/undo/undo.cxx:450: SfxUndoManager::Clear: suspicious call - do you really wish to clear the current level?
[...]
warn:editeng:1746119:1746125:editeng/source/editeng/editdoc.cxx:477: ParaPortionList::Remove - out of bounds pos 2