https://bugs.kde.org/show_bug.cgi?id=504126

            Bug ID: 504126
           Summary: kioworker thumbnail.so crashes with Oxygen on X11
    Classification: Frameworks and Libraries
           Product: kio-extras
           Version: 25.04.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Thumbnails and previews
          Assignee: plasma-b...@kde.org
          Reporter: loic.yh...@gmail.com
                CC: kivanov1...@gmail.com
  Target Milestone: ---

SUMMARY
Crash seen in logs on startup, and when launching dolphin

STEPS TO REPRODUCE
1. /usr/libexec/kf6/kioworker /usr/lib64/qt6/plugins/kf6/kio/thumbnail.so
thumbnail "" local:/run/user/1000/dolphinVCPkXE.6.kioworker.socket

OBSERVED RESULT
crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 41
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0 
Qt Version: 6.8.2

ADDITIONAL INFORMATION
It seems to be a regression from
https://invent.kde.org/network/kio-extras/-/commit/e11dfd86bd075afc7ff5c5eec70bc5d2377c4168.

During the QGuiApplication constructor, KWindowSystem::platform()::s_platform
is set to KWindowSystem::Platform::X11.
Then during the QApplication constructor, Oxygen calls
KWindowSystem::isPlatformX11() which returns true, so it uses
QX11Info::connection() as xcb_intern_atom argument. But we are on the
"offscreen" platform now, so there is no xcb connection.

So KWindowSystem assumes the platform does not change, the kio-extra change
breaks this assumption by changing QT_QPA_PLATFORM.

#0  initPlatform () at
/usr/src/debug/kf6-kwindowsystem-6.14.0-1.fc41.x86_64/src/kwindowsystem.cpp:131
#1  KWindowSystem::platform () at
/usr/src/debug/kf6-kwindowsystem-6.14.0-1.fc41.x86_64/src/kwindowsystem.cpp:152
#2  0x00007ffff22ee87d in KWindowSystem::isPlatformX11 () at
/usr/src/debug/kf6-kwindowsystem-6.14.0-1.fc41.x86_64/src/kwindowsystem.cpp:158
#3  0x00007ffff054884a in KdePlatformTheme::KdePlatformTheme
(this=0x55555560b440, this=<optimized out>) at
/usr/src/debug/plasma-integration-6.3.5-1.fc41.x86_64/qt6/src/platformtheme/kdeplatformtheme.cpp:78
#4  0x00007ffff05569b2 in KdePlatformThemePlugin::create (this=<optimized out>,
key=<optimized out>, paramList=<optimized out>) at
/usr/src/debug/plasma-integration-6.3.5-1.fc41.x86_64/qt6/src/platformtheme/main.cpp:25
#5  0x00007ffff532dacf in qLoadPlugin<QPlatformTheme, QPlatformThemePlugin,
QList<QString>&> (loader=0x7ffff5bdf820
<QGlobalStatic<QtGlobalStatic::Holder<(anonymous namespace)::Q_QGS_ptLoader>
>::instance()::holder>, key=...)
    at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/plugin/qfactoryloader_p.h:100
#6  QPlatformThemeFactory::create (key=..., platformPluginPath=...) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qplatformthemefactory.cpp:27
#7  0x00007ffff52dbc22 in init_platform (pluginNamesWithArguments=...,
platformPluginPath=..., platformThemeName=..., argc=@0x7fffffffca9c: 4,
argv=argv@entry=0x7fffffffd6c8)
    at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1354
#8  0x00007ffff52df678 in QGuiApplicationPrivate::createPlatformIntegration
(this=0x5555555966d0) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1580
#9  0x00007ffff52e00f0 in QGuiApplicationPrivate::createEventDispatcher
(this=<optimized out>) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1599
#10 0x00007ffff76fa885 in QCoreApplicationPrivate::init
(this=this@entry=0x5555555966d0) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/kernel/qcoreapplication.cpp:931
#11 0x00007ffff52e3c5d in QGuiApplicationPrivate::init (this=0x5555555966d0) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.cpp:1627
#12 0x00007ffff52e58e5 in QGuiApplication::QGuiApplication
(this=this@entry=0x7fffffffcaf0, argc=@0x7fffffffca9c: 4,
argv=argv@entry=0x7fffffffd6c8) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/gui/kernel/qguiapplication.h:172
#13 0x00007ffff7f9e6c1 in kdemain (argc=<optimized out>, argc@entry=4,
argv=0x7fffffffd6c8) at
/usr/src/debug/kio-extras-25.04.0-1.fc41.x86_64/thumbnail/thumbnail.cpp:116

