Bug 485937

Summary: polkit-kde-authentication-agent-1 crashes, if QT style is overridden (QT_STYLE_OVERRIDE), only Fusion works
Product: [Plasma] policykit-kde-agent-1 Reporter: Fabian Arndt <fabian.arndt>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: crash CC: drf, jgrulich, jreznik, nate
Priority: NOR    
Version: 6.0.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=485407
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Stack trace

Description Fabian Arndt 2024-04-22 03:23:47 UTC
Created attachment 168779 [details]
Stack trace

SUMMARY

It crashed, if the specified theme is not present/accessible (?). The only working Theme is "Fusion".
This is happened on hyprland, as I was testing polkit with it. Nonetheless, it should not crash.


STEPS TO REPRODUCE

1. Run "QT_STYLE_OVERRIDE=Adwaita-Dark /usr/libexec/kf6/polkit-kde-authentication-agent-1"
2. Open a program that requests elevated rights (rg. partitionmanager)


OBSERVED RESULT

Crash. Some stdout output:

> QQmlApplicationEngine failed to load component
> qrc:/qml/QuickAuthDialog.qml: module "Adwaita-Dark" is not installed
> KCrash: appFilePath points to nullptr!
> KCrash: Application '<unknown>' crashing... crashRecursionCounter = 2
> Segmentation fault


EXPECTED RESULT

No crash and a themed dialog that elevated rights.


SOFTWARE/OS VERSIONS

CAUTION: I was using hyprland!

Linux: Nobara Linux 39
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2


ADDITIONAL INFORMATION

If you enter something random as QT_STYLE_OVERRIDE, it does not crash. It instead tells you which styles could be used and falls back to Fusion.

> Available styles: Breeze, qt5ct-style, qt6ct-style, HighContrastInverse, HighContrast, Adwaita-HighContrastInverse, Adwaita-HighContrast, Adwaita-Dark, Adwaita, Windows, Fusion