Client gets disconnected when touching mesh

Hey,

I’m working with the GeneratedMeshComponent and at the moment I’m on implementing multiplayer functionality.
My basic design is as following: On the listen server upon login of the player I spawn an instance of ATerrain , which itselfs spawns multiple Chunks which all have a GMP. If another player logs in he himself spawns an instance of ATerrain with the corresponding Chunks clientside, so that I have one instance of ATerrain on the server and one on each of the connected clients. I chose that approach, because I thought that replicating the whole meshes over the network would be way too expensive, this way I only need to send the seed to the client and that’s it (in a simplified way).
This all works fine so far and I can also spawn my Characters without any problems, on the server I can even walk around with them. My problem occurs, as soon as a connected client’s character touches the terrain (I spawn them in the air and they fall down), then I get a bunch of errors and I get disconnected. This does not happen if I don’t spawn the Terrain client side (I tried that in order to find the error), but of course the player will then just keep on falling though the air, at least on the client, the listen server sees the clients character standing right next to him on the terrain.
From the errors I’d suppose that the engine is trying to replicate something of the terrain or anything similar but I don’t know what, as nothing there is set to replicate. Maybe because the Owner of the ATerrain instances is my PlayerController?

@mordentral(Btw, can I tag people here in the forum?): On page 4 of the procedural terrain generation thread you mentioned something that might help me out here, especially as one of the logs says that there was an overflow, maybe you could have a look at it?

Here the log:

  LogNetPackageMap:Warning: FNetGUIDCache::SupportsObject: Chunk /Game/Maps/UEDPIE_1_Level_GameWorld.Level_GameWorld:PersistentLevel.Terrain.Chunk-1#-1#0 NOT Supported.
    LogNetPackageMap:Warning: FNetGUIDCache::SupportsObject: Chunk /Game/Maps/UEDPIE_2_Level_GameWorld.Level_GameWorld:PersistentLevel.Terrain.Chunk272 NOT Supported
   LogNetSerialization:Error: FBitReader::SetOverflowed() called
    LogNetSerialization:Error: FBitReader::SerializeBits: Pos + LengthBits > Num
    LogNetPackageMap:Error: InternalLoadObject: Failed to load path name
    LogNet:Error: ReceivedBunch: ReceivePropertiesForRPC - Bunch.IsError() == true: Function: ServerMoveDual, Object: CharacterMovementComponent /Game/Maps/UEDPIE_1_Level_GameWorld.Level_GameWorld:PersistentLevel.TGCharacter_Human_C_41.CharMoveComp
    LogNet:Error: UActorChannel::ProcessBunch: Replicator.ReceivedBunch failed.  Closing connection. RepObj: CharacterMovementComponent /Game/Maps/UEDPIE_1_Level_GameWorld.Level_GameWorld:PersistentLevel.TGCharacter_Human_C_41.CharMoveComp, Channel: 10
    LogNet: UNetConnection::Close: Name: IpConnection_75, Driver: GameNetDriver IpNetDriver_41, PC: GameWorldPlayerController_BP_C_17, Owner: GameWorldPlayerController_BP_C_17, Channels: 10, RemoteAddr: 127.0.0.1:64234, Time: 2015.05.07-18.40.52
    LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_41
   LogNetTraffic:Error: UChannel::ReceivedRawBunch: Bunch.IsError() after ReceivedNextBunch 1
    LogNetTraffic:Error: Received corrupted packet data from client 127.0.0.1.  Disconnecting.[/COLOR]
    LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
    LogNet: UChannel::CleanUp: [GameNetDriver] [GameWorldPlayerController_BP_C_18] [GameWorldPlayerController_BP_C_18]. ChIndex == 0. Closing connection.
    LogNet: UNetConnection::Close: Name: IpConnection_74, Driver: GameNetDriver IpNetDriver_42, PC: GameWorldPlayerController_BP_C_18, Owner: GameWorldPlayerController_BP_C_18, Channels: 10, RemoteAddr: 127.0.0.1:1706, Time: 2015.05.07-18.40.52
    LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_40
   LogNet:Warning: Network Failure: GameNetDriver[ConnectionLost]: Your connection to the host has been lost.
    LogNet:Warning: Network Failure: GameNetDriver[ConnectionLost]: Your connection to the host has been lost.
    LogNet: NetworkFailure: ConnectionLost, Error: 'Your connection to the host has been lost.'
   LogNet:Warning: FObjectReplicator::UpdateUnmappedObjects: Connection->State == USOCK_Closed
    LogNet:Warning: FObjectReplicator::UpdateUnmappedObjects: Connection->State == USOCK_Closed
    LogPlayerController:Warning: Calling IsLocalController() while Player is NULL is undefined!
    LogPlayerController:Warning: Calling IsLocalController() while Player is NULL is undefined!
    LogNet: NotifyAcceptingConnection: Server Level_GameWorld accept
    LogNet: Open Level_GameWorld 05/07/15 20:40:52 127.0.0.1
    LogNet: Added client connection.  Remote address = 127.0.0.1:64234
   LogNetTraffic:Warning: High single frame packet loss: 124
 LogNetTraffic:Error: UNetConnection::ReceivedPacket: Received control channel close before open
    LogNet: UNetConnection::Close: Name: IpConnection_76, Driver: GameNetDriver IpNetDriver_41, PC: NULL, Owner: NULL, Channels: 1, RemoteAddr: 127.0.0.1:64234, Time: 2015.05.07-18.40.52
    LogNet: Browse: /Game/Maps/Level_MainMenu?closed
    LogNet: Failed; returning to Entry
    LogLoad: LoadMap: /Game/Maps/Level_MainMenu?closed
    LogNet: World NetDriver shutdown IpNetDriver_42 [GameNetDriver]
    LogNet: DestroyNamedNetDriver IpNetDriver_42 [GameNetDriver]
    LogExit: GameNetDriver IpNetDriver_42 shut down

