You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MySQL C++ Connector创建会话时崩溃问题求助

MySQL C++ Connector在VS2019 Windows10环境下创建Session崩溃问题

环境与配置情况

Windows 10系统,VS 2019环境,项目以DEBUG模式编译,使用DEBUG版本MySQL C++ Connector:

  • 已链接mysqlcppconn8.lib库
  • 已将libcrypto-1_1.dll、libssl-1_1.dll和mysqlcppconn8-2-vs14.dll放入项目目录
  • 已添加预处理器宏STATIC_CONCPP

崩溃复现的最简代码

#include <mysqlx/xdevapi.h>
int main()
{
    mysqlx::Session m_DBSession("mysqlx://root@127.0.0.1");
}

崩溃位置

崩溃发生在Session构造函数中:

Session(SessionSettings settings)
try
: Session_detail(settings)
{}
CATCH_AND_WRAP

错误信息

抛出多个内存相关异常:

Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x004EE30C.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x004EE894.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in MainServer.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x004EEAD8.

已尝试的配置调整(均未解决)

  • 切换至VS 2017兼容模式编译项目
  • 尝试连接器的静态版本与动态版本
  • 切换使用/MD、/MDt、/MDd编译选项
  • 更换不同版本的Windows SDK
  • 使用RELEASE版本连接器并以RELEASE模式编译项目

内容的提问来源于stack exchange,提问作者Bew Games

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 23:25:17