• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Linux Segmentation Fault

Ragimus_Maximus

New Member
Joined
Jun 18, 2011
Messages
62
Reaction score
0
Basically after like 5minutes of running my server crashes because of "Segmentation Fault" but how do I track what the error is? I've seen people say it's because of potions.lua, it's becase of NPCs or it's because of some other shiet. What shall I do? Using debian.
 
this is what happened when a char died for example
Code:
[16:27:35.141] request output message - auto = 1
[16:27:35.141] MYSQL DEBUG, query: BEGIN
[16:27:35.142] MYSQL DEBUG, query: INSERT INTO `player_deaths` (`player_id`, `date`, `level`) VALUES (23, 1328974055, 13)
[16:27:35.142] MYSQL DEBUG, query: INSERT INTO `killers` (`death_id`, `final_hit`, `unjustified`) VALUES (12, 1, 0)
[16:27:35.142] MYSQL DEBUG, query: INSERT INTO `environment_killers` (`kill_id`, `name`) VALUES (14, 'a medusa')
[16:27:35.170] onCreatureLeave - Gefa
[16:27:35.170] Player: Gefa not found in the targetList.
[16:27:35.170] MYSQL DEBUG, query: UPDATE `players` SET `online` = 0 WHERE `id` = 23 LIMIT 1;
[16:27:35.181] Gefa has logged out.
[16:27:35.181] MYSQL DEBUG, storeQuery: SELECT `save` FROM `players` WHERE `id` = 23 LIMIT 1
[16:27:35.181] MYSQL DEBUG, query: BEGIN
[16:27:35.181] MYSQL DEBUG, storeQuery: SELECT `id` FROM `guild_ranks` WHERE `guild_id` = 0 AND `level` = 0 LIMIT 1
[16:27:35.182] MYSQL DEBUG, query: UPDATE `players` SET `lastlogin` = 1328974037, `lastip` = 2717700639, `level` = 13, `group_id` = 1, `health` = 260, `healthmax` = 260, `experience` = 24313, `lookbody` = 44, `lookfeet` = 44, `lookhead` = 44, `looklegs` = 44, `looktype` = 136, `lookaddons` = 0, `maglevel` = 0, `mana` = 60, `manamax` = 60, `manaspent` = 0, `soul` = 0, `town_id` = 1, `posx` = 1031, `posy` = 999, `posz` = 7, `cap` = 595, `sex` = 0, `balance` = 0, `stamina` = 151200000, `skull` = 0, `skulltime` = 0, `promotion` = 0, `conditions` = '', `loss_experience` = 70, `loss_mana` = 0, `loss_skills` = 0, `loss_containers` = 100, `loss_items` = 0, `lastlogout` = 0, `blessings` = 0, `marriage` = 0, `guildnick` = '', `rank_id` = 0, `vocation` = 4 WHERE `id` = 23 LIMIT 1;
[16:27:35.183] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 10, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 0 LIMIT 1;
[16:27:35.183] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 10, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 1 LIMIT 1;
[16:27:35.183] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 21, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 2 LIMIT 1;
[16:27:35.183] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 10, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 3 LIMIT 1;
[16:27:35.184] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 10, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 4 LIMIT 1;
[16:27:35.184] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 21, `count` = 70 WHERE `player_id` = 23 AND `skillid` = 5 LIMIT 1;
[16:27:35.184] MYSQL DEBUG, query: UPDATE `player_skills` SET `value` = 10, `count` = 0 WHERE `player_id` = 23 AND `skillid` = 6 LIMIT 1;
[16:27:35.184] MYSQL DEBUG, query: DELETE FROM `player_spells` WHERE `player_id` = 23
[16:27:35.185] MYSQL DEBUG, query: DELETE FROM `player_items` WHERE `player_id` = 23
[16:27:35.185] MYSQL DEBUG, query: INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES (23, 1, 101, 2481, 1, ''),(23, 2, 102, 2200, 67, '▒\0\0chargesC\0\0\0'),(23, 3, 103, 1988, 1, ''),(23, 4, 104, 2465, 1, ''),(23, 5, 105, 2509, 1, ''),(23, 6, 106, 8602, 1, ''),(23, 7, 107, 2478, 1, ''),(23, 8, 108, 2643, 1, ''),(23, 10, 109, 6103, 1, '▒\0\0date\0▒6O\0text▒\0\0\0Welcome Gefa.\n\nOur community would like to welcome you to Swedera. If you need help with anything, please refer to the help channel.\n\nEnjoy your time!\0writer
\0\0\0Server Staff'),(23, 103, 110, 2160, 1, ''),(23, 103, 111, 2789, 8, '),(23, 103, 112, 7618, 3, ''),(23, 103, 113, 2439, 1, ''),(23, 103, 114, 8601, 1, '')
[16:27:35.186] MYSQL DEBUG, query: DELETE FROM `player_depotitems` WHERE `player_id` = 23
[16:27:35.187] MYSQL DEBUG, query: DELETE FROM `player_storage` WHERE `player_id` = 23
[16:27:35.187] MYSQL DEBUG, query: INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (23, 10000, '10')
[16:27:35.187] MYSQL DEBUG, query: DELETE FROM `guild_invites` WHERE player_id = 23
[16:27:35.187] MYSQL DEBUG, query: DELETE FROM `account_viplist` WHERE `account_id` = 7897173 AND `world_id` = 0
[16:27:35.236] Attacked creature disappeared.

when i ran it with debug mode also there was alot of mysql errors at the start, what's wrong ? I tried to make a new database and i still had shitloads of errors.
 
When did this start happening? Have you added anything recently and what TFS version (revision) are you using?
 
Basically after like 5minutes of running my server crashes because of "Segmentation Fault" but how do I track what the error is? I've seen people say it's because of potions.lua, it's becase of NPCs or it's because of some other shiet. What shall I do? Using debian.

I also have : Segmentation fault
and the server crashes.
But I do not have any other text showing up in the console :S
 
Swordman^ you have to compile it with -debug or something, I fixed it thanks to Fallen. It was a teleport that was teleporting nowhere, but if you got segmentation fault just run a debug version and once the crash comes, look at what it says and you should be able to figure out whats wrong.
 
get core dump, don't forget ulimit -c unlimited before starting server

enabling debug is not needed, tfs already has required flag (-g) in linux makefile
 
Back
Top