Perforce Syncing and Asset Refresh

I’m building the 4.6 branch right now and we just spent the last week getting our perforce server up and running. Now that we’re up and going, we’re having some really fundamental source control issues that are confusing. I’m not new to source control or perforce, but I am new to the workflow in UE4. After reading all available documentation, the workflow seems to be quite simple, so I’m unsure if the behaviors we’re seeing are intended, bugs or a mix.

Here are the 2 scenarios where we’re having issues. I should note that all of our interaction with perforce is being done through the UE4 editor. We aren’t doing any commits using P4.

Scenario 1: The Sync of Death
Client A: Check out Blueprint X
Client A: Make change and check-in Blueprint X
Client B: Right-click Blueprint X and sync

Result:

  • Blueprint X appears to sync
  • Blueprint X remains unchanged in Client B content browser
  • Blueprint X continues to have sync option on Client B
  • Blueprint X can be checked out on Client B and Checked In which overwrites previous commit
  • If Client B restarts client, asset is updated

Scenario 2: Edit Locked File, Can’t Undo Modify
Client A: Check out Asset X
Client B: Double click Asset X and change a property.
Client B: Clicks Check Out Notification. (this should fail)
Client B: Realizes that they can’t check out, hits cancel.
Client B: Attempts to sync Asset X but can’t because Asset X is marked as modified

Result:
User forced to restart UE4 editor to avoid saving asset.

Are others experiencing these two issues? Did we pick a bad time to build from 4.6? These two issues are really making it difficult for our team to collaborate.

I’ll add that one reason Scenario 1 is problematic for us is that we’re trying to keep artists out of the P4 visual client. We’d like for their entire workflow to exist in UE4. This means they rely on sync refreshing their view of assets.

I am not using Perforce, but I have seen part of your problem with the Git Source Control Provider that I developed: reverting changes of a Blueprint with the source control menu does not refresh/reload the Blueprint editor.

So at least the ‘revert’ feature is not usable for me, with Git, from 4.0 to 4.5 (not tested in 4.6).
I never reported the problem as it is still possibly a bug of mine…

I’m glad you responded. I have been looking through your code the last few days to see whether you might have had a similar issue and/or found a way to circumvent it. I’m guessing with git that probably the only place you’d hit a similar issue is reverting since files don’t get locked. I haven’t had issues reverting in 4.6 yet, it’s not something I do often.

I didn’t see anywhere where you could hook in and tell the content browser that assets need refreshing. Looking at the differences between your plugin and the perforce integration, I don’t see anything that indicates the issue is on your end.

I saw that you already found our answerhub thread to this problem. And yes, this still seems to be a problem in 4.6 and there haven’t been any changes. For our small team, we worked around this by using good old fashioned communication but this is really a problem for larger teams, especially your scenario A as you will really need to have an eye on what client B checks in. And if there is any file on the list that you know you haven’t touched, don’t submit :smiley:

Anyway, let’s see if this gets fixed or answered with a work-around by Epic or others that work with the perforce integration of the editor.

Exactly. Now that we’ve identified the problem (we’re literally calling it the Sync of Death) we can work around it through communication. For anyone that’s just hitting this issue, please visit the answerhub question, upvote it and leave a comment on the staff answer.

This is also a problem for our team.

As far as I know, it would be better to check out and to get the latest revision of any asset-/blueprint-/level- or instance-data as soon as they are being modified, and if that is not possible, directly giving feedback to the user.

Is there a way to make this more failsafe ?

Any chance to get a short effort-estimation from epic ?

At this point we’ve basically adopted the workflow of shutting down UE4 completely and syncing via P4V. We only use UE4 to check out and submit assets. Even then, we sometimes have to manually use P4V for instance when deleting assets.

The problem still exists in version 4.12.5, the content can’t seem to update unless you restart the engine.