Bug 166365 - Crash in file picker, directory property
Summary: Crash in file picker, directory property
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium major
Assignee: Julien Nabet
URL:
Whiteboard: target:25.8.0 target:25.2.4 target:24...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-27 11:08 UTC by Jean-Pierre Ledure
Modified: 2025-04-30 11:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Pierre Ledure 2025-04-27 11:08:48 UTC
Steps to reproduce the bug:
--------------------------
1. Create a new document (type does not matter).
2. Open the Basic IDE
3. Insert next code in the Main sub of any module
     Dim fp, d
     fp = CreateUnoService("com.sun.star.ui.dialogs.FilePicker")
     d = fp.Directory
4. (Save and) run the code
5. LO crash

LO Version:
----------
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 6; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-BE (en_US.UTF-8); UI: en-US
Calc: threaded

Other comments:
--------------
- You get a crash too when executing the code step-by-step and try to expand the fp variable in the IDE Watch window.
- You get a crash too if you replace "d = ..." by the "xray fp" statement.
     Dim fp, d
     fp = CreateUnoService("com.sun.star.ui.dialogs.FilePicker")
     xray fp
- You get also a crash when you create a FolderPicker instead of a FilePicker.
Comment 1 Julien Nabet 2025-04-27 21:16:13 UTC
On pc Debian x86-64 with master sources updated today, I got an assert:
#4  0x00007f1a7e632420 in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=206, function=<optimized out>) at ./assert/assert.c:118
#5  0x00007f1a6a7840f8 in com::sun::star::uno::Sequence<rtl::OUString>::operator[] (this=0x7ffe7350d770, nIndex=0) at include/com/sun/star/uno/Sequence.hxx:206
#6  0x00007f1a6a77bfba in QtFilePicker::getDirectory (this=0x55c294488250) at /home/julien/lo/libreoffice/vcl/qt5/QtFilePicker.cxx:963
#7  0x00007f1a6a77c047 in non-virtual thunk to QtFilePicker::getDirectory() () at /home/julien/lo/libreoffice/instdir/program/libvclplug_qt5lo.so
#8  0x00007f1a645381ad in gcc3::callVirtualMethod
    (pThis=0x55c294488308, nVtableIndex=7, pRegisterReturn=0x7ffe7350dd00, pReturnTypeRef=0x55c28e6556e0, bSimpleReturn=false, pStack=0x7ffe7350d8b0, nStack=0, pGPR=0x7ffe7350db80, pFPR=0x7ffe7350db40)
    at /home/julien/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87
#9  0x00007f1a64536f1b in cpp_call
    (pThis=0x55c297891580, aVtableSlot=..., pReturnTypeRef=0x55c28e6556e0, nParams=0, pParams=0x55c29782d5b0, pUnoReturn=0x7ffe7350dd00, pUnoArgs=0x7ffe7350dd00, ppUnoExc=0x7ffe7350dfc0)
    at /home/julien/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:229
#10 0x00007f1a645366e6 in unoInterfaceProxyDispatch (pUnoI=0x55c297891580, pMemberDescr=0x55c29787e240, pReturn=0x7ffe7350dd00, pArgs=0x7ffe7350dd00, ppException=0x7ffe7350dfc0)
    at /home/julien/lo/libreoffice/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:409
#11 0x00007f1a19204a3a in stoc_corefl::(anonymous namespace)::IdlInterfaceMethodImpl::invoke (this=0x55c2973909d0, rObj=uno::Any("com.sun.star.uno.XInterface": ...), rArgs=empty uno::Sequence)
    at /home/julien/lo/libreoffice/stoc/source/corereflection/criface.cxx:591
Comment 2 Julien Nabet 2025-04-27 21:17:30 UTC
Considering the bt, it must be specific to kf5.
For a workaround, you can try gen or gtk3 renderings, it should be ok.
export SAL_USE_VCLPLUGIN=gen
or export SAL_USE_VCLPLUGIN=gtk3
Comment 3 Julien Nabet 2025-04-27 21:22:25 UTC
I gave a try with:
https://gerrit.libreoffice.org/c/core/+/184691
Comment 4 Commit Notification 2025-04-28 06:26:25 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#166365: Crash in file picker, directory property (kf5/kf6)

It will be available in 25.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 5 Julien Nabet 2025-04-28 06:26:52 UTC
Cherry-pick for 25.2 branch here:
https://gerrit.libreoffice.org/c/core/+/184694
Comment 6 Commit Notification 2025-04-28 07:53:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/53940f818f720d948b3d857dc9c66bdcbc999872

tdf#166365: Crash in file picker, directory property (kf5/kf6)

It will be available in 25.2.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 7 Commit Notification 2025-04-28 09:13:51 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

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

tdf#166365: Crash in file picker, directory property (kf5/kf6)

It will be available in 24.8.8.

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 Commit Notification 2025-04-30 11:32:01 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-24-8-7":

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

tdf#166365: Crash in file picker, directory property (kf5/kf6)

It will be available in 24.8.7.

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 9 Julien Nabet 2025-04-30 11:51:34 UTC
Simplify targets a bit.