C++ Library: Windows Crash or Hang During Activation

If your Windows application crashes or hangs during a license call — most often in activateSemiOnline() — while offline checks like validateOffline() keep working, the cause is usually the Visual C++ runtime. Which fix applies depends on which library variant you linked.

The C++ Client Library ships in two Windows runtime variants:

If you are unsure, this crash strongly suggests you are shipping the MD variant.

Why the MD build crashes

The library is built with a recent MSVC toolset (v142 / v143). Some activation paths use the C++ threading runtime (std::thread / std::mutex, provided by CONCRT140.dll / VCRUNTIME140_1.dll), which needs a current Visual C++ Redistributable. An older one can be present but too old: offline-only calls like validateOffline() do not use the threading runtime and still run, so the problem only appears a step later, during activation. Seeing MSVCP140.dll or VCRUNTIME140.dll loaded in the process is not enough — the version matters, and VCRUNTIME140_1.dll in particular ships only with newer redistributables.

The fix

You have two options:

  1. Update the redistributable. Ask the affected end user to install the latest Microsoft Visual C++ Redistributable (x64): https://aka.ms/vs/17/release/vc_redist.x64.exe — use the x86 build for a 32-bit application. To prevent this for every end user, bundle (or require) it in your own installer.
  2. Or link the MT (static runtime) variant. This removes the Visual C++ Redistributable dependency entirely, so end users never need it installed.