Bug 465484

Summary: System Settings Crashes While Importing A OpenVPN Config
Product: [Applications] systemsettings Reporter: Ilgın Yılmaz <ilgin_yilmaz>
Component: kcm_networkmanagementAssignee: Jan Grulich <jgrulich>
Status: RESOLVED FIXED    
Severity: crash CC: bogdan.ilchyshyn, code, daniel, dirtydog01, dyle71, kde, nate, nicolas.fella, plasma-bugs, pulkitkrishna00, rutskiy, zosoled
Priority: NOR Keywords: drkonqi, regression
Version: 5.26.90   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.27.3
Attachments: New crash information added by DrKonqi
krash report when importing an OpenVPN file into nm-applet
New crash information added by DrKonqi

Description Ilgın Yılmaz 2023-02-08 17:10:18 UTC
Application: systemsettings (5.26.90)

Qt Version: 5.15.8
Frameworks Version: 5.102.0
Operating System: Linux 6.1.9-arch1-2 x86_64
Windowing System: X11
Distribution: "Arch Linux"
DrKonqi: 5.26.90 [KCrashBackend]

-- Information about the crash:
I was trying to import a openvpn configuration file from ProtonVPN. Everytime I click on new connection > Import VPN configuration and select that config, System Settings app crashes

The crash can be reproduced every time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Segmentation fault

[KCrash Handler]
#4  0x00007ff61ad0db97 in OpenVpnUiPlugin::importConnectionSettings(QString const&) () at /usr/lib/qt/plugins/plasma/network/vpn/plasmanetworkmanagement_openvpnui.so
#5  0x00007ff652962f7f in  () at /usr/lib/qt/plugins/plasma/kcms/systemsettings_qwidgets/kcm_networkmanagement.so
#6  0x00007ff673cbec20 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007ff671a3209c in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () at /usr/lib/libQt5Qml.so.5
#8  0x00007ff671a76544 in  () at /usr/lib/libQt5Qml.so.5
#9  0x00007ff671977671 in  () at /usr/lib/libQt5Qml.so.5
#10 0x00007ff67197cde2 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () at /usr/lib/libQt5Qml.so.5
#11 0x00007ff67198eda3 in  () at /usr/lib/libQt5Qml.so.5
#12 0x00007ff671994804 in  () at /usr/lib/libQt5Qml.so.5
#13 0x00007ff671936c36 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () at /usr/lib/libQt5Qml.so.5
#14 0x00007ff671a971ad in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () at /usr/lib/libQt5Qml.so.5
#15 0x00007ff671a537f1 in QQmlBoundSignalExpression::evaluate(void**) () at /usr/lib/libQt5Qml.so.5
#16 0x00007ff671a5476c in  () at /usr/lib/libQt5Qml.so.5
#17 0x00007ff671a7647f in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /usr/lib/libQt5Qml.so.5
#18 0x00007ff673cbe740 in  () at /usr/lib/libQt5Core.so.5
#19 0x00007ff671a3209c in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () at /usr/lib/libQt5Qml.so.5
#20 0x00007ff671a76544 in  () at /usr/lib/libQt5Qml.so.5
#21 0x00007ff671977671 in  () at /usr/lib/libQt5Qml.so.5
#22 0x00007ff67197cde2 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () at /usr/lib/libQt5Qml.so.5
#23 0x00007ff67198eda3 in  () at /usr/lib/libQt5Qml.so.5
#24 0x00007ff671994804 in  () at /usr/lib/libQt5Qml.so.5
#25 0x00007ff671936c36 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () at /usr/lib/libQt5Qml.so.5
#26 0x00007ff671a971ad in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () at /usr/lib/libQt5Qml.so.5
#27 0x00007ff671a537f1 in QQmlBoundSignalExpression::evaluate(void**) () at /usr/lib/libQt5Qml.so.5
#28 0x00007ff671a5476c in  () at /usr/lib/libQt5Qml.so.5
#29 0x00007ff671a7647f in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /usr/lib/libQt5Qml.so.5
#30 0x00007ff673cbe740 in  () at /usr/lib/libQt5Core.so.5
#31 0x00007ff67209fcc7 in QQuickMouseArea::doubleClicked(QQuickMouseEvent*) () at /usr/lib/libQt5Quick.so.5
#32 0x00007ff6720a9905 in QQuickMouseArea::mouseDoubleClickEvent(QMouseEvent*) () at /usr/lib/libQt5Quick.so.5
#33 0x00007ff67204083b in QQuickItem::event(QEvent*) () at /usr/lib/libQt5Quick.so.5
#34 0x00007ff674978b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#35 0x00007ff673c8df48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#36 0x00007ff67204edc5 in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*) () at /usr/lib/libQt5Quick.so.5
#37 0x00007ff67204f812 in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*) () at /usr/lib/libQt5Quick.so.5
#38 0x00007ff6741559f5 in QWindow::event(QEvent*) () at /usr/lib/libQt5Gui.so.5
#39 0x00007ff674978b5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#40 0x00007ff673c8df48 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#41 0x00007ff67413ef46 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#42 0x00007ff674128885 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Gui.so.5
#43 0x00007ff66df2e8d0 in  () at /usr/lib/libQt5XcbQpa.so.5
#44 0x00007ff67271682b in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#45 0x00007ff67276dcc9 in  () at /usr/lib/libglib-2.0.so.0
#46 0x00007ff6727150e2 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#47 0x00007ff673cd8c6c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#48 0x00007ff673c866ec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#49 0x00007ff673c91219 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#50 0x00005561380e2c07 in  ()
#51 0x00007ff67343c790 in  () at /usr/lib/libc.so.6
#52 0x00007ff67343c84a in __libc_start_main () at /usr/lib/libc.so.6
#53 0x00005561380e3595 in  ()
[Inferior 1 (process 1675) detached]

