tgbot-cpp icon indicating copy to clipboard operation
tgbot-cpp copied to clipboard

MSVC Read access violation

Open Vitaliy320 opened this issue 2 years ago • 2 comments

I was trying to run examples at tgbot-cpp/samples/echobot/src/main.cpp and tgbot-cpp/samples/echobot-curl-client/src/main.cpp. In both cases i got an exception "read access violation. this was 0xFFFFFFFFFFFFFFBF." in a file "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\xhash". The exception is triggered by bot.getEvents().onCommand. Has anyone encountered this issue? Thank you. screen1

Vitaliy320 avatar Apr 05 '23 23:04 Vitaliy320

This happened to me on debug mode x64.

I installed the package using vcpkg and using the debug .lib file also.

This was solved when I changed to release mode, but I am losing all debug capabilities.

Looks like x64 Debug mode has the initializacion of all classes broken or it's more of an issue with the way it's compiled.

image

Using C++17 standard on the compiler.

I'll rollback to C++14 and post results.

carlosfvp avatar Jan 20 '24 10:01 carlosfvp

Same results with C++14

Any class constructor of the TgBot library returns a pointer to a invalid region.

carlosfvp avatar Jan 20 '24 11:01 carlosfvp