-
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
SubscribeLevelObjectEvents hits "ensure" #9
Comments
I can't tell very much from that other than you must be using an old version, because line 791 of SpudSubsystem.cpp isn't SubscribeLevelObjectEvents. |
Assuming your version is actually line 784 i.e. this:
I believe the error is UE saying that this delegate has already been registered on that actor. That suggests the same level has been loaded twice, or at least that LoadMap() has been called twice with the same level. |
You are indeed right, I'm using an old version (will update as soon as possible). Thanks for looking into that. |
Hello Steve, I am having this same issue with latest code (i.e. my line 784 in SpuSubsystem.cpp is what you showed in your second comment). You are correct, it is loading the same level twice, however, in this case, it is default SPUD code that is requesting the second load in what seems like a reasonable usage pattern (and can be made to happen in the SPUDExamples project/codebase by either moving or deleting StreamLevel2Vol):
As mentioned above, reproducing this is easy in the SPUDExamples level - the default setup does not trigger it because when you run the ToggleDebugCamera command, the new spectator actor overlaps StreamLevel2Vol instead of StreamLevel0, like you'd expect since that's where the character is when you first start PIE. But by simply moving that volume down a bit or deleting it so that the new spectator camera overlaps only StreamLevel0, this will happen 100% repro. So it seems like maybe there needs to be some logic that checks to make sure a level isn't already loaded before requesting to load it again (maybe in ASpudStreamingVolume::AddRelevantActor()?). Thank you for sharing a great foundational saving library! |
Indeed, adding the following at the top of
Apologies on the formatting - evidently github.com does not have a text format (at least in the comment box) to insert code that respects whitespace. :-/ If this seems like a good change, I'd be happy to submit it as a PR if you are interested. Or if you have another idea or place to do the check, I could take a look at that as well. Thanks, |
Hmm, the For future reference, GitHub uses markdown so you can use ``` on the lines before & after a code block to format the whole block as code rather than just an inline segment |
With the latest SPUDExamples I can't reproduce this. I can reproduce the debug camera causing a load request for StreamMap2 and StreamTransitionHall when StreamLevel2Vol is in its default position, as you described, but if I remove StreamLevel2Vol or move it out of the way, I get no second request for StreamMap0. |
That's odd. I will re-confirm and double-check that Requesters size check and see why it isn't catching in my case. Glad you could at least repro the debug camera being added to the wrong volume - is that supposed to happen or would that be considered a bug? Thanks for the tip on the markdown! |
I don't think it's a bug, the debug camera's initial position must simply overlap with that other volume on instantiation. |
OK I see the issue. I missed the fact that due to uniqueness, using 1 as a sentinel wasn't going to work. Instead flipping that to "increasing from zero" is the simplest correct version. The actors in volume check wasn't really hurting since uniqueness was already enforced in the subsystem (once fixed) but I've done it anyway. |
Awesome, thank you! |
Hello @sinbad,
There seems to be an Issue in
USpudSubsystem::SubscribeLevelObjectEvents(ULevel* Level)
. I don't know what's exactly wrong due to time constraints on my side but will investigate as soon as possible.Here is a stack trace I was able to grab via BugSplat:
I can also provide a UE4MiniDump.dmp if that would help you.
Cheers,
Nikolaus
The text was updated successfully, but these errors were encountered: