PDA

View Full Version : Problem with crash


Suttix
14/01/2018, 11:46 AM
Hi.On my gamemode all players got crash exception on some places.I searched and I think the problem is with an invalid object id but I don't know how to find it...It's not always the same place,after server restart place of exception changes...Can someone help me?Is there any plugin that tests is an object invalid.
Thanks.

Runn3R
14/01/2018, 12:01 PM
Probably a vehicle with an invalid mod. Post the opcodes here it will help you solve the issue.

Suttix
14/01/2018, 12:07 PM
It's a script of 100k lines i just can't paste it here :D anyway,you're right.Vehicle mod parts maybe causes the crash but how can I find that?

aoky
14/01/2018, 12:15 PM
Hey, try using the Crash Detect plugin.

http://forum.sa-mp.com/showthread.php?t=262796

Runn3R
14/01/2018, 12:17 PM
It's a script of 100k lines i just can't paste it here :D anyway,you're right.Vehicle mod parts maybe causes the crash but how can I find that?

Well if the players are crashing they are receiving some opcodes in their chat.

aoky
14/01/2018, 12:30 PM
Well if the players are crashing they are receiving some opcodes in their chat.

Oh my mistake, I read the post wrong. Surely it must be some sort of an invalid modification?

Suttix
14/01/2018, 12:47 PM
I'm getting Exception 0xC0000005 at 0x007F0BF7

Runn3R
14/01/2018, 02:46 PM
http://forum.sa-mp.com/showthread.php?t=202904

The problem is with modded cars ie AddVehicleComponent. I can't determine exactly what mod although it's likely the server's script is adding car components to a vehicle that doesn't accept that component type. I suggest you log the OnVehicleMod callback and try to figure out what's going on.

Suttix
14/01/2018, 03:50 PM
I don't have any codes at OnPlayerMod,there's just a retur 1; :P What should I put there to fix this issue?

Mikro
14/01/2018, 06:16 PM
You should probably log the parameters from the function and the vehicle model. Something like:


public OnVehicleMod(playerid, vehicleid, componentid)
{
printf("Player: %i, Vehicle: %i, Model: %i, Component: %i", playerid, vehicleid, GetVehicleModel(vehicleid), componentid);
return 1;
}


And than see if some wrong components are added to a model which does not support it.

Suttix
14/01/2018, 10:50 PM
Is there any script or something that will tell me when mod part is invalid?

Renan157
15/01/2018, 12:15 AM
Public OnVehicleMod (playerid, vehicleid, componentid)
{
printf ("Player:% i, Vehicle:% i, Model:% i, Componente:% i", playerid, vehicleid, GetVehicleModel (vehicleid), componentid);
retornar 1;
}
E para ver se alguns componentes incorretos são adicionados a um modelo que não o supor