I am using wxWebRequest to download a very small (1 KB) text file from the server with the following code:
auto WebRequest = wxWebSession::GetDefault().CreateRequest(this,
"https://www.pebytes.com/downloads/version.txt");
WebRequest.Start();
Bind(wxEVT_WEBREQUEST_STATE, &frmMacroLand::OnCheckNewVersion, this);
In Debug version all works well, but in Release version the application crashes and the event handler function is not even called:
void frmMacroLand::OnCheckNewVersion(wxWebRequestEvent &event)
{
switch (event.GetState())
{
wxMessageBox(std::to_string(event.GetState()));
case wxWebRequest::State_Completed:
//rest of the code
Any ideas?
By the way, I am using Windows 11 with MSVC and wxWidgets 3.2