Skip to content

Certain objects cause crashes #424

Closed
@qaisjp

Description

@qaisjp

Describe the bug
@ArranTuna said:

I accidentally did createObject(387, x, y, z) instead of 3877 and it instant crashes anyone within streaming range of the object. It returns userdata so it seems to think 387 is a valid object ID when it's not.

To Reproduce
Execute crun createObject(387, getElementPosition(localPlayer)) to crash your game.

This particular repro will result in the following crash:

Version = 1.5.8-release-20698.0.000
Time = Wed Oct 28 15:56:28 2020
Module = C:\Program Files (x86)\Rockstar Games\GTA San Andreas\gta_sa.exe
Code = 0xC0000005
Offset = 0x003C5A55

EAX=00000025  EBX=287F1BD8  ECX=00000000  EDX=0177F37C  ESI=2E18BE50
EDI=2E18B90C  EBP=0422CD08  ESP=0177F31C  EIP=00000000  FLG=00010283
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B

Expected behavior
It should not crash.

Additional context
@lopezloo said:

default.ide says that ID is clothing.
Line 126: 387, clothes01, generic, null, 2000.0

Other clothes objects cause a crash too:

384, clothes01, generic, null, 2000.0
385, clothes01, generic, null, 2000.0
386, clothes01, generic, null, 2000.0
387, clothes01, generic, null, 2000.0
388, clothes01, generic, null, 2000.0
389, clothes01, generic, null, 2000.0
390, clothes01, generic, null, 2000.0
391, clothes01, generic, null, 2000.0
392, clothes01, generic, null, 2000.0
393, clothes01, generic, null, 2000.0

These objects don't have textures (hands)

394, SHANDL, generic, null, 15.0
395, SHANDR, generic, null, 15.0
396, FHANDL, generic, null, 15.0
397, FHANDR, generic, null, 15.0

These custscene objects only have collisions (and sometimes freeze game?):

300, cutobj01, generic, null, 2000.0
301, cutobj02, generic, null, 2000.0
302, cutobj03, generic, null, 2000.0
303, cutobj04, generic, null, 2000.0
304, cutobj05, generic, null, 2000.0
305, cutobj06, generic, null, 2000.0
306, cutobj07, generic, null, 2000.0
307, cutobj08, generic, null, 2000.0
308, cutobj09, generic, null, 2000.0
309, cutobj10, generic, null, 2000.0
310, cutobj11, generic, null, 2000.0
311, cutobj12, generic, null, 2000.0
312, cutobj13, generic, null, 2000.0
313, cutobj14, generic, null, 2000.0
314, cutobj15, generic, null, 2000.0
315, cutobj16, generic, null, 2000.0
316, cutobj17, generic, null, 2000.0
317, cutobj18, generic, null, 2000.0
318, cutobj19, generic, null, 2000.0
319, cutobj20, generic, null, 2000.0

@patrikjuvonen reproduced in Multi Theft Auto v1.5.5-release-13182.

From https://bugs.mtasa.com/view.php?id=8115

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions