fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Crashes when loading an IPL while inside said IPL (and editting entities in a way)

Open mcNuggets1 opened this issue 1 year ago • 2 comments

I've experienced a for 100% reproducable crash when loading the casino interor, while inside it. I presume my character was stuck in one of the collisions, while the IPL loaded, making the game crash.

Literally happens when loading into the game and spawning (when presumably the interior loads) for a 100%. Sadly I didn't fetch the specific position to make the crash reproducable for others, because I disabled the IPL to get outta there to fix the crash.

I've got a full crash dump of the whole thing, I happen to have two, but one in this case should suffice. I honestly don't know how to fix it.

Used IPL loader + ESX legacy: https://github.com/Bob74/bob74_ipl

crash.zip

Edit got the position: {"x":1145.5,"y":268.4,"z":-51.8,"heading":135.0}

mcNuggets1 avatar Aug 09 '22 11:08 mcNuggets1

After some testing it seems to relate to the entities in the casino, which when targetted by functinos such as make the client crash, if the entity is loading for the first time.

Specifically the black jack tables. When calling GetEntityBoneIndexByName, GetWorldPositionOfEntityBone for the chairs on the entity after the entity is found by the system. Crashes instantly.

Calling only GetEntityBoneIndexByName on the loading entity causes the crash. That's enough. Multiple times tested now. Even after checking for DoesEntityExist

mcNuggets1 avatar Aug 09 '22 20:08 mcNuggets1

Can be fixed by calling GetEntityBoneCount and verifying the count manually before calling the bone functions, but as this is a crash and nowhere documented, I leave it reported.

mcNuggets1 avatar Aug 09 '22 21:08 mcNuggets1

Literally happens when loading into the game and spawning (when presumably the interior loads) for a 100%.

Calling GET_ENTITY_BONE_INDEX_BY_NAME while the entity does not have a valid or setup crSkeletonData (or fragInst) leads to a nullptr deference when looking up the bone tag index.

2699: wisconsin-seventeen-freddie. For reference here is the assembly (b323):

.text:00000001409CAC11 33 C9                     xor     ecx, ecx
.text:00000001409CAC13                         loc_1409CAC13:
.text:00000001409CAC13 48 8B 09                  mov     rcx, [rcx]

gottfriedleibniz avatar Feb 02 '24 17:02 gottfriedleibniz