etcd-cpp-apiv3/etcd-cpp-apiv3

"Access violation reading location error" while create new client instance in Debug

andreamartini opened this issue · 5 comments

Hello everyone,
i'm using VS2019, c++14 and etcd-cpp-apiv3 v0.14.2 for x64. I compiled etcd-cpp-apiv3 with vcpkg.
I get "Access violation reading location error" when i try to create a new istance of etcd client:

etcd::Client* _myPtr = new etcd::Client("http://MyServerIp_A:2379,http://MyServerIp_B:2379,http://MyServerIp_C:2379");

In release i get no error. Please, could you suggest me any reasons/solution?
Thank you in advance
Kind regards

What the statement "In release i get no error. " means?

Hi,
i mean that using visual studio in Release configuration (x64, release) i correctly create a new istance of etcd::Client. In debug configuration (x64, debug) i get "Access violation reading location error" instead.

Have no idea why it failed under VS. Maybe you could use the release configuration to build the library and I will be back there when My Windows PC comes back to me.

Hello everyone,
was my mistake, sorry. As ectd library file name are the same both release and debug version, i used etcd release version in my debug configuration. Once realized that and after i used debug etcd library files in my debug configuration, everything gone ok. Thank you

Thanks for the feedback!

Happy to know it works!