Vehicles disapearing from parking

Vehicles disapearing from parking

« posted: Dec 08, 2017, 08:56 PM »
I've had this issue for a while and I can't for the life of my figure out what's causing it.

Occasionally when players park a vehicle it will be deleted after the next server restart. This seems to happen most commonly when players park multiple vehicles in quick succession or retrieve and re-park the same vehicle quickly.

I've confirmed that the vehicles are saved to the database, and are flagged as parked prior to the server restart, however they are deleted once the server restarts.

Re: Vehicles disapearing from parking

« Reply #1 posted: Dec 30, 2017, 09:47 PM »
Since the issue occurs during session start, I focused on the vload portion of persistence.

What I discovered is that while vehicle that have been ignored beyond the servers maxlife setting are deleted via Sql querry, there's still a check to which adds expired vehicles to the delete queue. I removed the check and the problem seems to have stopped.

I also had to do the same thing in oload, as in rare occasions the same thing was happening.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicles disapearing from parking

« Reply #2 posted: Dec 31, 2017, 02:43 AM »

Re: Vehicles disapearing from parking

« Reply #3 posted: Jan 01, 2018, 02:05 AM »
changed

if (!isNil "_class" && !isNil "_pos" && {_maxLifetime <= 0 || _hoursAlive < _maxLifetime}) then

to

if (!isNil "_class" && !isNil "_pos") then



It feels like the wrong solution, but it works. I've stopped getting complaints about parked vehicles vanishing, and I haven't noticed a buildup of vehicles on the map.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicles disapearing from parking

« Reply #4 posted: Jan 01, 2018, 02:29 AM »
I'm very much sure this isn't the source of the problem. _hoursAlive was strictly for iniDB, and for extDB it is always 0 because it isn't queried at all, therefore that condition is never even met in the first place. Additionnally, all the queries that run on server start have "WHERE Parked < 1", so they never affect parked vehicles.

I think the drop in complaints is unquestionably just a coincidence, and the problem will resurface unless properly debugged. The first step would be to rename @extDB3\extDB3_x64.dll to something else, then copy-paste @extDB3\DEBUG\extDB3_x64.dll into @extDB3, so that all queries are saved in the extDB logs. Normally this shouldn't affect server performance.

Re: Vehicles disapearing from parking

« Reply #5 posted: Jan 04, 2018, 01:17 AM »
Yep. Your right, the problem still occurs, but seems to have reduced in frequency.

I'm digging through the logs now.

Re: Vehicles disapearing from parking

« Reply #6 posted: Jan 05, 2018, 09:52 AM »
Okay. Found something worth reporting from the logs.

From a confirmed occurrence of the bug, I found something interesting in the logs. log files 19-0-32 and 19-2-23, which itself is split into 19-2-23, 19-2-23.1 and 19-2-23.2. 0-32 appears to be the logs for the server instance, while 2-32 appears to be the logs for the headless client.

0-32 shows the vehicle retrieved from parking and returned to parking shortly therafter. 2-32 shows the vehicle being retrieved from parking and then deleted.

The timestamps between the log events have roughly the same offset as the start times, Just under 2 minutes. So the order of events as reported to the database are, vehicle retrieved (server), vehicle returned (server), vehicle retrieved (HC), delete vehicle (HC)


could this be parking doesn't get along too well with HC vehicle saving?

NOTE: logs not attached as they exceed maximum upload size.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicles disapearing from parking

« Reply #7 posted: Jan 05, 2018, 03:43 PM »
Okay so you had not specified there was an HC before, this is very important info which should never be omitted. There has been some issues with HC interfering with parking in the past. I need you to give me extDB DEBUG logs of both the server and HC. Upload them somewhere like Mediafire or MEGA.

Re: Vehicles disapearing from parking

« Reply #8 posted: Jan 05, 2018, 09:15 PM »
link for log files. I can upload more if you need them.

https://www.dropbox.com/sh/h5b1dza9lud2qf5/AADIS9xVFXrDwYzRY88VraWia?dl=0
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicles disapearing from parking

« Reply #9 posted: Jan 05, 2018, 09:48 PM »
I will also need you to give me the player UID of someone who reported parking issues. The moment when he parked the now-missing vehicle must be present in the logs.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2495

Re: Vehicles disapearing from parking

« Reply #10 posted: Jan 06, 2018, 01:53 AM »
I think I might have found the problem: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/commit/9ecdf8866e33e6455ef474c8cfe3f6da47dffc8d

The vehicles were probably being deleted too fast by parking before the HC could acquire the vehicle ID and remove it from the deletion tracking queue, so I tweaked the untrack function to transmit the vehicle ID directly instead of the vehicle object.

Re: Vehicles disapearing from parking

« Reply #11 posted: Jan 06, 2018, 02:09 AM »
Cool. I'll make the change and tell you if everything is working.