Bug 158345 - Opening Hyperlink dialog leads to crash
Summary: Opening Hyperlink dialog leads to crash
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:24.2.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Hyperlink-Dialog
  Show dependency treegraph
 
Reported: 2023-11-23 23:14 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-24 20:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace from my own build (32.87 KB, text/x-log)
2023-11-23 23:14 UTC, Gabor Kelemen (allotropia)
Details
bt with debug symbols (13.37 KB, text/plain)
2023-11-24 18:24 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-11-23 23:14:36 UTC
Created attachment 191008 [details]
backtrace from my own build

When the Hyperlink dialog is opened right after starting the machine, leads to a crash.

1. Turn off / hibernate your computer/VM. This is needed to empty the clipboard.
2. Turn on the computer/VM
3. Start Writer or Calc
4. Insert - Hyperlink
-> crash.

This does not happen if there is anything already on the clipboard. But if that's empty, it always crashes with non-GTK3 backends. Checked with gen and Windows.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a91892ec4942fc875820ea02dfbe74e986548142
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: x11
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

Seems to have started with:
https://git.libreoffice.org/core/+/89d3735e05b98223a49a387421386fd736fc3de6

author	Andreas Heinisch <andreas.heinisch@yahoo.de>	Wed Jul 26 10:31:56 2023 +0200
committer	Andreas Heinisch <andreas.heinisch@yahoo.de>	Thu Jul 27 09:01:57 2023 +0200

tdf#146576 - Propose clipboard content when inserting a hyperlink

Adding CC to: Andreas Heinisch
Comment 1 Andreas Heinisch 2023-11-24 06:36:49 UTC
Could you reproduce it under windows, too?
Comment 2 Julien Nabet 2023-11-24 18:24:11 UTC
Created attachment 191029 [details]
bt with debug symbols

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

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

I tried "catch throw" in gdb and got the attached bt.
Comment 3 Julien Nabet 2023-11-24 18:38:19 UTC
Just for the record, I don't reproduce this with gtk3 rendering.
Comment 4 Julien Nabet 2023-11-24 19:29:47 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/159939

I took a look at the other locations which call "getTransferData" and most of them (all?) just catch the exception and do nothing with it.
Comment 5 Commit Notification 2023-11-24 20:32:07 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/516f800f84b533db0082b1f39c19d1af40ab29c8

tdf#158345: Opening Hyperlink dialog leads to crash

It will be available in 24.2.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 6 Andreas Heinisch 2023-11-24 20:41:01 UTC
Thank you Julien for providing a fix. Highly appreciated.