SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/01/2018, 11:46 AM   #1
Suttix
Big Clucker
 
Join Date: Jul 2017
Posts: 63
Reputation: 3
Default Problem with crash

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.
Suttix is offline   Reply With Quote
Old 14/01/2018, 12:01 PM   #2
Runn3R
Huge Clucker
 
Runn3R's Avatar
 
Join Date: Dec 2013
Location: Croatia, Split
Posts: 420
Reputation: 36
Default Re: Problem with crash

Probably a vehicle with an invalid mod. Post the opcodes here it will help you solve the issue.
Runn3R is offline   Reply With Quote
Old 14/01/2018, 12:07 PM   #3
Suttix
Big Clucker
 
Join Date: Jul 2017
Posts: 63
Reputation: 3
Default Re: Problem with crash

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?
Suttix is offline   Reply With Quote
Old 14/01/2018, 12:15 PM   #4
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: Problem with crash

Hey, try using the Crash Detect plugin.

http://forum.sa-mp.com/showthread.php?t=262796
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 14/01/2018, 12:17 PM   #5
Runn3R
Huge Clucker
 
Runn3R's Avatar
 
Join Date: Dec 2013
Location: Croatia, Split
Posts: 420
Reputation: 36
Default Re: Problem with crash

Quote:
Originally Posted by Suttix View Post
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.
Runn3R is offline   Reply With Quote
Old 14/01/2018, 12:30 PM   #6
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Ireland
Posts: 493
Reputation: 136
Default Re: Problem with crash

Quote:
Originally Posted by Runn3R View Post
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?
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 14/01/2018, 12:47 PM   #7
Suttix
Big Clucker
 
Join Date: Jul 2017
Posts: 63
Reputation: 3
Default Re: Problem with crash

I'm getting Exception 0xC0000005 at 0x007F0BF7
Suttix is offline   Reply With Quote
Old 14/01/2018, 02:46 PM   #8
Runn3R
Huge Clucker
 
Runn3R's Avatar
 
Join Date: Dec 2013
Location: Croatia, Split
Posts: 420
Reputation: 36
Default Re: Problem with crash

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

Quote:
Originally Posted by Kalcor View Post
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.
Runn3R is offline   Reply With Quote
Old 14/01/2018, 03:50 PM   #9
Suttix
Big Clucker
 
Join Date: Jul 2017
Posts: 63
Reputation: 3
Default Re: Problem with crash

I don't have any codes at OnPlayerMod,there's just a retur 1; :P What should I put there to fix this issue?
Suttix is offline   Reply With Quote
Old 14/01/2018, 06:16 PM   #10
Mikro
Little Clucker
 
Join Date: Sep 2017
Location: Netherlands
Posts: 14
Reputation: 4
Default Re: Problem with crash

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.
Mikro is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crash problem fix speed258 Scripting Help 2 11/03/2012 01:47 PM
Crash Problem TheLoolyWiz Client Support 0 17/09/2011 05:27 PM
Crash problem kiss Help Archive 3 06/12/2010 05:54 PM
Crash Problem Fireboy802 Client Support 1 10/03/2010 07:03 AM
SA-MP Crash problem. Jamal_Terell Client Support 3 12/04/2009 10:44 PM


All times are GMT. The time now is 06:06 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.