Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access violation issue while creating LDClientSDK client using LDClientSDK_New #434

Closed
Mayank-Rk-Gupta opened this issue Aug 22, 2024 · 8 comments
Labels
bug Something isn't working package: sdk/client Issues affecting the C++ Client SDK waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.

Comments

@Mayank-Rk-Gupta
Copy link

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:

  • In Visual Studio 2022 on a Windows computer, I started a new C++ 17 Windows console app.

  • I copied the contents of the hello-c-client into my new C++ windows console app.

  • I downloaded the windows-msvc-x64-dynamic.zip for the launchdarkly-cpp-client v3.6.3 from the releases page here, extracted it, and write cmake to use header and library.

  • Use breakpoint to debug through the main function and getting access violation in LDClientSDK client = LDClientSDK_New(config, context);

    Expected behavior
    It should create a Launchdarkly client.

    SDK version
    3.6.3

    Language version, developer tools
    C++17 on Visual Studio 2022.

    OS/platform
    Windows 10

    Additional context
    image

@Mayank-Rk-Gupta Mayank-Rk-Gupta added bug Something isn't working package: sdk/client Issues affecting the C++ Client SDK labels Aug 22, 2024
@cwaldren-ld
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

cwaldren-ld commented Sep 4, 2024

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
Copy link
Author

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
Copy link
Contributor

Hi @Mayank-Rk-Gupta , I think that the underlying issue that caused the incompatibility was this, which affected many people: actions/runner-images#10004 (comment).

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
Copy link
Author

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

@cwaldren-ld
Copy link
Contributor

Hi @Mayank-Rk-Gupta , is this issue resolved?

@cwaldren-ld cwaldren-ld added waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness. bug Something isn't working and removed bug Something isn't working labels Sep 30, 2024
@Mayank-Rk-Gupta
Copy link
Author

Yes, It has been resolved. Thanks for your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: sdk/client Issues affecting the C++ Client SDK waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.
Projects
None yet
Development

No branches or pull requests

2 participants