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

fix(game/five): fix crash related to river entities #3184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ook3D
Copy link
Contributor

@ook3D ook3D commented Feb 21, 2025

currently, the game attempts to get a river entity then immediately references it, without checking if the entity is valid, which seems to cause crashes.

GTA5_b3258.exe!sub_1406C1D98 (0x18)
GTA5_b3258.exe!sub_1406DEA90 (0x298)
GTA5_b3258.exe!sub_140777E18 (0x349)
GTA5_b3258.exe!sub_14094CBC0 (0xd5)
GTA5_b3258.exe!sub_14168A14C (0x9c)
GTA5_b3258.exe!sub_14093F53C (0x121)
GTA5_b3258.exe!sub_14095C6AC (0x30)

Goal of this PR

Fix game crash
...

How is this PR achieving the goal

check if the entity is valid first
...

This PR applies to the following area(s)

FiveM
...

Successfully tested on

Game builds: ..

Platforms: Windows, Linux

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@DaniGP17
Copy link
Contributor

the reason i have not tested this code is because FiveM does not like it when i replace gta-core-five.dll and i cannot launch the game.

If you tell me what to do, I can try it myself if you want.

@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Feb 21, 2025
currently, the game attempts to get a river entity then immediately references it, without checking if the entity is valid, which seems to cause crashes.

GTA5_b3258.exe!sub_1406C1D98 (0x18)
GTA5_b3258.exe!sub_1406DEA90 (0x298)
GTA5_b3258.exe!sub_140777E18 (0x349)
GTA5_b3258.exe!sub_14094CBC0 (0xd5)
GTA5_b3258.exe!sub_14168A14C (0x9c)
GTA5_b3258.exe!sub_14093F53C (0x121)
GTA5_b3258.exe!sub_14095C6AC (0x30)
@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

was able to get things working to test, seems to be working properly

@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Feb 21, 2025
@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

was able to get things working to test, seems to be working properly

image
i spoke too soon, it seems to be invalidating all river entities currently lol

@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

image
interestingly only this section isnt working 🤔

@ook3D ook3D marked this pull request as draft February 21, 2025 20:19
@Gogsi
Copy link

Gogsi commented Feb 21, 2025

For whatever reason, the water entities in that section of the map are duplicated - There are
cs3_05_water07_grp1 and cs3_05_water07_grp2;
cs3_05_water06_grp1 and cs3_05_water06_grp2.
I've raised the grp2 entities here in CodeWalker to show it

image

I don't know if that's related to the issue though or how it can be fixed

@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

For whatever reason, the water entities in that section of the map are duplicated - There are cs3_05_water07_grp1 and cs3_05_water07_grp2; cs3_05_water06_grp1 and cs3_05_water06_grp2. I've raised the grp2 entities here in CodeWalker to show it

image

I don't know if that's related to the issue though or how it can be fixed

Hmm, that's really odd

@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

For whatever reason, the water entities in that section of the map are duplicated - There are cs3_05_water07_grp1 and cs3_05_water07_grp2; cs3_05_water06_grp1 and cs3_05_water06_grp2. I've raised the grp2 entities here in CodeWalker to show it
image
I don't know if that's related to the issue though or how it can be fixed

Hmm, that's really odd

wait wtf is happening here?
image
its not loading in codewalker for me as well?

@ook3D
Copy link
Contributor Author

ook3D commented Feb 21, 2025

i assume this issue isnt related to my PR then if its also present inside codewalker, really weird

@ook3D ook3D marked this pull request as ready for review February 21, 2025 20:39
@github-actions github-actions bot added invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Feb 21, 2025
@DaniGP17
Copy link
Contributor

i assume this issue isnt related to my PR then if its also present inside codewalker, really weird

Yes, I started looking and found another place where the river does not flow, it's strange that no one noticed before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants