Dear all,
I have a problem with the InterProcessConnection class and sending a large ValueTree (300kb) over the network, which results in corrupted data:
I have two applications, a server and a client and the client sends the project file (ValueTree) to the client:
void Server::sendFullProject()
{
juce::MemoryOutputStream m;
m.writeShort(XMCommand::requestFullSync);
getProjectData().writeToStream(m);
sendMessage(m.getMemoryBlock());
}
and the client receives the data and tries to rebuild the ValueTree:
void Client::messageReceived(const juce::MemoryBlock &message)
{
juce::MemoryInputStream data(message, false);
...
juce::ValueTree projectData = juce::ValueTree::readFromStream(data);
}
When I run both applications on the same machine, everything works fine!
But when client and server run on different machines, the readFromStream function always hits asserts, that it is trying to read corrupt data - sometimes a name is empty or an compressed int suddenly has 30 bytes etc.
As far as I remember this used to work over network with no problem, but now in Juce 7.0.9 I encountered this problem.
Looking at the data sent, I found that the version over network adds a lot of zero bytes to it, maybe this shifts something and the reader gets confused?
(left side local version, right side remote version over network)
Hope someone has an idea or can point me in the right direction!

