SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 07/09/2018, 10:26 PM   #11
NeXTGoD
Big Clucker
 
NeXTGoD's Avatar
 
Join Date: Jul 2018
Posts: 83
Reputation: 4
Default Re: Server crash when destroyvehicle

Quote:
Originally Posted by RogueDrifter View Post
Show server logs using crashdetect.
UPDATE: Day 4 has passed without any crashes, so I think I've fixed it with ( vehicleid != INVALID_VEHICLE_ID ) check before destroying the vehicle.
__________________
.

xSF Reborn:


.
NeXTGoD is online now   Reply With Quote
Old 09/09/2018, 04:33 AM   #12
ashleymeah
Little Clucker
 
ashleymeah's Avatar
 
Join Date: Sep 2013
Location: London, UK
Posts: 12
Reputation: 0
Default Re: Server crash when destroyvehicle

This is interesting, this is a few years ago but I ran a script that did this with no issue but another option here to stay clear of this issue is to destroy the vehicle in "OnVehicleSpawn" with a variable to allow the first spawn.
__________________


samp.nl-roleplay.com || Join us on discord ! || https://discord.gg/CPgjBfU
ashleymeah is offline   Reply With Quote
Old 09/09/2018, 06:24 AM   #13
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,293
Reputation: 525
Default Re: Server crash when destroyvehicle

Quote:
Originally Posted by ashleymeah View Post
This is interesting, this is a few years ago but I ran a script that did this with no issue but another option here to stay clear of this issue is to destroy the vehicle in "OnVehicleSpawn" with a variable to allow the first spawn.
No, the solution is to check for the invalid vehicle before destroying it obviously...
Sew_Sumi is offline   Reply With Quote
Old 10/09/2018, 01:13 AM   #14
Graber
Banned
 
Join Date: Mar 2013
Location: Germany
Posts: 108
Reputation: 147
Default Re: Server crash when destroyvehicle

The original error shows a vehicle being destroyed inside a foreach loop, in other words, removing an item from an iterator inside a loop, which is known with YSI to cause problems.

Although maybe the error could be a result of a SA-MP bug, but first a repro should be made without any other includes.
Graber is offline   Reply With Quote
Old 16/09/2018, 09:17 AM   #15
AmigaBlizzard
Huge Clucker
 
Join Date: Jul 2012
Posts: 321
Reputation: 60
Default Re: Server crash when destroyvehicle

Or you could set a flag for that vehicle and destroy it under OnVehicleSpawn in case the flag was set.
AmigaBlizzard is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash detect , server crash Debug. whats wrong? MarwanCartman Server Support 4 10/05/2015 11:14 AM
[HELP]Server Crash - Located crash line with CrashDETECT - Guest4390857394857 Server Support 4 05/09/2014 04:37 AM
DestroyVehicle crash. MP2 Bug Reports 2 24/01/2013 07:02 PM
Fatal Game crash, Not client or server crash SourceCode Scripting Help 3 11/10/2011 05:13 PM
'SERVER: Unknown command' after used DestroyVehicle(); Faust Help Archive 12 25/02/2009 04:16 PM


All times are GMT. The time now is 09:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.