I’m pretty new in Unreal C++ development but I have pretty much solid background in C++.
I’ve made some experimental C++ code which is a server that accepts commands and I’ve integrated that code as third party plugin into Unreal game. When Unreal Editor is started the server is started(the plugin method StartupModule) as well and I can see it listens on network port. However, when I send a request for very simple command the editor crushes and I get EXCEPTION_ACCESS_VIOLATION.
This is confusing because:
1. The server works correctly outside Unreal Engine for the same command
2. Unreal Engine Crash Reporter reports the error in the source line of my code which does not make any sense for me
3. The command is very simple. It returns "static const char*"
What am I missing? Any ideas.
If you have experience with using a debugger, you should be able to pretty quickly see what’s failing if you run it in debugger and crash it.
What I’ve forgotten to write in my question is that the Visual Studio debugging didn’t work for me. I thought a reason was my own custom build Unreal Engine.
However, I decided to try from scratch. I used a backup of the custom engine and recreated a Unreal project, and the debugging started working. I didn’t expect this at all because I thought I had tried all options.
After a while, I started to suspect that a cause of the problem is because incorrect versions of my dlls were loaded by the plugin module. I deleted the Visual Studio debug directory and after that rebuild of my project. The problem disappeared.
Anyway, thanks for your answer.