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"

FRunnableThread naming

I created a network listener thread, based off the FRunnable class, that runs on an Actor and fires when BeginPlay() is called. Running the project from the editor seems to work fine. However, when I start the module for a second time without closing the editor in-between, I get the following warning

LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//TestThread///Thread_484c_0///////STATCAT_Advanced//// old //STATGROUP_Threads//TestThread///Thread_4fc4_0///////STATCAT_Advanced////

Where TestThread is the name of the thread passed to FRunnableThread::Create (i.e. FRunnableThread::Create(TestThread, TEXT("TestThread"), 0, TPri_Normal);).

As far as I can see, the thread is fully terminated after terminating play and the FRunnableThread object as well as the FRunnable object are both correctly deleted. It seems like the name of the thread lingers somewhere, but I can't seem to find out where. The thread also does not show up in the ThreadRegistry anymore after deleting the objects (it does show up during play). Should the thread be named differently each time it is launched? I did not see anything like this in the examples I could find (nor in the UE4 source).

Product Version: Not Selected
more ▼

asked Jan 20 '15 at 04:22 PM in C++ Programming

avatar image

3 3 5 7

avatar image Rama Jan 20 '15 at 10:16 PM

I've had this issue as well, I chose to use a static int32 incrementer and append the integer to the end of the name so each instance of the thread was uniquely named.

I'd be curious to know from Epic if there is a different and preferred workflow!



avatar image mliem Jan 21 '15 at 09:32 AM

This is what I did as well, but it feels a little like a hack. It would indeed be good to hear if this is the preferred solution.

avatar image Si Thu Jul 07 '16 at 03:19 AM

Can you explain this process in a little more detail please? i am having an issue with metadata mismatch. thanks.

avatar image 6r0m Feb 13 '18 at 03:35 PM

Can you explain this process in a little more detail please?


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
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