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