Crash server - function native
#1

Код:
[17:56:11] [debug] Server crashed while executing xyz.amx
[17:56:11] [debug] AMX backtrace:
[17:56:11] [debug] #0 native DestroyDynamicObject () in streamer.so
[17:56:11] [debug] #1 001bfd14 in public DestroyVehicleEx (vehicleid=482) at D:\scoala proiecte\My Work\gamemodes\xyz.pwn:24623
[17:56:11] [debug] #2 000aee24 in public OnVehicleDeath (vehicleid=482, killerid=2) at D:\scoala proiecte\My Work\gamemodes\xyz.pwn:8364
[17:56:11] [debug] Native backtrace:
[17:56:11] [debug] #0 f739f8b6 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so
[17:56:11] [debug] #1 f7397120 in _ZN18CrashDetectHandler20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so
[17:56:11] [debug] #2 f7397886 in _ZN18CrashDetectHandler20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so
[17:56:11] [debug] #3 f7397f96 in _ZN18CrashDetectHandler7OnCrashERKN2os7ContextE () in plugins/crashdetect.so
[17:56:11] [debug] #4 f739ef82 in ?? () in plugins/crashdetect.so
[17:56:11] [debug] #5 f7796cb0 in ?? ()
[17:56:11] [debug] #6 f7346d81 in _ZN5boost9unordered6detail5tableINS1_3setISaIiEiNS_4hashIiEESt8equal_toIiEEEED1Ev () in plugins/streamer.so
[17:56:11] [debug] #7 f735aa46 in _ZN5boost13intrusive_ptrIN4Item6ObjectEED1Ev () in plugins/streamer.so
[17:56:11] [debug] #8 f7336032 in _ZN7Utility13destroyObjectEN5boost9unordered15iterator_detail8iteratorINS1_6detail8ptr_nodeISt4pairIKiNS0_13intrusive_ptrIN4Item6ObjectEEEEEEEE () in plugins/streamer.so
[17:56:11] [debug] #9 f7336471 in _ZN7Natives20DestroyDynamicObjectEP6tagAMXPi () in plugins/streamer.so
[17:56:11] [debug] #10 080950e4 in ?? () in ./samp03svr
[17:56:11] [debug] #11 f7398b9b in _ZN18CrashDetectHandler15ProcessCallbackEiPiS0_ () in plugins/crashdetect.so
[17:56:11] [debug] #12 f739cfc2 in ?? () in plugins/crashdetect.so
[17:56:11] [debug] #13 f73a1bc7 in amx_Exec () in plugins/crashdetect.so
[17:56:11] [debug] Registers:
[17:56:11] [debug] EAX: 00000011 EBX: f737d7f0 ECX: 09238118 EDX: 6e071900
[17:56:11] [debug] ESI: 094d9920 EDI: 094d9a54 EBP: ffca5468 ESP: ffca5450
[17:56:11] [debug] EIP: f7346d81 EFLAGS: 00010206
[17:56:11] [debug] Stack:
[17:56:11] [debug] ESP+00000000: 000000c1 0957f198 f7434b19 f737d7f0
[17:56:11] [debug] ESP+00000020: 094d9a54 0943b40c 0000015a f737d7f0
[17:56:11] [debug] ESP+00000040: 0974a1ac 0974a1ac 00000000 f7579000
[17:56:11] [debug] ESP+00000060: ffca5518 ffca5508 093f824c 000001e1
[17:56:11] [debug] ESP+00000080: 00000000 093f8100 093f81b4 094695e8
[17:56:11] [debug] ESP+000000a0: 094d9648 000001e1 09458348 00000810
[17:56:11] [debug] ESP+000000c0: 094d9920 00000810 094d9920 f737d7f0
[17:56:11] [debug] ESP+000000e0: ffca5548 0974a1a0 ffca5548 f738ed39
[17:56:11] [debug] ESP+00000100: 000016d8 091a53c0 ffca5588 080950e4
[17:56:11] [debug] ESP+00000120: ffca56d8 00000000 f7336390 f73c4000
[17:56:11] [debug] ESP+00000140: 091a53c0 0000002c ffca579c f609392c
[17:56:11] [debug] ESP+00000160: 08ff1208 f7579000 ffca5648 f74e4278
[17:56:11] [debug] ESP+00000180: 00000000 f7579000 ffca5648 f74e422c
[17:56:11] [debug] ESP+000001a0: 091a53c0 00000000 001b8d30 001bfcbc
[17:56:11] [debug] ESP+000001c0: ffca5670 ffca5620 00000010 00000000
[17:56:11] [debug] ESP+000001e0: 08ff794d 00000088 00000020 f7788000
[17:56:11] [debug] ESP+00000200: 00000000 00000002 9f6b4158 714cca0f
[17:56:11] [debug] ESP+00000220: f7784d67 00000000 08ff02e8 f739c8ae
[17:56:11] [debug] ESP+00000240: 091a53c0 00000001 02110000 f73c4000
[17:56:11] [debug] ESP+00000260: 00000000 08ff02f4 08ff02f8 08ff02f0
[17:56:11] [debug] ESP+00000280: ffca57b0 ffca5680 091a53c0 00000000
[17:56:11] [debug] ESP+000002a0: f7579000 097bf920 ffca5728 00000015
[17:56:11] [debug] ESP+000002c0: 091a6168 f73c4630 ffca5748 f739cfc2
[17:56:11] [debug] ESP+000002e0: 095b0f88 f7579000 f739cf5b f5d73454
[17:56:11] [debug] ESP+00000300: 091a53c0 0000002c ffca579c f609392c
[17:56:11] [debug] ESP+00000320: 0003c59c 001b8d30 001b8d60 001b4d64
[17:56:11] [debug] ESP+00000340: 00000000 091a53c0 00000001 00000810
[17:56:11] [debug] ESP+00000360: 090dfe18 0000006f ffca5898 f739941c
[17:56:11] [debug] ESP+00000380: 00000000 0000006f ffca57f8 f72e4944
[17:56:11] [debug] ESP+000003a0: 00000002 f737d7f0 ffca58c8 f72e4cc4
[17:56:11] [debug] ESP+000003c0: f72e4790 ffca5830 094f4f4c 094f4cd0
[17:56:11] [debug] ESP+000003e0: 00000008 000001e2 00000002 00000001
[17:56:11] [debug] Loaded modules:
[17:56:11] [debug] 00000000 - 00187dc3 samp03svr
[17:56:11] [debug] f7796000 - f7796e26 
[17:56:11] [debug] f7784000 - f7786a04 /lib/i386-linux-gnu/libdl.so.2
[17:56:11] [debug] f7767000 - f77826ef /lib/i386-linux-gnu/libpthread.so.0
[17:56:11] [debug] f75f0000 - f7770b3f /usr/lib32/libstdc++.so.6
[17:56:11] [debug] f759b000 - f75ef010 /lib/i386-linux-gnu/libm.so.6
[17:56:11] [debug] f757e000 - f759a1e4 /lib/i386-linux-gnu/libgcc_s.so.1
[17:56:11] [debug] f73c7000 - f7583b6b /lib/i386-linux-gnu/libc.so.6
[17:56:11] [debug] f7798000 - f77bb7f4 /lib/ld-linux.so.2
[17:56:11] [debug] f7380000 - f73c43ac plugins/crashdetect.so
[17:56:11] [debug] f72ba000 - f737f740 plugins/streamer.so
[17:56:11] [debug] f72b1000 - f72b8714 /lib/i386-linux-gnu/librt.so.1
[17:56:11] [debug] f72a0000 - f72af9b4 plugins/sscanf.so
[17:56:11] [debug] f7266000 - f72772ec /lib/i386-linux-gnu/libnss_files.so.2
This is 8363: from OnVehicleDeath
Код:
			if(PlayerVip[playerid][v1ID] == vehicleid)
	    	{
				new Fuel = Gas[vehicleid], Lock = CarLock[vehicleid];
				DestroyVehicleEx(vehicleid); /////// THIS
				PlayerVip[playerid][v1ID] = CreateVehicle(PlayerVip[playerid][v1Model], PlayerVip[playerid][v1X], PlayerVip[playerid][v1Y], PlayerVip[playerid][v1Z], PlayerVip[playerid][v1A], PlayerVip[playerid][v1Color1], PlayerVip[playerid][v1Color2], -1); ///// OR THIS
				vehicleid = PlayerVip[playerid][v1ID];
				VehicleType[vehicleid] = T_VIP;
				VehicleInfo[vehicleid] = playerid;
				if(PlayerInfo[playerid][pVip] == 3)
				{
					VIPOptions(playerid, VehicleTunninG, 1);
					if(PlayerVip[playerid][v1Neon])
					{
						new Float:Z;
						if(NeonCheck(GetVehicleModel(vehicleid), Z))
						{
							CarNeon[vehicleid] = true;
							FNeon[vehicleid] = CreateDynamicObject(PlayerVip[playerid][v1Neon], 3000.0, 3000.0, 3000.0, 0, 0, 0);
							SNeon[vehicleid] = CreateDynamicObject(PlayerVip[playerid][v1Neon], 3000.0, 3000.0, 3000.0, 0, 0, 0);
							AttachDynamicObjectToVehicle(FNeon[vehicleid], vehicleid, -0.8, 0.0, Z, 0.0, 0.0, 0.0);
							AttachDynamicObjectToVehicle(SNeon[vehicleid], vehicleid, 0.8, 0.0, Z, 0.0, 0.0, 0.0);
						}
					}
					Update3DTextLabelText(LicenseID[vehicleid], COLOR_VIPLEVEL3, PlayerVip[playerid][v1License]);
				}
			    else if(PlayerInfo[playerid][pVip] == 2)
			    {
					VIPOptions(playerid, VehicleTunninG, 1);
					Update3DTextLabelText(LicenseID[vehicleid], COLOR_VIPLEVEL2, PlayerVip[playerid][v1License]);
				}
				else if(PlayerInfo[playerid][pVip] == 1)
				{
					Update3DTextLabelText(LicenseID[vehicleid], COLOR_VIPLEVEL1, PlayerVip[playerid][v1License]);
				}
				Attach3DTextLabelToVehicle(LicenseID[vehicleid], vehicleid, 0.0, 0.0, 1.0);
				SetVehicleParamsForAll(vehicleid, Lock);
				Gas[vehicleid] = Fuel;
			}
