MSVCP140.dll初始化失败

发布于 2025-01-17 19:12:51 字数 524 浏览 3 评论 0原文

启动中丢弃了此错误,

Unhandled exception at 0x00007FF8DC378C34 (msvcp140.dll) in TimexLPRService.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

我的应用程序在堆栈框架控件中的

我看到msvcp140.dll!mtx_do_lock(_mtx_internal_imp_imp_t *mtx *mtx,const xtime *target) const const xtime *target *target是null(它在当地显示)(

如果我在当地显示 )在启动时出现错误(错误代码0xc000000142)。 我有msvcp140.dll和vcruntime140.dll在可执行文件附近

我使用Visual Studio 2019和VCPKG构建了我的应用程序,

我想知道如何调试这个问题,以了解出了什么问题或可能出现此类问题的可能原因

My application throws this error on the start

Unhandled exception at 0x00007FF8DC378C34 (msvcp140.dll) in TimexLPRService.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

In Stack Frame control I see msvcp140.dll!mtx_do_lock(_Mtx_internal_imp_t *mtx, const xtime *target)

const xtime *target is null (it shows in locals control)

If I start application manually it tells I have error on startup (error code 0xc0000142).
I have msvcp140.dll and vcruntime140.dll near the executable

I build my application with Visual Studio 2019 and vcpkg

I want to know how I can debug this problem to understand what went wrong or what possible causes of such problem

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

油饼 2025-01-24 19:12:51

可能有不同的原因。

#1 (update)

您可能在某处出现空指针异常:

Access violation reading location 0x0000000000000000

要修复此问题,请尝试使用 IDE 的调试器运行代码,它应该会在第一次访问冲突时中断。

#2

MSVCP140.dll”名称在多个版本之间共享,例如 MSVC 2015 和 MSVC 2019。

只要安装了最新的 redist,就应该没有问题。

但是会发生崩溃,例如,如果:

  • 您的应用程序是使用 MSVC 2019 构建的。
  • 但是系统上安装了旧版本(例如 2015 redist)。
  • 或者,安装了正确的 redist,但在可执行文件旁边放置了错误的 .dll 版本。

There can be different reasons.

#1 (update)

You may have a null pointer exception somewhere:

Access violation reading location 0x0000000000000000

To fix, try running your code using IDE's debugger, and it should break on the first access violation.

#2

The "MSVCP140.dll" name is shared between multiple versions, for example MSVC 2015 and MSVC 2019.

As long as the latest redist is installed, there should be no problems.

But crashs happen, for example if:

  • Your App was built with MSVC 2019.
  • But an older version is installed on the system (like 2015 redist).
  • Or, the correct redist is installed, but the wrong .dll version is placed beside your executable.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文