I am cross-compiling from Linux for Windows using
x86_64-w64-mingw32-g++-posix (version 9.3.0, Ubuntu 20.04). Everything compiles fine (Urho3D and my program) but crashes on
SendEvent(). The thing is this problem is intermittent (I am calling
SendEvent() multiple times in multiple places and it does not always crash in the same place).
In this example I am using it to change screens (go from the logo, to the main menu, to the game itself). Some times it just crashes right off the bat. Some times it shows the logo (first screen). Some times it shows the logo and the main menu. Some times (rarely) it works fine and gets all the way to the game itself without crashing.
There is no error message; The program just exits. I have tried compiling Urho3D with both DirectX and OpenGL with the same results.
I am compiling Urho3D like so:
../script/cmake_mingw.sh . -D MINGW_PREFIX=/usr/bin/x86_64-w64-mingw32 -D URHO3D_NETWORK=0
Neither the Linux nor Web versions using the same code base have this problem.