Crash Detector Question
#1

Alright, I've recently added the crashdetect plugin due to request of my host to see if it's my server crashing or an issue on their side. I've checked my logs and I have over 1000 lines saying the same message, but I don't understand it. Here's the message it spams:

pawn Код:
0007258c in public OnVehicleSpawn () from esrp.amx
native SetVehicleToRespawn () [080ca6f0] from samp03svr
Now I figured this was something to do with OnVehicleSpawn, but I don't see an issue in my code. I'll post it up to the part of "SetVehicleToRespawn"

pawn Код:
public OnVehicleSpawn(vehicleid) {

    new vid = vehicleid-1;
   
    DestroyVehicle(vehicleid);
    CreateVehicle(VehicleData[vid][vModel], VehicleData[vid][vCordX], VehicleData[vid][vCordY], VehicleData[vid][vCordZ], VehicleData[vid][vCordA], VehicleData[vid][vColor1], VehicleData[vid][vColor2], -1);
   
    if(!strcmp(VehicleData[vid][vReg], "000000")) {

        SetVehicleNumberPlate(vehicleid, " ");

    } else {

        SetVehicleNumberPlate(vehicleid, VehicleData[vid][vReg]);

    }

    SetVehicleToRespawn(vehicleid);
   
return 1;

}
Well thanks in advance to anyone who replies.

EDIT:

Also I see this now aswell:

pawn Код:
Run time error 3: "Stack/heap collision (insufficient stack size)"
Stack pointer (STK) is 0x68C2A0, heap pointer (HEA) is 0x68C264
Reply
#2

Whats the point of SetVehicleNumberPlayer(vehicleid," "); ?
Does that need to be? Maybe you need to add text there and not leave the plate blank (Just guessing )
Reply
#3

It looks like infiloop to me. OnVehicleSpawn is called every time when vehicle spawns - SetVehicleToRespawn calls OnVehicleSpawn, and on, and on, until stack hits the heap.
Reply
#4

Quote:
Originally Posted by Passout
Посмотреть сообщение
Whats the point of SetVehicleNumberPlayer(vehicleid," "); ?
Does that need to be? Maybe you need to add text there and not leave the plate blank (Just guessing )
It's for the DMV system, when you get a car it has no plate, so it stays blank till you go register your vehicle.



Quote:
Originally Posted by Misiur
Посмотреть сообщение
It looks like infiloop to me. OnVehicleSpawn is called every time when vehicle spawns - SetVehicleToRespawn calls OnVehicleSpawn, and on, and on, until stack hits the heap.
I see what your saying here, I'm working on cleaning this gamemode up by a lot, do you recommend better ways of doing this?

Quote:
Originally Posted by ******
Посмотреть сообщение
The second error is caused by too many large locals, combined with too long function call chains. The first I don't know if that is the whole message.
Hm, I figured thats what it meaned, just wanted to make sure it didnt have to do with the same code. And yes that is the full message, besides that is spammed for at like 3000 lines, with the same message/code
Reply
#5

pawn Код:
new vid = vehicleid-1;
What if a vehicle has ID 0? It will go -1 which is out of the range. Not sure if that causes though.
Reply
#6

Do not recreate the vehicle, simply move it to coords, change its color and set its plate. The plate should change because spawned doesn't mean streamed.
Reply
#7

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
pawn Код:
new vid = vehicleid-1;
What if a vehicle has ID 0? It will go -1 which is out of the range. Not sure if that causes though.
With mysql, the vehicle ID gets stored into the enums. It loads 1 ID to high, so to get correct vehicle you have to do -1, it will never reach 0 though.

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Do not recreate the vehicle, simply move it to coords, change its color and set its plate. The plate should change because spawned doesn't mean streamed.
Alright I will def do this now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)