Skip to content
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

Error in UnrealContainers! TArray end. It will make the game crash. #168

Open
MidTerm-CN opened this issue Jul 2, 2024 · 5 comments
Open

Comments

@MidTerm-CN
Copy link
Contributor

image
image

@Fischsalat
Copy link
Collaborator

Fischsalat commented Jul 2, 2024

The call to TArray::Num() can only crash if your TArray is invalid. I think your GameState is nullptr. It's not crashing at accessing PlayerArray because you're taking a reference to it. The compiler likely optimized it so you're never accessing GameState, instead it's just moving GameState + offsetof(PlayerArray) into the variable (Actors).

@MidTerm-CN
Copy link
Contributor Author

The dll was compiled in Debug and I have checked whether GameState is nullptr. Right, I will test it again.

@Fischsalat
Copy link
Collaborator

In that case a crash in TArray::Num doesn't make any sense.

@MidTerm-CN
Copy link
Contributor Author

It's not completed !
I try agian, and it make my game crash in another way!
image

@Fischsalat Fischsalat reopened this Jul 4, 2024
@OS-Void
Copy link

OS-Void commented Jul 6, 2024

Sorry for chiming in if this is not related, but in the past we were experiencing these crashes on ::Num, even when we checked for null.

Along side the fixes wit the negative index (from the other Issue report) I also have done this:

oldcrash

The current project I'm working on with a few friends, is a fork of another menu not from us, and they had that first "TODO", I added the second TODO node after checking WorldContext and or WorldActors (It's been some time since I did these changes to the SDK to remember properly)

I believe our crashing stopped since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants