View Issue Details

IDProjectCategoryView StatusLast Update
0007388Multi Theft Auto : San AndreasClientpublic2012-10-22 10:09
ReporterPsydomin Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.3.2Fixed in Version1.3.2 
Summary0007388: Crash when destroying the source of onClientColShapeHit event

Test resource:

[When you have a ped(idk if this only happens with peds) attached to a vehicle and the vehicle blows the players that are nearby crash! ]

Steps To Reproduce

Start server with that resource, teleport to Grove Street (/sp 2480 -1660 14) and type /7388

TagsNo tags attached.



2012-10-13 21:33

viewer   ~~0017741

I can't reproduce this, please provide your code sample.


2012-10-13 21:43

viewer   ~~0017742

Well... I found a way around it and I no longer have the code :S
But I was trying to detach the ped from the vehicle after it had blown


2012-10-13 22:32

viewer   ~~0017745

I've tried detaching the ped and no crash occured.

local veh=createVehicle(400,0,0,5)
local ped=createPed(0,0,0,6)
end, 5000,1)
end, 10000,1)

Tested both client- and serverside, with blowVehicle and destroying the vehicle by weapon. sver/cver: v1.3.1-release-r4760. Everything works fine.


2012-10-13 23:03

viewer   ~~0017746

Last edited: 2012-10-13 23:11

It is not the ped getting detached that is crashing !
In my code after the ped gets detached it creates a colshape attached to the ped.
The vehicle that the ped got detached from is still there when the colshape is created (whitin the col shape)
I think that that is what is crashing the client


2012-10-13 23:15

viewer   ~~0017747

I've created code, that does exactly the same thing that you described.

Could you please provide the code to reproduce this crash? This way we won't have to waste time guessing what could it be...


2012-10-14 00:21

viewer   ~~0017748

Last edited: 2012-10-14 02:36

Sorry, I could have posted this code before. Here it is:
That should be enough to see what is causing the crash

It crashes on the 2nd function

Edit: It seems that this only happens in my client. Tried with a friend and he didnt crash :S


2012-10-14 11:40

administrator   ~~0017751

The pastebin code is incomplete. Could you please make a small working resource which causes the crash?

Also, what is your client build number? (Use 'ver' command in the client console)


2012-10-14 16:44

viewer   ~~0017756

Last edited: 2012-10-14 16:45

I tested a bit more and it seems to only crash when the actions occur in the water.

I've simplified the code so that you can test. This code crashes me on Windows and Linux servers. Btw i'm on Windows XP

My mta build number is: Multi Theft Auto v1.3.1-release-4710.2.010

The code:


2012-10-15 19:02

administrator   ~~0017769

Thanks for that.

Please check MTA\dumps and upload the file that is created after the crash.


2012-10-15 19:04

viewer   ~~0017770

crash obtained with Psydomin's code ofc.


2012-10-17 13:07

viewer   ~~0017789

Last edited: 2012-10-17 13:08

I've reduced this code to following lines:

local ped=createPed(0,x,y,z)
local cs=createColSphere(0,0,0,2)

addEventHandler("onClientColShapeHit", root, function()
destroyElement(source) -- this will crash

test resource:

steps to reproduce: start, go to gs (/sp 2480 -1660 14) and type /7388 to crash

the crash occurs, when we destroy source of onClientColShapeHit. The event has to be triggered by element which holds an attachment to source.

The bug occurs only in client-side. When executed server-side, clients in range will crash too, though.

Summary should be renamed, as it does not involve vehicles.


2012-10-17 14:11

updater   ~~0017790

Is teleporting necessary? First time I forgot to use teleport and it's seems that dumps are same


2012-10-17 17:33

viewer   ~~0017792

That's true, player doesn't have to be in streaming range.


2012-10-18 01:37

administrator   ~~0017794

Thanks for the example scripts.

Fixed in

Issue History

Date Modified Username Field Change