Bug 451685

Summary: Missing regional formats lead to crashes in other apps
Product: [Applications] systemsettings Reporter: simonisfrederic <simonisfrederic>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate
Priority: NOR    
Version: 5.24.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description simonisfrederic@gmail.com 2022-03-19 13:47:26 UTC
SUMMARY

When selecting regional formats in the KDE system settings, the system does not check if the selected locales are actually installed.
Choosing and applying a missing locale will succeed, but then cause applications to crash that attempt to use said locales.

STEPS TO REPRODUCE
1. open system settings > regional settings > formats
2. select a locale not present on the system
3. apply
4. log out and back in
5. open an app that uses the changed missing locale

OBSERVED RESULT

Some apps crash.

I observed crashes originating from boost::filesystem::path::codecvt() trying to construct a std::locale.

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

EXPECTED RESULT

The settings panel should at least warn the user in some way.
One could argue that applying such changes shouldn't be possible. 
Ideally, the missing locales should be installed by KDE.

SOFTWARE/OS VERSIONS
Linux: Arch
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

(Sorry, I couldn't find the system settings in the component menu)
Comment 1 Nate Graham 2022-03-26 03:58:10 UTC

*** This bug has been marked as a duplicate of bug 403580 ***