launchdarkly / cpp-sdks

C++ Client/Server SDKs
Other
5 stars 2 forks source link

Access violation issue while creating LDClientSDK client using LDClientSDK_New #434

Open Mayank-Rk-Gupta opened 3 weeks ago

Mayank-Rk-Gupta commented 3 weeks ago

Is this a support request? No

Describe the bug I was trying to build hello-c-client , in same I am using LDClientSDK client = LDClientSDK_New(config, context); to create LD client in my C++ code. I have dynamically link to Client Side SDK and using C interface in my cpp code. However I am getting access violation issue. I beforehand check that config and context are not null.

To reproduce Steps to reproduce the behavior:

cwaldren-ld commented 3 weeks ago

Hi @Mayank-Rk-Gupta , there may be some incompatability between the msvc-x64 release we have built on our CI runners, and the version of Visual Studio 2022 you are using locally.

Can you try: (2) Clicking Repair button in Visual studio (2) Update Visual Studio to the latest version available (3) If that doesn't help, try building the project from source using cmake.

Mayank-Rk-Gupta commented 1 week ago

Hi @cwaldren-ld, sorry for replying late as I was away for some time. I tried with version 17.8 of visual studio it is working so Could you help me with the minimum version of Visual studio required for launchdarkly client initialization and everything to work fine.

cwaldren-ld commented 1 week ago

Hi @Mayank-Rk-Gupta , to be clear, are you saying 17.8 works?

If it works for you, you should continue using it. I am not sure of the precise minimum version. Do you need to use an older version?

For your information, our latest release was built using Visual Studio 2022 17.11.35222.181.

Mayank-Rk-Gupta commented 1 week ago

Thanks for the information. Yes In our project people are still using some older version of Visual Studio therefore in order to make sure that laucnhdarkly is wokring fine for everyone we need to have an idea which minimum version is exactly require.

cwaldren-ld commented 4 days ago

Hi @Mayank-Rk-Gupta , I think that the underlying issue that caused the incompatibility was this, which affected many people: https://github.com/actions/runner-images/issues/10004#issuecomment-2156109231.

I do not fully understand the issue, but I think the main outcome was that the Github Runner images were updated with a fix.

Therefore what I would recommend is this:

Make sure your developers are using the latest release of the LaunchDarkly Client-side SDK (3.6.4), because the latest releases are built with newer Github runner images that should have the issue resolved.

I also recommend using the latest VS version, but understand if this isn't possible.

If they encounter any similar mutex crash, please update this thread.

Mayank-Rk-Gupta commented 3 days ago

Thank you very much @cwaldren-ld, let me try with latest sdk versin 3.6.4