View Issue Details

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

Test resource: http://lss-rp.pl/_/7388_2.zip

[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.

Activities

W

2012-10-13 21:33

viewer   ~~0017741

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

Psydomin

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

W

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)
attachElements(ped,veh)
setTimer(function()
blowVehicle(veh)
end, 5000,1)
setTimer(function()
detachElements(ped,veh)
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.

Psydomin

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

W

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...

Psydomin

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:
http://pastebin.com/erCTXqy9
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

ccw

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)

Psydomin

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: http://pastebin.com/w6F82gUV

ccw

2012-10-15 19:02

administrator   ~~0017769

Thanks for that.

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

W

2012-10-15 19:04

viewer   ~~0017770

http://lss-rp.pl/_/client_1.3.1-release-4760.0.000_MSVCR90_0006ccb5_417_CPrMb_00000000_55F3_FFF_2DB0D_20121015_1504.dmp

crash obtained with Psydomin's code ofc.

W

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)
attachElements(cs,ped)

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

test resource: http://lss-rp.pl/_/7388_2.zip

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.

CWanted

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 http://rghost.net/40988969

W

2012-10-17 17:33

viewer   ~~0017792

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

ccw

2012-10-18 01:37

administrator   ~~0017794

Thanks for the example scripts.

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=4767

Issue History

Date Modified Username Field Change