a heap has been corrupted
Hi everyone, I'm developing a plugin for UE4. I have developed a framework to communicate with multiple nodes in a network and interact to create a smart environment. The system works both as a standalone application and as included as a library in an other application. The problem is in UE4. The organization is as follows:
the plugin is successfully created.
I added another ActorComponent that uses the plugin and that ActorComponent. In particular I send an FString to the ActorComponent and then to my framework.
The ActorComponent in the plugin has this method to send the message:
and the following method in my framework receives the message. However it is compiled. data there is dynamically allocated in the constructor.
but I receive an "unhandled exception in ... ntdll.dll. A heap has been corrupted" exception, after setNewData(true) (yes on the brace) and I don't know why.
Now, each system throws that exception as it detects an heap invalid access, but you don't know exactly when it happens, but it never happens with short messages like "hello", but always with "bigger" messages as "recipes with pasta". I tried also to avoid conversions and statically send the same message, but I get always the same crash. However if I ignore that exception, continuing with the debugging, UE4 does not crash and successfully sends the message!
Please, save me!
asked Jan 18 '17 at 10:51 AM in C++ Programming
Dario Di Mauro
I didn't find a complete solution, but I changed the setData's first argument from std::string to const char* and added a second argument for its size...
answered Jan 18 '17 at 11:54 AM
Dario Di Mauro
Follow this question
Once you sign in you will be able to subscribe for any updates here