Problem with Rama's multi threading in UE 4.4

Hi,

I have an UE project that I have been working on for awhile. In this project I am using multi threading to create procedural voxel chunks and meshes. I have implemented my threads similar to Rama’s tutorial on multithreading: Rama’s UE threading tutorial. I had it working such that there were threads for generating chunks
The project was created with version 4.0 of the engine, and I have just recently upgraded the project to version 4.4. After the upgrade, a thread no longer seems to do any work, and therefore no new chunks, or meshes are generated. No code was changed, it was just migrated from my old 4.0 project to a new 4.4 project.

With logging on, I am getting these errors from the threads I run in my project:

LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//VoxelGenerationThread///Thread_1c84_0///////STATCAT_Advanced//// old //STATGROUP_Threads//VoxelGenerationThread///Thread_1fac_0///////STATCAT_Advanced////

As mentioned I have implemented my threads according to Rama’s tutorial on multi threading in UE4. I dont get any of the PlayerController->ClientMessage() outputs that I used to, nor does any data seem to leave the threads at all. In the Profiler I can see that it atleast looks like threads are being launched, as the thread count rises with data preview on.

The procedural voxel chunk and mesh generating works fine if performed in the main game thread, instead of my custom thread in 4.4.

#Same Threading Method Does Work In 4.4

I do multi-threading just fine in 4.4 using the same code format I showed in the tutorial.

You get that stat area if you start the same thread twice using the same exact name.

I dont know why your code is not working as you have not posted it, but I’d just starting over with a simple example.

Start over and rebuild a simple test case and see what it takes to get it working!

Rama

Thanks alot for your answer.

Your words made me sure that the problem was in my code, and I managed to find it. I thought that stat area had something to do with it, but it didnt. Turns out there was a well hidden line of code that emptied my voxel array midway, something I must have added while being drunk cause I dont remember it. Note to self, do less programming while intoxicated :slight_smile:

Hello Rama… I have posted a question regarding multithreading, Could you please take a look at it?