SetDebugMode throws an exception

I’m using the LexActivator v3.32.3 x64_MT static library with Visual Studio v17.14.7 (64bit).
SetDebugMode throws an exception in the Visual Studio file fdopen.cpp at line 28.

_VALIDATE_RETURN(fh >= 0 && (unsigned)fh < (unsigned)_nhandle, EBADF, nullptr);

where fh = -1 and _nhandle = 64.

An exception is not thrown when reverting to the LexActivator v3.31.0 x64_MT static library with Visual Studio v17.14.7 (64bit). The log file is being created.

In the LexActivator change log it appears that v3.31.1 (2025-01-09) fixed a behavior issue with SetDebugMode.

Any idea as to what the issue was and what was changed?

Any idea on how to stop the exception being thrown in v3.32.3, ?

Thankyou.

Hi @PeterBeard,

Thank you for reaching out!

Our team will look into this further. Since you have also contacted us through the support channel, we will make sure to keep you updated with any findings or resolutions.

I’ve resolved the issue.

In v3.31.0 x64_MT static library you had to set the product data and product id before calling SetDebugMode(1); otherwise, LA_E_PRODUCT_ID would be returned.

In v3.32.3 SetDebugMode(1) MUST be called first, before setting the product data etc; otherwise, an exception is thrown.

Hi @PeterBeard,

The SetDebugMode() function operates independently of SetProductData() and SetProductId().

If possible, please share a sample with us at support@cryptlex.com where the issue can be reliably reproduced, as we have not been able to replicate it on our end.