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

createBuilding crash 0x000096AD #3329

Open
1 task done
Xenius97 opened this issue Mar 1, 2024 · 10 comments
Open
1 task done

createBuilding crash 0x000096AD #3329

Xenius97 opened this issue Mar 1, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@Xenius97
Copy link
Contributor

Xenius97 commented Mar 1, 2024

Describe the bug

createBuilding crash

Steps to reproduce

  1. Use createBuilding()
  2. Fly around the map

Version

Multi Theft Auto v1.6-release-22410

Additional context

https://mega.nz/file/wQRUDZYB#NHP447diX6cCtgr7Yu8MuI96P_CjWKa4kQQx7M6Q7fM

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@Xenius97 Xenius97 added the bug Something isn't working label Mar 1, 2024
@Nico8340
Copy link
Contributor

Nico8340 commented Mar 1, 2024

I was only able to reproduce it when I created a lot of buildings at once.

@Nico8340
Copy link
Contributor

Nico8340 commented Mar 1, 2024

I see that when the error message about running out of slots appears, the game crashes. Otherwise, not really.

@Xenius97
Copy link
Contributor Author

Xenius97 commented Mar 1, 2024

I was only able to reproduce it when I created a lot of buildings at once.

Same crash with 5 and 2000 buildings.
I've created 5 buildings (cityhall ls), and crashed at chilliad wood house

@TheNormalnij
Copy link
Contributor

@Xenius97 can you provide test resource, please?
I knew about crashes with more than 2000 buildings, but it always works well for me with 5 buildings

@Xenius97
Copy link
Contributor Author

Xenius97 commented Mar 2, 2024

removeWorldModel(3997, 10000, 0, 0, 0)
removeWorldModel(4045, 10000, 0, 0, 0)
createBuilding(3997, 1479.3359375, -1802.2890625, 12.546875, 0, 0, 0)
removeWorldModel(4163, 10000, 0, 0, 0)
removeWorldModel(4164, 10000, 0, 0, 0)
createBuilding(4163, 1469.3359375, -1732.2890625, 12.4609375, 0, 0, 0)
removeWorldModel(4186, 10000, 0, 0, 0)
removeWorldModel(4057, 10000, 0, 0, 0)
createBuilding(4186, 1479.5546875, -1693.140625, 19.578125, 0, 0, 0)
removeWorldModel(3985, 10000, 0, 0, 0)
removeWorldModel(4210, 10000, 0, 0, 0)
createBuilding(3985, 1479.5625, -1631.453125, 12.078125, 0, 0, 0)
removeWorldModel(3978, 10000, 0, 0, 0)
removeWorldModel(4053, 10000, 0, 0, 0)
createBuilding(3978, 1380.265625, -1655.5390625, 10.8046875, 0, 0, 0)
removeWorldModel(4029, 10000, 0, 0, 0)
removeWorldModel(4136, 10000, 0, 0, 0)
createBuilding(4029, 1629.546875, -1756.0859375, 8.09375, 0, 0, 0)

@Xenius97

This comment was marked as outdated.

@Xenius97 Xenius97 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@Xenius97
Copy link
Contributor Author

Xenius97 commented Mar 6, 2024

Found the issue.
Create a few buildings in one resource, then restart it a few times and crash.

@Xenius97 Xenius97 reopened this Mar 6, 2024
@TheNormalnij
Copy link
Contributor

I hope #3330 fixes this case too.

@Pirulax
Copy link
Contributor

Pirulax commented Mar 6, 2024

@TheNormalnij You could try clearing the references to the building perhaps. (See CEntity::ResolveReferences)

@Pirulax
Copy link
Contributor

Pirulax commented Mar 7, 2024

@TheNormalnij okay, so I've looked into the crash log, and it's here:
https://github.com/gta-reversed/gta-reversed-modern/blob/e3219aeccec725c939c13f27e9ecd338d70e5b8d/source/game_sa/Streaming.cpp#L188
Seems like you aren't calling DeleteRwObject anywhere (which would remove the entity's streaming link).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants