View Issue Details

IDProjectCategoryView StatusLast Update
0002041Multi Theft Auto : San AndreasScriptingpublic2007-05-13 16:08
ReporterTalidanAssigned ToJax 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Versionblue_sa.r2.a12 
Target VersionFixed in Versionmtasadm_v1.0-dp1 
Summary0002041: Setting player's dimension causes crash
Description

Resource is "keywords", on bastage ftp.

---------On resource start:------------
for k,player in pairs(getElementsByType("player")) do
--doStuff ( player, k )
outputChatBox ( "Loading...please wait...", player, 0, 150, 100 )
setTimer("doStuff",2000,1,player,k)
end

-----------the dostuff function:-----------
function doStuff ( player, dim )
addPlayerToTeam ( player, blankTeam )
setElementDimension ( player, dim )
bindKey ( player, "f", "down", "freezeObject" )
bindKey ( player, "r", "down", "resetCamera" )
setPlayerGravity ( player, 0 )
outputChatBox('Press Enter to start. Use teamchat to enter your keywords.', player, 0, 150, 100 )
for i,component in ipairs(HUDcomponents) do
showPlayerHudComponent(player,component,false)
end
local templateObject = createObject(18323,CX,CY,CZ)
setElementDimension ( templateObject, dim )

outputChatBox ( "Object Dim "..getElementDimension ( templateObject ) )
setElementData ( player, "templateObject", templateObject )
bindKey ( player, "enter", "down", "nextElement" )
triggerClientEvent ( player, "setPreviewMode", getRootElement(), templateObject )

end


Commenting the line "setElementDimension ( player, dim )" prevents the crash.

The crash only occurs when more than one player is in the server.

Additional Information

MINE:
-- Unhandled exception --

Time = Sun May 13 01:04:42 2007
Code = 0xC0000005
Offset = 0x06D87AB9

EAX=00000001 EBX=0457BA20 ECX=048415D0 EDX=06DE027C ESI=047C34A8
EDI=00000000 EBP=C4437B09 ESP=0022F5E0 EIP=06D87AB9 FLG=00210246
CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000

-- End of unhandled exception --

SLOTHMAN:
<Slothman> -- Unhandled exception --
<Slothman> Time = Sat May 12 20:06:03 2007
<Slothman> Code = 0xC0000005
<Slothman> Offset = 0x08E57AB9
<Slothman> EAX=00000001 EBX=03CCD330 ECX=03B60820 EDX=08EB027C ESI=035736B0
<Slothman> EDI=00000000 EBP=FEB24BF6 ESP=0022F5E0 EIP=08E57AB9 FLG=00210246
<Slothman> CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000
<Slothman> -- End of unhandled exception --

TagsNo tags attached.

Activities

Jax

2007-05-13 08:21

administrator   ~~0004553

Im pretty sure setting gravity to 0 causes the crash, il check it out later

Jax

2007-05-13 12:34

administrator   ~~0004555

The player needs to be spawned before you can change things like dimension, might need to store it and set it when he is spawned, if the work-around is too ugly.
Added some checks.

Talidan

2007-05-13 15:54

administrator   ~~0004557

still here as of 0513

Jax

2007-05-13 16:08

administrator   ~~0004558

Wasnt even fixed til today..

Issue History

Date Modified Username Field Change