MySQL Forums
Forum List  »  Connector/C++

Re: Connector crashing on Windows
Posted by: Eric Bouchard
Date: December 21, 2022 11:56AM

Just created a new project from scratch (here are the exact steps I did)
I am using latest version of VS 2019

- Create new project
- console application -> next - >name of the project - >create
- Downloaded the debug connector here: https://dev.mysql.com/downloads/connector/cpp/
- Downloaded the windows, x86, DEBUG version

in the project settings:
- Added the included folder: mysql-connector-c++-8.0.31-win32\include
- In the linker path, added mysql-connector-c++-8.0.31-win32\lib\vs14\debug and C:\game\mysql-connector-c++-8.0.31-win32\lib\debug
- added the library in the input section: mysqlcppconn8.lib
- added in the C++ precompiled option: STATIC_CONCPP
- Copied the 3 DLLs into the c:\windows directory

Here is the code of the app:

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

}

This crashes here:

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


And here are the output errors:
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x00EFF03C.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: cdk::foundation::Error at memory location 0x00EFF5C4.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x00EFF808.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x7620E062 in testconnector.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Unhandled exception at 0x7620E062 in testconnector.exe: Microsoft C++ exception: mysqlx::abi2::r0::Error at memory location 0x00EFF808.

Exception thrown at 0x7A8577E4 (vcruntime140d.dll) in testconnector.exe: 0xC0000005: Access violation reading location 0x00000004.

Any help is welcome. The problem is clearly not the code itself, but some type of mismatch between 2 components. But since it is a new project from scratch... I have no clue

Options: ReplyQuote


Subject
Views
Written By
Posted
403
December 21, 2022 09:03AM
276
December 21, 2022 09:41AM
195
December 21, 2022 10:36AM
194
December 21, 2022 11:03AM
207
December 21, 2022 11:28AM
195
December 21, 2022 11:38AM
Re: Connector crashing on Windows
259
December 21, 2022 11:56AM
167
December 21, 2022 12:11PM
198
December 21, 2022 12:25PM
173
December 21, 2022 12:47PM
185
December 21, 2022 12:55PM
214
December 21, 2022 01:11PM
202
December 21, 2022 01:29PM
202
December 21, 2022 02:52PM
263
December 22, 2022 04:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.