gpt4 book ai didi

c - setlocale 卡在 Windows 上

转载 作者:可可西里 更新时间:2023-11-01 12:41:07 25 4
gpt4 key购买 nike

setlocale(LC_ALL, "uk-UA") 有时我会因未知原因挂起/死锁。调用堆栈是:

ntdll.dll!_ZwWaitForSingleObject@12()   Unknown
ntdll.dll!_RtlpWaitOnCriticalSection@8() Unknown
ntdll.dll!_RtlEnterCriticalSection@4() Unknown
ntdll.dll!_LdrpLoadDll@28() Unknown
ntdll.dll!_LdrLoadDll@16() Unknown
KernelBase.dll!_LoadLibraryExW@12() Unknown
ucrtbased.dll!__crt_findfile_traits::get_invalid_value(void) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> >(enum __acrt_lock_id,class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> &&) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> >(enum __acrt_lock_id,class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> &&) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> >(enum __acrt_lock_id,class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> &&) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> >(enum __acrt_lock_id,class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> &&) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> >(enum __acrt_lock_id,class <lambda_a463b7b0560cfcaf9b17f27c6ef46564> &&) Unknown
ucrtbased.dll!___acrt_can_use_vista_locale_apis() Unknown
ucrtbased.dll!__expandlocale() Unknown
ucrtbased.dll!__wsetlocale() Unknown
ucrtbased.dll!__crt_call_and_cleanup<class <lambda_565169b3e3b494427ce1bebdd17b54ac>,class <lambda_f51fe5fd7c79a33db34fc9310f277369> >(class <lambda_565169b3e3b494427ce1bebdd17b54ac> &&,class <lambda_f51fe5fd7c79a33db34fc9310f277369> &&) Unknown
ucrtbased.dll!__crt_seh_guarded_call<void>::operator()<class <lambda_0f92d0c5a8007722f95b3b6c71cd8e3e>,class <lambda_321f9d61c14d59ff00145e45db1313e0> &,class <lambda_3298c911d7b53f44106027a7fde9a80a> >(class <lambda_0f92d0c5a8007722f95b3b6c71cd8e3e> &&,class <lambda_321f9d61c14d59ff00145e45db1313e0> &,class <lambda_3298c911d7b53f44106027a7fde9a80a> &&) Unknown
ucrtbased.dll!__acrt_lock_and_call<class <lambda_321f9d61c14d59ff00145e45db1313e0> >(enum __acrt_lock_id,class <lambda_321f9d61c14d59ff00145e45db1313e0> &&) Unknown
ucrtbased.dll!__crt_call_and_cleanup<class <lambda_565169b3e3b494427ce1bebdd17b54ac>,class <lambda_f51fe5fd7c79a33db34fc9310f277369> >(class <lambda_565169b3e3b494427ce1bebdd17b54ac> &&,class <lambda_f51fe5fd7c79a33db34fc9310f277369> &&) Unknown
ucrtbased.dll!__crt_seh_guarded_call<void>::operator()<class <lambda_507d9fd6b66e39451a8852ba73f804a7>,class <lambda_565169b3e3b494427ce1bebdd17b54ac> &,class <lambda_f51fe5fd7c79a33db34fc9310f277369> &>(class <lambda_507d9fd6b66e39451a8852ba73f804a7> &&,class <lambda_565169b3e3b494427ce1bebdd17b54ac> &,class <lambda_f51fe5fd7c79a33db34fc9310f277369> &) Unknown
ucrtbased.dll!__crt_call_and_cleanup<class <lambda_565169b3e3b494427ce1bebdd17b54ac>,class <lambda_f51fe5fd7c79a33db34fc9310f277369> >(class <lambda_565169b3e3b494427ce1bebdd17b54ac> &&,class <lambda_f51fe5fd7c79a33db34fc9310f277369> &&) Unknown
ucrtbased.dll!__wsetlocale() Unknown
ucrtbased.dll!___acrt_update_multibyte_info() Unknown
ucrtbased.dll!_setlocale() Unknown

有时它有效,但有时它永远不会从它返回。我无法确定原因。我使用 Visual Studio 2015 和 Windows 7。

最佳答案

这是通用 CRT 的 TH1 版本 (10.0.10240) 中的错误。该错误已在 Windows 10 11 月更新 (TH2) 版本 (10.0.10586) 中修复。

您可以从 https://dev.windows.com/en-us/downloads/windows-10-sdk 下载并安装更新的 Windows 10 SDK .此 SDK 包含静态通用 CRT 库、调试通用 CRT DLL(ucrtbased.dll 等),以及用于应用程序本地重新分发的零售通用 CRT DLL。

您可以从 https://www.microsoft.com/en-us/download/details.aspx?id=50410 下载更新的通用 CRT 可再发行组件.这些包含用于在系统目录中集中部署的更新零售通用 CRT。

关于c - setlocale 卡在 Windows 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35572792/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com