C++ SDK exceptions on createDefaultClient and rtClient->tick()

Nakama Server version 3.22.0+4a4c53d7

nakama cpp version: [v2.8.5]


When I run nakama-cpp/example/main.cpp in a windows environment

different parts crash in both releasebuild and debugbuild.

In releasebuild

auto client = Nakama::createDefaultClient(params);

an exception is raised at runtime, and

In debug build

rtClient->tick() crashes on the third call.

Similar issues encountered in the past

C++ SDK crashes on createDefaultClient - Heroic Labs

I tried v2.7.0 and the situation did not change.

Log in debug build: --------------------------------------------------------

[Nakama::RestClient::RestClient] Created: NakamaSdkVersion: 2.8.5 git:27322aa
[Nakama::RestClient::authenticateDevice] ...
'nakama-cpp-sample.exe' (Win32): 'C:\WindowsSystem32\mswsock.dll' loaded. Symbol loading is disabled in the Include/Exclude setting.
[tick] invoking curl callback
[NRtClient::NRtClient] Created
[NRtClient::connect] ...
[tick] curl_multi_remove_handle() failed, code 2.

[tick] Wslay state: Connecting
[tick] Wslay state: Connecting
'nakama-cpp-sample.exe' (Win32): 'C:\WindowsSystem32\cryptbase.dll' was loaded. Symbol loading is disabled in the Include/Exclude setting.
'nakama-cpp-sample.exe' (Win32): 'C:\Windows\System32\bcryptprimitives.dll' was loaded. Symbol loading is disabled in the Include/Exclude setting.
[tick] Wslay state: Handshake sending
[tick] Wslay state: Handshake receiving
[tick] Wslay state: Handshake receiving
Exception thrown in 0x00007FF8972BB7C4 (in nakama-sdk.dll): 0xC0000005: An access violation occurred while reading location 0xFFFFFFFFFFFFFFFFFFFFFF.

Server side log: -----------------------------------------------------------------------------

`nakama | {"level": "debug", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.go:205", "msg": "Error reading message from client` `", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46", "error": "websocket: close 1006 (abnormal` `closure): unexpected EOF"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.go:442", "msg": "Cleaning up closed client connection` `", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.` `go:450", "msg": "Cleaned up closed connection matchmaker", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.` `go:454", "msg": "Cleaned up closed connection tracker", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.` `go:458", "msg": "Cleaned up closed connection status registry", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/session_ws.` `go:462", "msg": "Cleaned up closed connection session registry", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "debug", "ts": "2024-07-11T09:55:50.211Z", "caller": "server/tracker.go:912", "msg": "Processing presence event", "joins":0, "leaves":1}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.212Z", "caller": "server/session_ws.go:520", "msg": "Closed client connection", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "bbc3b5bd-3f6b-11ef-b440-7106fdcb5b46"}`
`nakama | {"level": "info", "ts": "2024-07-11T09:55:50.699Z", "caller": "server/session_ws.` `go:81", "msg": "New WebSocket session connected", "uid": "b33d655e-1087-4868-bf66-609d99098cd1", "sid": "c13047b3-3f6b-11ef-b440-7106fdcb5b46", "format":0}`
`nakama | {"level": "debug", "ts": "2024-07-11T09:55:50.699Z", "caller": "server/tracker.go:912", "msg": "Processing presence event", "joins":1, "leaves":0}`