We solved the same problem with this “-x” parameter on all ios devices except iPhoneXS and iPhoneXS . It is easy to reproduce the problem on these two devices, just create an empty project, and put the following code in YourProjectModule::StartupModule, and then package it with arm64, shipping. By the way, we use Xcode 10.0, engine version 4.18.3. When launched, you would see a warning “LogMemory: Warning: Attempting to free a pointer we didn’t allocate!” from FreeInternal() in MallocBinned.cpp. After this warning appears, we would be facing random crash in our game. It is such a headache that nearly driven us crazy!
UE_LOG(LogTemp, Warning, TEXT("Test 1"));
{
std::stringstream ss;
ss << " This is a test string from ss " << std::endl;
UE_LOG(LogTemp, Warning, TEXT("%s"),
UTF8_TO_TCHAR(ss.str().c_str()));
}
UE_LOG(LogTemp, Warning, TEXT("Test 2"));
{
std::string s;
s = " This is a test string from ss ";
}
UE_LOG(LogTemp, Warning, TEXT("Test 3"));
{
std::stringstream ss;
ss << " This is a test string from ss " << std::endl;
FString s = UTF8_TO_TCHAR(ss.str().c_str());
}
UE_LOG(LogTemp, Warning, TEXT("Test 4"));
{
std::stringstream ss;
ss << " This is a test string from ss " << std::endl;
}