Reported using DrKonqi
Comment 1 Nate Graham 2023-02-08 19:33:23 UTC
#4  0x00007ff61ad0db97 in OpenVpnUiPlugin::importConnectionSettings(QString const&) () at /usr/lib/qt/plugins/plasma/network/vpn/plasmanetworkmanagement_openvpnui.so
#5  0x00007ff652962f7f in  () at /usr/lib/qt/plugins/plasma/kcms/systemsettings_qwidgets/kcm_networkmanagement.so
Comment 2 Pulkit Krishna 2023-02-16 11:22:59 UTC
Created attachment 156295 [details]
New crash information added by DrKonqi

systemsettings (5.27.0) using Qt 5.15.8

When I try to import an OpenVPN config, the settings app crash. The OpenVPN config is from Proton VPN.

-- Backtrace (Reduced):
#4  0x00007f972fd93dee in OpenVpnUiPlugin::importConnectionSettings(QString const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/network/vpn/plasmanetworkmanagement_openvpnui.so
[...]
#7  0x00007fd7960773f5 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
[...]
#10 0x00007fd795fac84a in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
[...]
#13 0x00007fd795f5eaee in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#14 0x00007fd7960eb3a5 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
Comment 3 Oliver Maurhart 2023-03-01 18:42:58 UTC
Created attachment 156891 [details]
krash report when importing an OpenVPN file into nm-applet
Comment 4 Oliver Maurhart 2023-03-01 18:43:16 UTC
Seems I got the same error, yet my kcrash does hold a bit more info. I hope that helps.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.2.1-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 125,7 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: PCSpecialist
Product Name: Amd Am4 Gen3
Comment 5 Oliver Maurhart 2023-03-01 18:51:57 UTC
Ah, silly me! Installing the networkmanager-openvpn make it working again.

pacman -S networkmanager-openvpn

However, I think the KDE/Plasma part should not crash anyway.
Comment 6 Bug Janitor Service 2023-03-02 19:48:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/230
Comment 7 Nicolas Fella 2023-03-13 22:16:34 UTC
Git commit 93607b5347a9469048a99eb1df5fa76abf59eb0c by Nicolas Fella.
Committed on 13/03/2023 at 22:14.
Pushed by nicolasfella into branch 'master'.

Don't crash when importing VPN config with missing NetworkManager plugin

We delegate import of e.g. OpenVPN files to NetworkManager

However that only works when the relevant NetworkManager plugin is installed

Don't crash if it isn't

M  +4    -0    vpn/openvpn/openvpn.cpp
M  +4    -0    vpn/vpnc/vpnc.cpp

https://invent.kde.org/plasma/plasma-nm/commit/93607b5347a9469048a99eb1df5fa76abf59eb0c
Comment 8 Nicolas Fella 2023-03-13 22:21:36 UTC
Git commit 9893c67bd4a7eda7006d5eb7c683e17c1cb49b98 by Nicolas Fella.
Committed on 13/03/2023 at 22:17.
Pushed by nicolasfella into branch 'Plasma/5.27'.

Don't crash when importing VPN config with missing NetworkManager plugin

We delegate import of e.g. OpenVPN files to NetworkManager

However that only works when the relevant NetworkManager plugin is installed

Don't crash if it isn't
(cherry picked from commit 93607b5347a9469048a99eb1df5fa76abf59eb0c)

M  +4    -0    vpn/openvpn/openvpn.cpp
M  +4    -0    vpn/vpnc/vpnc.cpp

https://invent.kde.org/plasma/plasma-nm/commit/9893c67bd4a7eda7006d5eb7c683e17c1cb49b98
Comment 9 Nicolas Fella 2023-04-05 20:32:23 UTC
*** Bug 467521 has been marked as a duplicate of this bug. ***
Comment 10 Nicolas Fella 2023-04-05 20:32:28 UTC
*** Bug 468182 has been marked as a duplicate of this bug. ***
Comment 11 Nicolas Fella 2023-04-12 14:14:58 UTC
*** Bug 466926 has been marked as a duplicate of this bug. ***
Comment 12 Nicolas Fella 2023-04-28 11:02:29 UTC
*** Bug 469084 has been marked as a duplicate of this bug. ***
Comment 13 Andrey 2023-05-25 13:20:52 UTC
Created attachment 159250 [details]
New crash information added by DrKonqi

systemsettings (5.27.2) using Qt 5.15.8

System Settings crashes on import of OpenVPN configuration file .ovpn

-- Backtrace (Reduced):
#4  0x00007fce36ac16ae in OpenVpnUiPlugin::importConnectionSettings(QString const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/network/vpn/plasmanetworkmanagement_openvpnui.so
[...]
#7  0x00007fce74c6eb78 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
[...]
#10 0x00007fce74ba53e0 in QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
[...]
#13 0x00007fce74b57c2e in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5
#14 0x00007fce74ce144d in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () from /lib/x86_64-linux-gnu/libQt5Qml.so.5