x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: Not Selected
Tags:
more ▼

asked Sep 02 '14 at 02:32 PM in C++ Programming

avatar image

Pimp_Cpp
1 1 2 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Sep 03 '14 at 04:49 AM

avatar image

Rama
10.6k 445 343 1083

avatar image Pimp_Cpp Sep 04 '14 at 11:45 AM

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 :)

avatar image silentkratos Mar 08 '15 at 04:45 AM

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

https://answers.unrealengine.com/questions/186183/multithreading-in-ue4.html

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question