Hope somebody can help me.

Thanks in advance,
Taces

Edit:

I now tried to add normal Box to the map to test if I can walk on top of that without getting disconnected and indeed I can, therefore my error seems to be related to the GeneratedMeshComponent.
At first I thought that there is something wrong with the ownership as I’m using this to spawn my Character:

FActorSpawnParameters Params;
Params.Owner = this;
ATGHumanCharacter* NewPawn = GetWorld()->SpawnActor<ATGHumanCharacter>(HumanCharacterBP, LastPawnLocation, FRotator(0, 0, 0), Params);
Possess(NewPawn);

But then it should fail to walk on the box as well, I believe.

I can walk on top of the box, but as soon as I step onto my terrain, I get disconnected:
[ATTACH=CONFIG]38494[/ATTACH]

Still my errors are coming from the CharacterMovementComponent, but now from a different function:

  LogNetSerialization:Error: FBitReader::SetOverflowed() called
    LogNetSerialization:Error: FBitReader::SerializeBits: Pos + LengthBits > Num
    LogNetPackageMap:Error: InternalLoadObject: Failed to load path name
    LogNet:Error: ReceivedBunch: ReceivePropertiesForRPC - Bunch.IsError() == true: Function: ServerMove, Object: CharacterMovementComponent /Game/Maps/UEDPIE_1_Level_GameWorld.Level_GameWorld:PersistentLevel.TGCharacter_Human_C_22.CharMoveComp
    LogNet:Error: UActorChannel::ProcessBunch: Replicator.ReceivedBunch failed.  Closing connection. RepObj: CharacterMovementComponent /Game/Maps/UEDPIE_1_Level_GameWorld.Level_GameWorld:PersistentLevel.TGCharacter_Human_C_22.CharMoveComp, Channel: 10
    LogNet: UNetConnection::Close: Name: IpConnection_45, Driver: GameNetDriver IpNetDriver_21, PC: GameWorldPlayerController_BP_C_19, Owner: GameWorldPlayerController_BP_C_19, Channels: 10, RemoteAddr: 127.0.0.1:54155, Time: 2015.05.08-13.37.07
    LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_23
   LogNetTraffic:Error: UChannel::ReceivedRawBunch: Bunch.IsError() after ReceivedNextBunch 1
    LogNetTraffic:Error: Received corrupted packet data from client 127.0.0.1.  Disconnecting.

I already posted this in the forums here: Client gets disconnected when touching mesh - C++ - Epic Developer Community Forums

The problem has been resolved in the regarding forum post: