[Perforce] Asset reload upon revert not reliable

Currently an altered and opened asset would not “live reload” when reverted in the content browser.
it is possible to close this asset, say a material, and then reopen it through the content browser.
However it is not always changed back to the reverted asset, when you do so. sometimes the altered state is still in memory and shown again.

A minor problem but it happened to me now a few times. especially with materials. so it might be worth mentioning.

Perhaps it is an Idea to “force close” all opened assets that are reverted via the content browser. And then “force reloaded” again?

Hi [PB]Aphexx,

What version of the editor are you currently using? Does this occur on a clean project with no additional content?

currently i’m on 4.5 which has custom content. but on earlier versions i could also reproduce with a clean project.

We have not been able to reproduce this error on our end. Do you have any specific steps that reproduce this error?

hmm. ok i do not have an unaltered version currently. but our changes to the engine are so minor and not in this area of it.
the issue happens to me all the time. especially when modifying materials.
steps to reproduce that work for me:

-create a material. try a complex one.
-add to database(is done automatically at creation)
-create mat instance from it
-add to database
-place mat instance on some object in the scene
-save submit
-reload map
-open shader material and mess it up
-revert shader in content browser with rightclick on ressource.
→ opened shader document will not close and reopen or reload

-reload map
-open shader material and mess it up and close the shader
-then revert in content browser
-reopen shader with double click in content browser
->see the messed up shader still shows up although the shader was reverted

Hey [PB]Aphexx -

Sorry for the delay, but we have been trying to reproduce this revert issue internally and have not been successful on any version of the engine from 4.3 to 4.5.1. This leads me to believe that this issue may reside in the connection between your particular Perforce Server and the editor. I would check first and foremost the connection between your CPU and the Perforce server that is holding your saved builds. In most cases this is a local server, but if it is not check to ensure that you have a health PING. The reason I suggest this test is because from your reproduction steps above it sounds like something isn’t getting officially updated / reverted in real time.

If you can give me any more information about your perforce setup I might be able to suggest some solutions, but I am not necessarily able to debug a Perforce connection directly here.

Thank You

We have never managed to get the revert to work in the editor (since version 4.0 last year). Yes it will revert the file but it has never ever reloaded the asset, we always have to close the editor. We’re currently on 4.7.3.

We’ve used all perforce server versions from 2013 to the new 2015 beta.

I don’t think this has anything to do with our server, the file reverts, the editor doesn’t load the reverted asset.

Edit: I can even edit, save and revert a material, see in the editor that it is not checked out. But if I diff it, it will show that the loaded one is modified.

exactly. this is what i meant. you’ll have to restart for this. what it needs is an “unload” followed by a “reload” right after the file got reverted.

Hi -

Can you be specific with a case example? Does this happen with a specific type of file, a level, a texture, a material? Any additional information you can give will help us narrow down a solution?

Thank You

for me this happens for all possible uassets or umaps, well at least i didn’t get it working that way. i believe it’s simply an unload-reload functionality, triggered by an inengine perforce revert, that is missing in the code

Any asset type as far as I can tell. We’ve tried materials, textures, blueprints unsuccessfully.

We have also tested this with both a P4 proxy connected to a remote server on the internet. As well as on our full duplex gigabit LAN.

We’re working from a source build of the engine with no major modifications, certainly no changes at all to the asset system.

We are currently NOT using a shared derived data cache.

i just tested it on the “M_Ground_Moss” material.
double click it. remove a couple of wires in the shader network. then save.
you’ll be prompted to check out.
do that. then rightclick the material, and revert it in the context menu. youl see that the file will be reverted logically in perforfe, but the material editor will stay open, still showing the altered shadernetwork.

closing the material and reopen it from the context browser will also still show the material with the removed wires although you already reverted.
simple as that.

Hi [PB]Aphexx and -

Ok thank you both for the additional information I was finally able to experience what you both are reporting. I have entered a bug report asking about the need to offer a reload option after the revert option is selected, for reference UE-12865. I will say that on my end I was able to work around this issue if before reverting an item I make sure that it is closed in the engine. So for a material, make sure that it is not open in the material editor then revert and upon opening it again your reverted asset should appear. I know that this is not the hot reloading that you are expecting, but it is a small workaround for the time being. As our engineers dig into this issue, I will keep you both informed here.

Thank you both for your patience with this issue -

Thanks Eric.

superb, thx eric!

Hi Eric, i’m looking for the bug in the issues because i’m esperiencing the same problem with ue4.17, but i could’nt find it, not even closed.

Is this bug still open or could this be my own pc?

Thanks in advance