Download it now!
Bug 133744 - EDITING: Crashes when pressing enter in "Paste special" dialog
Summary: EDITING: Crashes when pressing enter in "Paste special" dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.0.0.1 target:7.1.0
Keywords: bibisected, bisected, regression, wantBacktrace
: 133774 (view as bug list)
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2020-06-07 04:52 UTC by pongpeera054
Modified: 2020-06-09 09:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice crashes on Paste Special (7.81 MB, video/mp4)
2020-06-07 10:51 UTC, pongpeera054
Details
Source image (764.99 KB, image/png)
2020-06-07 11:24 UTC, pongpeera054
Details
LibreOffice crashes on Paste Special (7.1) (6.80 MB, video/mp4)
2020-06-07 12:58 UTC, pongpeera054
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pongpeera054 2020-06-07 04:52:19 UTC
Description:
After copying pictures or text from another document, both command+shift+V and Paste special... > More options crashes the LibreOffice app.

Steps to Reproduce:
1. Copy any photo or text from another document
2. In the target document, right-click to open the context menu.
3. Go to Paste special > More options.

Actual Results:
LibreOffice crashes and prompts for document recovery.

Expected Results:
Copied content should show up in target document without crashing.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.0.0.0.beta1
Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c
CPU threads: 8; OS: Mac OS X 10.15.5; UI render: default; VCL: osx
Locale: en-US (en_TH.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2020-06-07 08:17:14 UTC
This could so the problem (no warranty)
Grant LibreOffice Full Disk Access in > Security & Privacy -> Privacy in > System preferences
Comment 2 pongpeera054 2020-06-07 08:32:59 UTC
(In reply to Telesto from comment #1)
> This could so the problem (no warranty)
> Grant LibreOffice Full Disk Access in > Security & Privacy -> Privacy in >
> System preferences

Even with "Full Disk Access" checked, paste special still crashes the program...
Comment 3 Julien Nabet 2020-06-07 08:51:51 UTC
Would it be possible you attach some information about the crash? (see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#macOS:_How_to_get_debug_information)
Comment 4 Mike Kaganski 2020-06-07 08:58:04 UTC
Most likely duplicate of tdf#133365.
Comment 5 pongpeera054 2020-06-07 10:51:56 UTC
Created attachment 161716 [details]
LibreOffice crashes on Paste Special

This is a video showing LibreOffice crashes when using paste special.
Comment 6 pongpeera054 2020-06-07 10:54:31 UTC
(In reply to Julien Nabet from comment #3)
> Would it be possible you attach some information about the crash? (see
> https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#macOS:
> _How_to_get_debug_information)

macOS prompts don't show up, LibreOffice just go straight to document recovery screen when it crashes as shown in the video
Comment 7 Julien Nabet 2020-06-07 11:16:36 UTC
What's the format of the image in the source file? (png, jpg, ...)

Would it be possible you attach the source file so we can give it a try?
Comment 8 pongpeera054 2020-06-07 11:24:13 UTC
Created attachment 161717 [details]
Source image

This is the source image which is a random screenshot taken with macOS's built-in screenshot utility in the default PNG format, no conversion.
Comment 9 Julien Nabet 2020-06-07 11:31:19 UTC
Just for the test, could you give a try with a dev version https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@tb81-TDF/current/ ?
Indeed, like Mike Kaganski indicated in https://bugs.documentfoundation.org/show_bug.cgi?id=133744#c4, it may be already fixed.
Comment 10 pongpeera054 2020-06-07 12:58:14 UTC
Created attachment 161720 [details]
LibreOffice crashes on Paste Special (7.1)

Tried the paste special in the 7.1 version, but this time with plain text in the same document.

1. Select text > Copy
2. In the same document, Right-click to show context menu
3. Paste special > Click "More options"
4. Hit Return (Enter)...crashed.
Comment 11 Roman Kuznetsov 2020-06-07 13:08:30 UTC
(In reply to pongpeera054 from comment #10)
> Created attachment 161720 [details]
> LibreOffice crashes on Paste Special (7.1)
> 
> Tried the paste special in the 7.1 version, but this time with plain text in
> the same document.
> 
> 1. Select text > Copy
> 2. In the same document, Right-click to show context menu
> 3. Paste special > Click "More options"
> 4. Hit Return (Enter)...crashed.

confirm crash in

Version: 7.1.0.0.alpha0+
Build ID: 2047a5978ac8188e61da9cd3b2f40d86df5570bb
CPU threads: 4; OS: Mac OS X 10.15.4; UI render: default; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded
Comment 12 Roman Kuznetsov 2020-06-07 13:15:14 UTC
(In reply to Roman Kuznetsov from comment #11)
> 
> confirm crash in
> 
> Version: 7.1.0.0.alpha0+
> Build ID: 2047a5978ac8188e61da9cd3b2f40d86df5570bb
> CPU threads: 4; OS: Mac OS X 10.15.4; UI render: default; VCL: osx
> Locale: ru-RU (ru_RU.UTF-8); UI: en-US
> Calc: threaded

no crash in

Версия: 6.4.2.2
ID сборки: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
Потоков ЦП: 4; ОС: Mac OS X 10.15.4; Отрисовка ИП: GL; VCL: osx; 
Локаль: ru-RU (ru_RU.UTF-8); Язык интерфейса: ru-RU
Calc: threaded

so it's a regression
Comment 13 Mike Kaganski 2020-06-07 13:26:16 UTC
Confirm with Version: 7.1.0.0.alpha0+ (x64)
Build ID: d3ae37c935209621d90da6c3a059c0c013adb772
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

Note that it crashes when just pressing Enter in the dialog; it succeeds when pressing OK button.

Regression (works OK with Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL).

It dereferences nullptr () in

	vcllo.dll!SvTreeListBox::IsEntryMnemonicsEnabled() Line 444
	vcllo.dll!SvTreeListBox::HandleKeyInput(const KeyEvent & _rKEvt) Line 1051
	vcllo.dll!SvTreeListBox::KeyInput(const KeyEvent & rKEvt) Line 1931
	vcllo.dll!ImplHandleKey(vcl::Window * pWindow, MouseNotifyEvent nSVEvent, unsigned short nKeyCode, unsigned short nCharCode, unsigned short nRepeat, bool bForward) Line 1000
	vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2425
	vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 302
	vclplug_winlo.dll!ImplHandleKeyMsg(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, __int64 & rResult) Line 3607
	vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5576
	vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5894
	user32.dll!UserCallWinProcCheckWow()
	user32.dll!DispatchMessageWorker()
	vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 425
	vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 498
	vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 527
	vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 455
	vcllo.dll!Application::Yield() Line 520
	vcllo.dll!Application::Execute() Line 434
	sofficeapp.dll!desktop::Desktop::Main() Line 1602
	vcllo.dll!ImplSVMain() Line 200
	vcllo.dll!SVMain() Line 233
	sofficeapp.dll!soffice_main() Line 98
	soffice.bin!sal_main() Line 48
	soffice.bin!main(int argc, char * * argv) Line 47
	soffice.bin!invoke_main() Line 79
	soffice.bin!__scrt_common_main_seh() Line 288
	soffice.bin!__scrt_common_main() Line 331
	soffice.bin!mainCRTStartup() Line 17
	kernel32.dll!BaseThreadInitThunk()
	ntdll.dll!RtlUserThreadStart()
Comment 14 Mike Kaganski 2020-06-07 13:49:52 UTC
SvTreeListBox::KeyInput calls pImpl->KeyInput, which internally resets the pImpl (in SvPasteObjectDialog::DoubleClickHdl, which ends the dialog), and returns *false* (SalInstanceTreeView::DoubleClickHdl converts the true returned by signal_row_activated into false). Then SvTreeListBox::KeyInput continues to use the cleared pImpl.

Bibisect would help here, I'm sure.
Comment 15 Telesto 2020-06-07 14:14:14 UTC
Bisected to
author	Caolán McNamara <caolanm@redhat.com>	2020-05-26 16:17:59 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2020-05-26 20:23:16 +0200
commit	7bd3f4a0724b11c18d45937078e8c2968e2b6d7f (patch)
tree	a76d092520f09a23d204d077e5d544a98da120ff
parent	82b773b43291024e9e854c9371016236e58f550c (diff)
emit activate-row in vcl treeview on return
to align it with the gtk one which does this

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7bd3f4a0724b11c18d45937078e8c2968e2b6d7f
Comment 16 Telesto 2020-06-07 14:19:20 UTC
Adding CC: to Caolán McNamara
Comment 17 Commit Notification 2020-06-07 20:00:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1e2e4ea8cf8e8b1df8678daaf1ff7b51494838f0

Resolves: tdf#133744 stop processing if DoubleClickHdl consumed event

It will be available in 7.0.0.1.

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 18 Commit Notification 2020-06-07 20:00:14 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#133744 stop processing if DoubleClickHdl consumed event

It will be available in 7.1.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 19 Telesto 2020-06-07 20:16:42 UTC
*** Bug 133774 has been marked as a duplicate of this bug. ***
Comment 20 Xisco Faulí 2020-06-09 09:45:05 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: e0f058bcd5e185b89e4b7c680a7901bc7eb2a790
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!