maliit / keyboard

Maliit Keyboard, a free software virtual keyboard for Linux
GNU General Public License v3.0
161 stars 41 forks source link

Quite weird issue with the maliit-keyboard/framework on Plasma 5.25.5 (KWin with Wayland-backend) #197

Closed SergeyKipet closed 1 year ago

SergeyKipet commented 1 year ago

Hi folks,

Currently dealing to not that recent KDE Plasma (v.5.25.5) + KWin with Wayland run on a geek mobile device (AYYA), maliit-keyboard plugin (as well as maliit-framework - both are of 2.2.0-1 version) is also present (detached by KWin).

Noticed a weird behavior when launching the virtual keyboard settings menu (launched from the maliit-keyboard QML-code by using the Qt.openUrlExternally("settings://kcm_translations")).

The mentioned call (to Qt.openUrlExternally()) at its very end leads to the the qtbase-library (qgenericunixservices.cpp), which just detaches a new process with the /usr/bin/xdg-open settings://kcm_translations, and according to the KWin window manager debugging results, KWin doesn't advertise support of the _zwp_input_panel_v1/zwp_input_methodv1 Wayland-protocols for the the detached process, that's why it's simply crashed in maliit-framework internals (if detached on-behalf of the maliit-keyboard plugin which is a child of the KWin itself), and if it advertises support of the Wayland-protocols (in case of the process is detached from a native app launched on-behalf of the Plasmashell, e.g., Plasma-phonebook) the behavior is correct and corresponding menu is successfully displayed (the detached process is not immediately vanished due to a crash within the maliit-framework internals)...

Although the issue looks just like https://github.com/maliit/framework/issues/85, it doesn't seem to have the same root-cause.

Please, find the gdb backtrace of the crash happening:

Core was generated by `/usr/bin/systemsettings '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000007f8c72844c in QtWaylandClient::QWaylandInputPanelShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow*) () from /usr/lib64/qt5/plugins/wayland-shell-integration/libinputpanel-shell.so
[Current thread is 1 (Thread 0x7fb6b8b020 (LWP 201296))]
(gdb) bt
#0  0x0000007f8c72844c in QtWaylandClient::QWaylandInputPanelShellIntegration::createShellSurface(QtWaylandClient::QWaylandWindow*) () from /usr/lib64/qt5/plugins/wayland-shell-integration/libinputpanel-shell.so
#1  0x0000007fb1cd7308 in QtWaylandClient::QWaylandWindow::initWindow() () from /lib64/libQt5WaylandClient.so.5
#2  0x0000007fb1cd90cc in QtWaylandClient::QWaylandWindow::setVisible(bool) () from /lib64/libQt5WaylandClient.so.5
#3  0x0000007fb5b6e680 in QWindowPrivate::setVisible(bool) () from /lib64/libQt5Gui.so.5
#4  0x0000007fb62ff60c in QWidgetPrivate::show_sys() () from /lib64/libQt5Widgets.so.5
#5  0x0000007fb6315144 in QWidgetPrivate::show_helper() () from /lib64/libQt5Widgets.so.5
#6  0x0000007fb6314f54 in QWidgetPrivate::setVisible(bool) () from /lib64/libQt5Widgets.so.5
#7  0x0000000000225fd4 in SettingsBase::changePlugin() ()
#8  0x0000000000228700 in SettingsBase::initApplication() ()
#9  0x0000007fb56a4b64 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#10 0x0000007fb6312ed0 in QWidget::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#11 0x0000007fb644935c in QMainWindow::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#12 0x0000007fb6dc3b0c in KMainWindow::event(QEvent*) () from /lib64/libKF5XmlGui.so.5
#13 0x0000007fb6df91ec in KXmlGuiWindow::event(QEvent*) () from /lib64/libKF5XmlGui.so.5
#14 0x0000007fb62d0780 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#15 0x0000007fb62ce7a8 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#16 0x0000007fb566e034 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#17 0x0000007fb566eab8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#18 0x0000007fb56e0f48 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5Core.so.5
#19 0x0000007fb33ffb2c in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#20 0x0000007fb33fff2c in g_main_context_iterate () from /lib64/libglib-2.0.so.0
#21 0x0000007fb340002c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#22 0x0000007fb56e128c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#23 0x0000007fb56655e8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#24 0x0000007fb566e644 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#25 0x00000000002207c8 in main ()

Would appreciate any feedback regarding the issue I've just posted above, thanks!