Bug 487587 - Dolphin crashes when I try to open a WebDAV location
Summary: Dolphin crashes when I try to open a WebDAV location
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.02.2
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-05-26 12:18 UTC by Tomasz Kaźmierczak
Modified: 2024-09-08 15:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Kaźmierczak 2024-05-26 12:18:03 UTC
Application: dolphin (24.02.2)

Qt Version: 6.7.0
Frameworks Version: 6.1.0
Operating System: Linux 6.5.0-10036-tuxedo x86_64
Windowing System: Wayland
Distribution: TUXEDO OS 3
DrKonqi: 6.0.4 [KCrashBackend]

-- Information about the crash:
Whenever I'm trying to access a WebDAV resource using Dolphin, the application crashes.

This happens after trying to open the resource by clicking a "shortcut" file, but also after directly entering the URL (webdavs://****:2078) into the Dolphin's address bar.

This affects Dolphin 24.02.2 with Plasma 6 (TuxedoOS), but does NOT happen in Dolphin 23.08.1 with Plasma 5 (Kubuntu).

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Aborted

[KCrash Handler]
#4  __pthread_kill_implementation (no_tid=0, signo=6, threadid=132166446316224) at ./nptl/pthread_kill.c:44
#5  __pthread_kill_internal (signo=6, threadid=132166446316224) at ./nptl/pthread_kill.c:78
#6  __GI___pthread_kill (threadid=132166446316224, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#7  0x000078346ae42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x000078346ae287f3 in __GI_abort () at ./stdlib/abort.c:79
#9  0x000078346bafdb6e in qAbort () at ./src/corelib/global/qglobal.cpp:161
#10 0x000078346baf820a in qt_message_fatal<QString&> (message=..., context=...) at ./src/corelib/global/qlogging.cpp:2025
#11 qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, context=..., msg=<optimized out>, ap=ap@entry=0x7ffd456804a0) at ./src/corelib/global/qlogging.cpp:374
#12 0x000078346bafe511 in QMessageLogger::fatal (this=<optimized out>, msg=<optimized out>) at ./src/corelib/global/qlogging.cpp:889
#13 0x000078346bac2ac2 in qt_assert (assertion=assertion@entry=0x78346db9eaa7 "!path2.startsWith(s_slash)", file=file@entry=0x78346db9ea8f "./src/core/../utils_p.h", line=line@entry=122) at ./src/corelib/global/qassert.cpp:68
#14 0x000078346da83ef9 in Utils::concatPaths (path1=..., path2=...) at ./src/core/../utils_p.h:120
#15 Utils::concatPaths (path1=..., path2=...) at ./src/core/../utils_p.h:120
#16 0x000078346daaff0f in KFileItemPrivate::readUDSEntry (this=this@entry=0x56696d6e3890, _urlIsDirectory=_urlIsDirectory@entry=true) at ./src/core/kfileitem.cpp:318
#17 0x000078346dab26bc in KFileItemPrivate::KFileItemPrivate (permissions=4294967295, mimeTypeDetermination=KFileItem::NormalMimeTypeDetermination, delayedMimeTypes=<optimized out>, urlIsDirectory=true, itemOrDirUrl=..., mode=4294967295, entry=..., this=0x56696d6e3890) at ./src/core/kfileitem.cpp:74
#18 KFileItem::KFileItem (this=<optimized out>, entry=..., itemOrDirUrl=..., delayedMimeTypes=<optimized out>, urlIsDirectory=<optimized out>, this=<optimized out>, entry=..., itemOrDirUrl=..., delayedMimeTypes=<optimized out>, urlIsDirectory=<optimized out>) at ./src/core/kfileitem.cpp:579
#19 0x000078346db42c81 in KCoreDirListerCache::slotEntries (this=<optimized out>, job=<optimized out>, entries=...) at ./src/core/kcoredirlister.cpp:1202
#20 0x000078346ba6355e in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ./src/corelib/kernel/qobjectdefs_impl.h:469
#21 doActivate<false> (sender=0x56696d4b77f0, signal_index=19, argv=0x7ffd456809f0) at ./src/corelib/kernel/qobject.cpp:4078
#22 0x000078346daf5c08 in KIO::ListJob::entries (this=<optimized out>, _t1=<optimized out>, _t2=...) at ./obj-x86_64-linux-gnu/src/core/KF6KIOCore_autogen/include/moc_listjob.cpp:254
#23 0x000078346ba6355e in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ./src/corelib/kernel/qobjectdefs_impl.h:469
#24 doActivate<false> (sender=0x56696d71aa10, signal_index=9, argv=0x7ffd45680c50) at ./src/corelib/kernel/qobject.cpp:4078
#25 0x000078346db62598 in KIO::WorkerInterface::listEntries (_t1=..., this=0x56696d71aa10) at ./obj-x86_64-linux-gnu/src/core/KF6KIOCore_autogen/include/moc_workerinterface_p.cpp:539
#26 KIO::WorkerInterface::dispatch (this=0x56696d71aa10, _cmd=<optimized out>, rawdata=...) at ./src/core/workerinterface.cpp:146
#27 0x000078346db5b5e3 in KIO::WorkerInterface::dispatch (this=0x56696d71aa10) at ./src/core/workerinterface.cpp:60
#28 0x000078346db5814a in KIO::Worker::gotInput (this=0x56696d71aa10) at ./src/core/worker.cpp:263
#29 0x000078346ba6355e in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ./src/corelib/kernel/qobjectdefs_impl.h:469
#30 doActivate<false> (sender=0x56696d152ec0, signal_index=3, argv=0x7ffd45680e18) at ./src/corelib/kernel/qobject.cpp:4078
#31 0x000078346b9fa272 in QObject::event (this=0x56696d152ec0, e=0x56696d587850) at ./src/corelib/kernel/qobject.cpp:1446
#32 0x000078346cc0992b in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x56696d152ec0, e=0x56696d587850) at ./src/widgets/kernel/qapplication.cpp:3287
#33 0x000078346baa1c38 in QCoreApplication::notifyInternal2 (receiver=0x56696d152ec0, event=event@entry=0x56696d587850) at ./src/corelib/kernel/qcoreapplication.cpp:1134
#34 0x000078346baa1c7d in QCoreApplication::sendEvent (receiver=<optimized out>, event=event@entry=0x56696d587850) at ./src/corelib/kernel/qcoreapplication.cpp:1575
#35 0x000078346baa23e0 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x56696c9145d0) at ./src/corelib/kernel/qcoreapplication.cpp:1932
#36 0x000078346b878277 in postEventSourceDispatch (s=0x56696c99a240) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:244
#37 0x0000783469d1bd3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x0000783469d712b8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x0000783469d193e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x000078346b876570 in QEventDispatcherGlib::processEvents (this=0x56696c92c3a0, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:394
#41 0x000078346baa3e3b in QEventLoop::exec (this=this@entry=0x7ffd45681230, flags=..., flags@entry=...) at ./src/corelib/global/qflags.h:34
#42 0x000078346baa5a6c in QCoreApplication::exec () at ./src/corelib/global/qflags.h:74
#43 0x000078346bee4330 in QGuiApplication::exec () at ./src/gui/kernel/qguiapplication.cpp:1926
#44 0x000078346cc078d9 in QApplication::exec () at ./src/widgets/kernel/qapplication.cpp:2555
#45 0x000056696b1198b3 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:253
[Inferior 1 (process 18952) detached]

Reported using DrKonqi
Comment 1 Tomasz Kaźmierczak 2024-07-16 18:32:32 UTC
I was trying to debug the issue.

I've run Dolphin in gdb (with debug symbols loaded, but without the source code attached) and the crash indeed, as the stack trace suggests, is caused by the fact that some entry processed by KFileItem starts with the slash character - in the console I can see the following message:

    ASSERT: "!path2.startsWith(QLatin1Char('/'))" in file ./src/core/../utils_p.h, line 109

Then, in the debugger, I noticed that the string (m_strName) is actually the slash: "/". So I figured that Dolphin may just not like root paths in WebDAV URLs and I started playing with the URL.

Originally my URL was like this (address and port number are obviously made up):
    webdavs://my-domain.com:1234

This crashed Dolphin. So I've tried the following:
    webdavs://my-domain.com:1234/

It worked!

Yes - a slash at the end of URL stopped Dolphin from crashing, although the source code complained about a slash...

Anyway, I think that Dolphin should accept URLs with no trailing slashes (or at least it shouldn't be crashing if one is not there).
Comment 2 Tomasz Kaźmierczak 2024-07-16 18:38:04 UTC
Perhaps I should add that this bug still exists in Dolphin 24.05.2 running on the following system:

Qt Version: 6.7.0
Frameworks Version: 6.3.0
KDE Plasma Version: 6.1.2
OS: Linux 6.5.0-10043-tuxedo x86_64
Windowing System: Wayland
Distribution: TUXEDO OS 3
Comment 3 Tomasz Kaźmierczak 2024-09-08 15:44:07 UTC
Bug still exists in:

Dolphin Version: 24.08.0
Frameworks Version: 6.5.0
KDE Plasma Version: 6.1.4
Qt Version: 6.7.2
OS: Linux 6.8.0-101041-tuxedo x86_64
Windowing System: Wayland
Distribution: TUXEDO OS 3