-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading current level is broken in packaged builds #105
Comments
I thought that #101 dealt with this? |
Maybe it fixed some of the cases, but not everything. I simply do a quick save/quick load combo and it's 100% reproducible. @YeNov can you take a look? |
After some debugging, it looks like even when keeping a hard reference to the world, as introduced in that fix, it still gets GC'd. |
Found the cause of GC - |
This must have changed at some point because I never used to have this problem in packaged builds for the game I wrote SPUD for (I don't currently use it because we don't have level save state in our new game) |
Hello @krojew . Sorry for not answering for that long, got a bit busy. What you say totally makes sense - world and levels are marked as garbage logically (RF_MirroredGarbage). Though it doesn't fire in my current use-cases, it could've potentially. I tried to do several fast loads from the same level, but it never crashed on the Dev build. I want to try it in shipment, but it will take some time. What is your build config? |
@YeNov we should not rely on GC not triggering to be able to load the map. This will sometimes work, other times not, as in my tests. I'm wondering if this can be an engine bug, because it's now impossible to reload current level reliably, regardless of using SPUD or not. If you have access to UDN, can you ask Epic directly? |
@krojew never meant to say we can rely on it, just an observation. I can do the UDN post. It would also help if I included your answers to the questions I posted above. It could be helpful to gather more information to question Epics |
@YeNov at the moment of loading I have around 40-50GB RAM free. I'm not sure what parts of build config you need - it's happening on development and debug Windows builds. Do you need any specific settings? |
Hey @krojew , I brought you some news from UDN
The var controls whether a full garbage collection pass is done in-between the current map being unloaded and the new map being loaded (this would allow the map to be loaded cleanly. Also they mentioned using hard reference to the packages one want to keep from being GCd. The hard references should be kept in something that survives map travel lifecycle ofc (like spud subsystem, which is game instance subsystem).
|
@YeNov I tried setting GDelayTrimMemoryDuringMapLoadModeCVar to 2, but then it crashes GameplayDebuggerModule on map load, unfortunately. Looks like this is another engine bug:
To answer the questions:
0
World partition; nothing else.
No.
There's no error and I don't think this should be treated as such - it's a normal flow in the engine. The world is marked as garbage explicitly, GC runs, and then the problem occurs. |
@YeNov I don't know if it's important, but I'm using the CommonLoadingScreen plugin. |
Hey @krojew , coming back to you. I have no knowledge about CommonLoadingScreen plugin, have you tried without it? Do you have reproducibility only on your PC or other computers also have it? We have like 5 different computers and no crashes since my fix (hard reference property + long path name) is provided. I want to speculate that maybe having hard reference to a pending kill object blocks GC, even though the object is removed from the root set. Maybe you have something else that could break GC on your side? Also epics asked me to provide some info which I cannot, as my version doesn't crash, so maybe you could help with that:
|
I'll try without the plugin later, but it's made by Epic for Lyra, so I would assume it should work. As for the errors - there are none, because the error message is ignored:
That GC's the world. Can you forward this to Epic? |
Thx, I'll forward it to them |
@krojew update from Epics:
It makes sense for me that the map is reloaded actually. I don't have capacity to test it all on my side unfortunately, but maybe you can get use out of it |
@YeNov got the new logs:
Looks like only HLODs are present in the package. Is there a way to see what's holding on to it, if that's the problem? |
Is it clean project or the working one? |
The working one. It's not really clear how to replicate this in a clean project, since for proper replication, SPUD is needed, which already makes it "not clean". If I just call load map in a blank project and the open map template, everything works, but that only proves loading the current map works by default. |
Well if it crashes because of SPUD - that's also a proof. I'd say the ideal tests should be like that:
|
@YeNov I tried experimenting with third person template on open world map with SPUD and common loading screen, and I cannot replicate the issue. It would be great to know if there's a way to debug it and track down the problem. |
@krojew Not sure if I can show you any specific way of debugging it, but I'd say one should look into package (map) loading process and check what's going on there, why is it blocked maybe. Good luck |
When loading a game in the same level as the current one, the engine loads the default map in packaged builds. The reason seems to be that the current world gets unloaded from its package, which results in engine not finding it during travel and browsing to the default map as a fallback. A workaround is to load a temporary level first and then perform game loading.
The text was updated successfully, but these errors were encountered: