Problem with crash - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with crash (
/showthread.php?tid=648007)
Problem with crash -
Suttix - 14.01.2018
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.
Re: Problem with crash -
Runn3R - 14.01.2018
Probably a vehicle with an invalid mod. Post the opcodes here it will help you solve the issue.
Re: Problem with crash -
Suttix - 14.01.2018
It's a script of 100k lines i just can't paste it here

anyway,you're right.Vehicle mod parts maybe causes the crash but how can I find that?
Re: Problem with crash -
aoky - 14.01.2018
Hey, try using the Crash Detect plugin.
https://sampforum.blast.hk/showthread.php?tid=262796
Re: Problem with crash -
Runn3R - 14.01.2018
Quote:
Originally Posted by Suttix
It's a script of 100k lines i just can't paste it here  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.
Re: Problem with crash -
aoky - 14.01.2018
Quote:
Originally Posted by Runn3R
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?
Re: Problem with crash -
Suttix - 14.01.2018
I'm getting Exception 0xC0000005 at 0x007F0BF7
Re: Problem with crash -
Runn3R - 14.01.2018
https://sampforum.blast.hk/showthread.php?tid=202904
Quote:
Originally Posted by Kalcor
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.
|
Re: Problem with crash -
Suttix - 14.01.2018
I don't have any codes at OnPlayerMod,there's just a retur 1; :P What should I put there to fix this issue?
Re: Problem with crash -
Mikro - 14.01.2018
You should probably log the parameters from the function and the vehicle model. Something like:
Code:
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.