SA-MP Forums Archive
Segmentation Faults - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Segmentation Faults (/showthread.php?tid=260268)



Segmentation Faults - Ash. - 08.06.2011

Good Morning,

I'm just wondering what is likely to cause segmentation faults. My server (TruckingWorld) is beginning to crash (not regularly - but enough to get annoying) due to this Segfaults. I'm going to start optimizing the script anyway tonight,
however i'm wondering what could cause segmentation faults, as if I know I can look for a way to avoid/fix them.

I'm off to school now; but i'll keep checking back on my phone and so replies at any time are helpful

(Just as a thought, could this be related to the topic I posted in Bug Reports / Client Support (I can't remember which one))

Thanks,
Ash.


Re: Segmentation Faults - Ash. - 08.06.2011

Sorry about the bump but i've just had a thought: shall I try merging my filterscripts with my game mode? I split housing, vehicles and shop/business systems seperate for ease. Do you think merging them would help? I guess it's worth a try?


Re: Segmentation Faults - Steven82 - 08.06.2011

Currently look at all the filterscripts and see if any coding could possibly crash the server. I mean i guess you could try to merge the filterscripts and see what happens. By the way, does the server just crash randomly? Or when something is called? Like buying a house or selling a house or using a command, etc.


Re: Segmentation Faults - Ash. - 08.06.2011

It is normally random. However if something were to happen just before it, it would be something like calling a command (ie, /afk used to crash the server for no apparent reason, but not all the time - it stopped since I re-wrote it)


Re: Segmentation Faults - Calgon - 08.06.2011

Get GDB and backtrace the crash info. Follow this (or another tutorial) for help.


Re: Segmentation Faults - Ash. - 08.06.2011

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Get GDB and backtrace the crash info. Follow this (or another tutorial) for help.
If it still happens after i've merged and optimized the main script, i'll try this. Otherwise i'll just pass it off as an infinite loop or something.