Page MenuHomeFeedback Tracker

RplComponent and GenericEntity
Assigned, NormalPublic

Description

Hi,

If you add a GenericEntity on the world editor and then a RplComenent to it, when running the game using one client in PeerTol, the Client shows a popUp error and closes.
The client (fails to initialize the client).
The localhost keeps working fine.

I don't know if it is a bugg or some configuration missing, but I haven't found any info abour RplComponent requirements so i gues it doesn't has.

Thx for your work.

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Windows 10 Pro 21H1 (19043.1706)
Category
General
Steps To Reproduce

In World Editor:

  1. Place a GenericEntity
  2. + Add Component, adding a RplComponent
  3. Configure one peerTool Client
  4. Run in "localHost + PeerTool"
  5. Observe:
  6. localHost runs fine.
  7. Client pop up an error and closes (Terminate)
  8. a bunch of errors in errors.log
Additional Information

Event Timeline

Thank you for the report.

Just to clarify, have you tried reopening your map again?

E.g. try doing the following as a workaround:

  1. place your entity in the world and add a RplComponent to it
  2. save your world
  3. close World Editor
  4. open World Editor with your world
  5. Run "Server localhost + PeerTool"

Does the issue still happen even afterward or does it disappear?

Piloto_Spyke added a comment.EditedJul 4 2022, 9:28 PM

Hi, thank you for your fast response.

Yes, I have reopened the map several times.

I have seen a few intersting things:

Test 1: Using a new MPTest world. If I place the "GenericEntity" with a rplComponent. --> Client with peerTool doesn't crash (✔).
Test 2: if I delete the GenericEntity place some object (that has a rplComponent, some AI rifleman or ArsenalAmmoBox) and then I place again the "GenericEntity" with a rplComponent --> Client with PeerTool crashes (❌).

It's seems that is related with the hierarchy order. If I cut and paste the objects in a way that my Generic entity returns to be the first entity (in mi Hierarchy) it doesn't crash (Test 6 from the video).

Image of the world hierarchy in the 2nd point.

I have recorded this video (the video has index with a litle description), hope it helps.
https://youtu.be/fzrYVR0mJ6M

I will atach the console logs from the two KO test in the video and the project.

Thx.

Geez changed the task status from New to Assigned.Jul 11 2022, 10:43 PM

Update: Still happening on 0.9.5.101 (Steam)

Update: Still happening on 0.9.5.109 (Steam)

Thank you for providing a video and all the steps necessary to reproduce the issue.

Unfortunately, both from the video and what you write it looks as if you accidentally misunderstood my workaround steps.
"Yes, I have reopened the map several times."
One specifically needs to close World Editor, open it again and load the map. After you do this I am sure your peers are going to be able to connect.

How things work:
Each mission is organized into sub-scenes. Each sub-scene can contain entities. These entities are loaded one by one in some order.
For network replication this order is paramount. Replicated entities need to be spawned in the same order both on the server and clients.
Otherwise, a car on the server could be mistaken for a character on a client machine.
Now, what happens in your case is that after you insert a new entity or remove one, this order may no longer be valid.
Why this workaround is necessary:
For various reasons we currently do not sort entities neither when switching to game mode nor when a mission is saved.
Only when the editor itself is reopened and the mission is loaded again this sorting is applied.
Because of this, the in-memory order of entities on the server (Workbench in your case) may be different than the one on clients (peers).
For small missions such as MPTest sorting would not be an issue.
However, sorting the entire CTI_Campaign_Eden with hundreds of thousands of entities, for example, would be a different story.

We are aware of how inconvenient this is and will have to address it at some point.
In the meantime, please, use the workaround I mentioned or spawn replicated entities dynamically (this means do not place them in the map directly but use a script or some spawner entity instead).

Hi, sorry for my delayed response and sorry for misunderstand your first response :)

I have done what you have said and it worked.

Thx.