View Issue Details

IDProjectCategoryView StatusLast Update
0008310Multi Theft Auto : San AndreasServerpublic2014-07-05 13:39
ReporterarranTuna Assigned Tosbx320  
Status resolvedResolutionfixed 
Target Version1.4Fixed in Version1.4 
Summary0008310: getPedOccupiedVehicle sometimes returns invalid element

Like #8252 but for getPedOccupiedVehicle.

Steps To Reproduce

Do this a few times on a busy server:

function getVeh()
for i, plr in ipairs(getElementsByType("player")) do
local veh = getPedOccupiedVehicle(plr)
if (veh and not isElement(veh)) then
outputDebugString("Veh but not element: "..tostring(veh))
setTimer(getVeh, 100, 10)

And you'll get something like:

Veh but not element: userdata: 3319B558 ([string "function getVeh()..."]:nil)
Veh but not element: userdata: 3319B558 ([string "function getVeh()..."]:nil)

TagsNo tags attached.



2014-07-03 03:32

administrator   ~~0021223

Alright, my initial assumptions were totally wrong. My previous changes prevented getVehicleOccupant(s) returning an invalid player element.

However this occurs when a vehicle element was deleted in the same server frame. This probably affects the client just in the same way.

Furthermore I found a simple way to reproduce this issue:

I feel like the current approach isn't the best. Looking into a new approach now.


2014-07-04 04:09

administrator   ~~0021235

Retest with please.


2014-07-05 13:38

manager   ~~0021241

No longer getting any debug warnings

Issue History

Date Modified Username Field Change