Crash when Deserializing TArray into Json

Hi gmpreussner. I’ve been playing around with perhaps using a different library to deserialise the Json, and while I was playing around seeing how I could fit it in, I found that I got the same crash, and from the looks of things, the same fatal error:

LogPhysics:Warning: PHYSX: …..\PhysX\src\NpScene.cpp (2946) 8 : PxScene::unlockWrite() called without matching call to PxScene::lockWrite(), behaviour will be undefined.

I’ve attached the function as it is now, and as can be seen, the deserialising functions have been commented out. I’m not actually sure anymore whats causing the crash, but I know that if this function isn’t called, the crash doesn’t occur. Here’s the new log file

void ANetworkPlayerController::ReceiveData()
{
	TArray<uint8> ReceivedData;
	uint32 Size;
	//uint8 receivedData[1000];
	int32 Read = 0;

		while (Socket->HasPendingData(Size))
		{
			ReceivedData.SetNumUninitialized(FMath::Min(Size, 65507u));

			Read = 0;
			Socket->Recv(ReceivedData.GetData(), ReceivedData.Num(), Read);

		}

		if (ReceivedData.Num() <= 0)
		{
			VShow("Error, the Server isn't streaming data");
			//return;
		}
		FString output = StringFromBinaryArray(ReceivedData);
		const char *char_pointer2 = reinterpret_cast<char*>(ReceivedData[0]); 
		VShow("Is it working?", char_pointer2);
		UE_LOG(LogTemp,Log,TEXT("%d"),ReceivedData[0]);
		//TSharedPtr<FJsonObject> JsonObject;
		//TSharedRef< TJsonReader<> > Reader = TJsonReaderFactory<>::Create(output);
		//bool result = FJsonSerializer::Deserialize(Reader, JsonObject);
		//if (!result)
		//	Print("Error, Json Deserialization Failed");
}