720f238cf8
QApplication has a historical feature[1] of calling setlocale(3) at init, which today cause more harm than good. Such call isn't thread safe neither per C standard, not per any known libc implementation. The Gio threads would call into locale reading functions all the time, so early access to locale by Gio may race with setlocale() by Qt leading to undefined behavior. Platform specific start before the Sandbox (aka QApplication) is at core design of tdesktop and that order can't be changed. There is no way to pause Gio until QApplication instantiates. Fortunately, Qt library itself has a static global flag that prevents it from calling setlocale() twice. We don't even need to instantiate a temporary QCoreApplication, we can just call into the method. So call it form Platform::start before any existing or future calls to Gio. Fixes #16922 [1] https://chat.stackoverflow.com/rooms/63812/discussion-between-phil-armstrong-and-matteo-italia |
||
---|---|---|
.. | ||
Resources | ||
SetupFiles | ||
SourceFiles | ||
Telegram | ||
ThirdParty | ||
build | ||
cmake | ||
codegen@b1c206550e | ||
lib_base@4ccf5d6c8c | ||
lib_crl@ec103d6bcc | ||
lib_lottie@25294ef8da | ||
lib_qr@2b08c71c6e | ||
lib_rlottie@0671bf7054 | ||
lib_rpl@df721be3fa | ||
lib_spellcheck@212d660cbb | ||
lib_storage@403df6c4a2 | ||
lib_tl@45faed44e7 | ||
lib_ui@5b521d63a4 | ||
lib_waylandshells@59b0ee55a6 | ||
lib_webrtc@29d5131791 | ||
lib_webview@3cb51ac668 | ||
CMakeLists.txt | ||
Telegram.plist | ||
configure.bat | ||
configure.py | ||
configure.sh | ||
create.bat |