Server crashing with vehicles
#1

Hello again,

I've asked this question before and I thought the issue was resolved, but after another month of trying to find the cause of this crash, I'm no closer than I was 5 months ago.

The crash seems to occur when our private vehicles are destroyed and then spawned by the server. The code seems to reach the end, though in the space of one second, the server destroys the vehicle, then spawns the vehicle, then a crash occurs.

I'm really at a loss as to what it could be. I've been through the code to check if ANYTHING could be interferring with either OnVehicleDeath or any of the vehicle functions. The only code that uses these functions is my own code. Any assistance with debugging the cause would help me so much, this has been going on for too long and I'm probably going to kick myself when the cause is found. The vehicle system uses the exact same set-up as my server's house system, no issues there so I can only imagine it's something to do with SA-MP's vehicle system but I'm clueless at this point.

Crash Log
PHP код:
[05:45:17] ------------------------------------------- OnVehicleDeath Started
[05:45:17Destroyed id 234
[05:45:17] ------------------------------------------- OwnedVehicleRespawn Started
[05:45:17] [DEBUGOwnedVehicleRespawn
[05:45:17] [DEBUGVehicle to respawn234Database ID259
[05:45:17] [DEBUGOwnedVehicleRespawn Finished
[05:45:17] ------------------------------------------- OwnedVehicleRespawn Ended
[05:45:17] -------------------------------------------OnVehicleDeath Ended
[05:45:17] [debugServer crashed due to an unknown error
[05:45:17] [debugNative backtrace:
[
05:45:17] [debug#0 a9f51e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[05:45:17] [debug#1 a9f4abcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[05:45:17] [debug#2 a9f4bdbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[05:45:17] [debug#3 a9f4c226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[05:45:17] [debug#4 a9f51adc in ?? () from plugins/crashdetect.so
[05:45:17] [debug#5 ab2a6410 in ?? ()
[05:45:17] [debug#6 ab2a6430 in ?? ()
[05:45:17] [debug#7 aafde871 in gsignal () from /lib/libc.so.6
[05:45:17] [debug#8 aafe014a in abort () from /lib/libc.so.6
[05:45:17] [debug#9 ab01e735 in ?? () from /lib/libc.so.6
[05:45:17] [debug#10 ab024b91 in ?? () from /lib/libc.so.6
[05:45:17] [debug#11 ab0272f8 in ?? () from /lib/libc.so.6
[05:45:17] [debug#12 ab23fdf2 in _ZdlPv () from /usr/lib/libstdc++.so.6
[05:45:17] [debug#13 ab23fe4e in _ZdaPv () from /usr/lib/libstdc++.so.6
[05:45:17] [debug#14 0807fbf8 in ?? () from ./samp03svr
[05:45:17] [debug#15 0808013d in ?? () from ./samp03svr
[05:45:17] [debug#16 08074c3a in ?? () from ./samp03svr
[05:45:17] [debug#17 080763fe in ?? () from ./samp03svr
[05:45:17] [debug#18 ab284b39 in ?? () from /lib/libpthread.so.0
[05:45:17] [debug#19 ab096c1e in clone () from /lib/libc.so.6 
OnVehicleDeath
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    new 
bool:found false;
    print(
"------------------------------------------- OnVehicleDeath Started");
    
    for(new 
iMAX_SAVED_VEHICLESi++)
    {
        if (
vehicleid != VehicleInfo[i][vehicleID])
        {
            continue;
        }
        else
        {
            if (
DestroyVehicle(vehicleid))
            {
                
printf("Destroyed id %i"vehicleid);
                
//SetTimerEx("timedOwnedVehicleRespawn", 2000, false, "i", i);
                
OwnedVehicleRespawn(i);
            }
            else
            {
                
printf("The vehicle %i was not destroyed"vehicleid);
            }
            
found true;
            break;
        }
    }
    if (!
found)
    {
        print(
"DEBUG] The vehicle was not a private vehicle.");
    }
    print(
"-------------------------------------------OnVehicleDeath Ended");

OwnedVehicleRespawn
PHP код:
forward OwnedVehicleRespawn(vehicleid);
public 
OwnedVehicleRespawn(vehicleid)
{
    print(
"------------------------------------------- OwnedVehicleRespawn Started");
    print(
"[DEBUG] OwnedVehicleRespawn");
    
    
VehicleInfo[vehicleid][vehicleID] = CreateVehicle(VehicleInfo[vehicleid][vModelID], VehicleInfo[vehicleid][vX], VehicleInfo[vehicleid][vY], VehicleInfo[vehicleid][vZ], VehicleInfo[vehicleid][vAngle], VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2], 36000);
    
ModVehicle(VehicleInfo[vehicleid][vehicleID]);
    
ChangeVehiclePaintjob(VehicleInfo[vehicleid][vehicleID], VehicleInfo[vehicleid][vPaintjob]);
    
    
printf("[DEBUG] Vehicle to respawn: %i; Database ID: %i"VehicleInfo[vehicleid][vehicleID], VehicleInfo[vehicleid][dbID]);
    
    print(
"[DEBUG] OwnedVehicleRespawn Finished");
    print(
"------------------------------------------- OwnedVehicleRespawn Ended");

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)