AND THIS IS 24623:
Код:
public DestroyVehicleEx(vehicleid)
{
    Update3DTextLabelText(LicenseID[vehicleid], COLOR_PD, " ");
    VehicleType[vehicleid] = T_Normal;
	CarBomb[vehicleid] = false;
	CarLock[vehicleid] = false;
	VehicleInfo[vehicleid] = 999;
	Gas[vehicleid] = 100;
	if(CarNeon[vehicleid])
	{
	    if(IsValidDynamicObject(FNeon[vehicleid])) DestroyDynamicObject(FNeon[vehicleid]);
		if(IsValidDynamicObject(SNeon[vehicleid])) DestroyDynamicObject(SNeon[vehicleid]);
		FNeon[vehicleid] = 0;
		SNeon[vehicleid] = 0;
		CarNeon[vehicleid] = false;
	}
	DestroyVehicle(vehicleid);
	return 1;
}
Reply
#2

UPPP
Reply
#3

Send us your DestroyVehicleEx function. Also~
Код:
DestroyVehicleEx(vehicleid); /////// THIS
You should check if the vehicle is valid before deleting it - incase the function doesn't already do that.
Reply
#4

Quote:
Originally Posted by Infin1ty
Посмотреть сообщение
Send us your DestroyVehicleEx function. Also~
Код:
DestroyVehicleEx(vehicleid); /////// THIS
You should check if the vehicle is valid before deleting it - incase the function doesn't already do that.

THIS IS:
Код:
public DestroyVehicleEx(vehicleid)
{
    Update3DTextLabelText(LicenseID[vehicleid], COLOR_PD, " ");
    VehicleType[vehicleid] = T_Normal;
	CarBomb[vehicleid] = false;
	CarLock[vehicleid] = false;
	VehicleInfo[vehicleid] = 999;
	Gas[vehicleid] = 100;
	if(CarNeon[vehicleid])
	{
	        if(IsValidDynamicObject(FNeon[vehicleid])) DestroyDynamicObject(FNeon[vehicleid]);
		if(IsValidDynamicObject(SNeon[vehicleid])) DestroyDynamicObject(SNeon[vehicleid]);
	   	DestroyDynamicObject(FNeon[vehicleid]);
		DestroyDynamicObject(SNeon[vehicleid]);
		FNeon[vehicleid] = 0;
		SNeon[vehicleid] = 0;
		CarNeon[vehicleid] = false;
	}
	DestroyVehicle(vehicleid);
	return 1;
}
Reply
#5

UPPPPPPPPPPPPPPPPPPP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)