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

--- Comment #3 from [email protected] ---
Follow-up with QT_DEBUG_PLUGINS=1 output, which pins down why xcb works and
Wayland crashes.

Versions: Mathematica bundles Qt 6.5.0 (plugin metadata version 394496),
the system runs Qt 6.10.0 (395776).

xcb: Qt finds Mathematica's platforms/libqxcb.so and xcbglintegrations plugins
first
via the inherited QT_PLUGIN_PATH, but rejects them:

  qt.core.plugin.factoryloader: Ignoring QPA plugin due to mismatching Qt
versions 395776 394496

It then loads the system plugins from /usr/lib/x86_64-linux-gnu/qt6/plugins,
and
kde-open works.

Wayland: the shell integration plugins
(wayland-shell-integration/libxdg-shell.so) are
loaded by QtWaylandClient's QWaylandShellIntegrationFactory. Their IID is
outside the
org.qt-project.Qt.QPA namespace, so the exact-version check does not apply, and
Mathematica's Qt 6.5 libxdg-shell.so is loaded into Qt 6.10. It depends on Qt
private API, hence the SEGV in QWaylandXdgShellIntegration::initialize. The
same gap
also lets Mathematica's 6.5 platforminputcontexts plugin load (it happens not
to crash).

Conclusion: the root cause is in Qt. Its version check for private-API plugins
does
not cover Wayland shell integration plugins. The fix would be to apply the same
check
in QWaylandShellIntegrationFactory. Mathematica leaking QT_PLUGIN_PATH is only
the
trigger; any application bundling an older Qt and passing QT_PLUGIN_PATH to
child
processes will cause the same crash.

Workaround: run kde-open with QT_PLUGIN_PATH unset, e.g. via a wrapper.

Should I report this upstream at bugreports.qt.io, or would someone here prefer
to forward it?

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

Reply via email to