#0  0x00007ffff2e55c88 in xcb_send_request_with_fds64 (c=0x0,
flags=flags@entry=1, vector=vector@entry=0x7fffffffc5e0,
req=req@entry=0x7ffff2e6d760 <xcb_req>, num_fds=num_fds@entry=0,
fds=fds@entry=0x0)
    at /usr/src/debug/libxcb-1.17.0-3.fc41.x86_64/src/xcb_out.c:233
#1  0x00007ffff2e5631f in xcb_send_request64 (c=<optimized out>,
flags=flags@entry=1, vector=vector@entry=0x7fffffffc5e0,
req=req@entry=0x7ffff2e6d760 <xcb_req>) at
/usr/src/debug/libxcb-1.17.0-3.fc41.x86_64/src/xcb_out.c:353
#2  0x00007ffff2e5632d in xcb_send_request (c=<optimized out>,
flags=flags@entry=1, vector=vector@entry=0x7fffffffc5e0,
req=req@entry=0x7ffff2e6d760 <xcb_req>) at
/usr/src/debug/libxcb-1.17.0-3.fc41.x86_64/src/xcb_out.c:359
#3  0x00007ffff2e577bb in xcb_intern_atom (c=<optimized out>,
only_if_exists=<optimized out>, name_len=<optimized out>, name=<optimized out>)
at /usr/src/debug/libxcb-1.17.0-3.fc41.x86_64/src/xproto.c:3224
#4  0x00007fffe80f7d22 in Oxygen::Helper::createAtom (this=<optimized out>,
name=...) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/liboxygen/oxygenhelper.cpp:749
#5  Oxygen::Helper::createAtom (this=this@entry=0x5555559ca800, name=...) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/liboxygen/oxygenhelper.cpp:745
#6  0x00007fffe818a653 in Oxygen::StyleHelper::init (this=0x5555559ca800) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/kstyle/oxygenstylehelper.cpp:1410
#7  Oxygen::StyleHelper::init (this=0x5555559ca800) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/kstyle/oxygenstylehelper.cpp:1402
#8  Oxygen::StyleHelper::StyleHelper (this=0x5555559ca800, config=...) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/kstyle/oxygenstylehelper.cpp:35
#9  Oxygen::Style::Style (this=0x5555559ca720, this=<optimized out>) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/kstyle/oxygenstyle.cpp:188
#10 0x00007fffe81c363a in Oxygen::StylePlugin::create (this=<optimized out>,
key=<optimized out>) at
/usr/src/debug/plasma-oxygen-6.3.5-1.fc41.x86_64/kstyle/oxygenstyleplugin.cpp:17
#11 0x00007ffff18ec69e in qLoadPlugin<QStyle, QStylePlugin>
(loader=0x7ffff1fd29f0 <QGlobalStatic<QtGlobalStatic::Holder<(anonymous
namespace)::Q_QGS_loader> >::instance()::holder>, key=...)
    at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/corelib/plugin/qfactoryloader_p.h:100
#12 QStyleFactory::create (key=...) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/styles/qstylefactory.cpp:77
#13 0x00007ffff18438d0 in QApplication::style () at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:915
#14 0x00007ffff1843f21 in QApplicationPrivate::initialize
(this=this@entry=0x55555579a610) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:540
#15 0x00007ffff1844145 in QApplicationPrivate::init (this=0x55555579a610) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:487
#16 0x00007ffff18441cd in QApplication::QApplication (this=<optimized out>,
argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/qt6-qtbase-6.8.2-3.fc41.x86_64/src/widgets/kernel/qapplication.cpp:462
#17 0x00007ffff7f9e7ac in kdemain (argc=<optimized out>, argc@entry=4,
argv=0x7fffffffd6c8) at
/usr/src/debug/kio-extras-25.04.0-1.fc41.x86_64/thumbnail/thumbnail.cpp:127
#18 0x00005555555554ed in main (argc=5, argv=0x7fffffffd858) at
/usr/src/debug/kf6-kio-6.14.0-3.fc41.x86_64/src/kioworker/kioworker.cpp:144

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to