• 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!

Linux Segmentation fault crash

creativess

New Member
Joined
Jan 30, 2009
Messages
24
Reaction score
1
Hi

When i delete all npc spawn it works, and when i delete half of monster spawn it will work otherwise i get crash where on other machine it was working very good.

it might be something with int32?

gdb log

Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5b77700 (LWP 9188)]
NpcScript::luaSelfGetPos (L=0x7ffff0351e90) at npc.cpp:697
697         Position pos = mynpc->pos;
(gdb) where
#0  NpcScript::luaSelfGetPos (L=0x7ffff0351e90) at npc.cpp:697
#1  0x00007ffff6fa4d75 in luaD_precall () from /usr/lib/liblua50.so.5.0
#2  0x00007ffff6faed7a in luaV_execute () from /usr/lib/liblua50.so.5.0
#3  0x00007ffff6fa5370 in luaD_call () from /usr/lib/liblua50.so.5.0
#4  0x00007ffff6fa4847 in luaD_rawrunprotected () from /usr/lib/liblua50.so.5.0
#5  0x00007ffff6fa55d2 in luaD_pcall () from /usr/lib/liblua50.so.5.0
#6  0x00007ffff6fa1b8c in lua_pcall () from /usr/lib/liblua50.so.5.0
#7  0x0000000000490ac0 in NpcScript::onThink (this=0x7ffff03463b0)
    at npc.cpp:401
#8  0x0000000000490735 in Npc::onThink (this=<optimized out>,
    newThinkTicks=@0x7ffff5b76cec: 0) at npc.cpp:308
#9  0x000000000044e514 in Game::checkCreature (this=0x703400, id=805317100)
    at game.cpp:4977
#10 0x0000000000453619 in operator() (__x=<optimized out>,
    __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/4.7/bits/stl_function.h:633
#11 operator() (__x=<synthetic pointer>, this=<optimized out>)
    at /usr/include/c++/4.7/backward/binders.h:161
#12 boost::detail::function::void_function_obj_invoker1<std::binder2nd<std::mem_fun1_t<void, Game, unsigned int> >, void, Game*>::invoke (
    function_obj_ptr=..., a0=<optimized out>)
    at /usr/include/boost/function/function_template.hpp:153
#13 0x00000000004b7c37 in operator() (a0=<optimized out>, this=<optimized out>)
 
This was common issue with rl map datapacks, make sure you have enough power to run realmap datapack.
 
Hi

When i delete all npc spawn it works, and when i delete half of monster spawn it will work otherwise i get crash where on other machine it was working very good.

it might be something with int32?

gdb log

Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5b77700 (LWP 9188)]
NpcScript::luaSelfGetPos (L=0x7ffff0351e90) at npc.cpp:697
697         Position pos = mynpc->pos;
(gdb) where
#0  NpcScript::luaSelfGetPos (L=0x7ffff0351e90) at npc.cpp:697
#1  0x00007ffff6fa4d75 in luaD_precall () from /usr/lib/liblua50.so.5.0
#2  0x00007ffff6faed7a in luaV_execute () from /usr/lib/liblua50.so.5.0
#3  0x00007ffff6fa5370 in luaD_call () from /usr/lib/liblua50.so.5.0
#4  0x00007ffff6fa4847 in luaD_rawrunprotected () from /usr/lib/liblua50.so.5.0
#5  0x00007ffff6fa55d2 in luaD_pcall () from /usr/lib/liblua50.so.5.0
#6  0x00007ffff6fa1b8c in lua_pcall () from /usr/lib/liblua50.so.5.0
#7  0x0000000000490ac0 in NpcScript::onThink (this=0x7ffff03463b0)
    at npc.cpp:401
#8  0x0000000000490735 in Npc::onThink (this=<optimized out>,
    newThinkTicks=@0x7ffff5b76cec: 0) at npc.cpp:308
#9  0x000000000044e514 in Game::checkCreature (this=0x703400, id=805317100)
    at game.cpp:4977
#10 0x0000000000453619 in operator() (__x=<optimized out>,
    __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/4.7/bits/stl_function.h:633
#11 operator() (__x=<synthetic pointer>, this=<optimized out>)
    at /usr/include/c++/4.7/backward/binders.h:161
#12 boost::detail::function::void_function_obj_invoker1<std::binder2nd<std::mem_fun1_t<void, Game, unsigned int> >, void, Game*>::invoke (
    function_obj_ptr=..., a0=<optimized out>)
    at /usr/include/boost/function/function_template.hpp:153
#13 0x00000000004b7c37 in operator() (a0=<optimized out>, this=<optimized out>)

Hello there @creativess,

As I read "NpcScript::luaSelfGetPos (L=0x7ffff0351e90) at npc.cpp:697" it can only come to my mind that you defined a position (x,y,z) out of the function onThink, which leads the server to a segmentation fault.

For example, the NPC Markwin in Mintwallin or the NPC The Orc King in Orc Fortress, which spawn monsters around themselves once you talk to them for the first time, if you defined the position without any specific coordinate outside the onThink function it will lead to a segmentation fault. Either define the position inside the funciton or specify a coordinate in numbers other than basing yourself on the NPC's position. The server crashes because the npc hasn't spawned and you called a position that requires the NPC to be there first.

If you don't know which NPC is causing this issue: Run your server with GDB, change to the thread the issue happened and use the function getName() to find out the NPC name.

On need for further help you can come to the OTLand Discord and I'll help you once I have time.

Kindest Regards,
Okke
 
Last edited:
Thanks everyone guys for helping me well, you might be right but the think is on a VPS machine everything was working fine when we bought deditaced server it doesnt, well what i think is, this project aint a rl map it's a custom made ots and was first started 5 years ago, now after 5 years everythink change, we was hosting it on a machine with 8gigs of ram, back in the days today we got 16gigs that might be the issue cause everywhere at npc.cc i got int32 instead of int64.

For exacmple when i delete everything in world/npc.xml then server is running fine, but if i leave the npc untouched and delete half of the spawn from /world/map-spawn.xml then it also working. So i do not know it's npc issue, i will join the discrod for sure later this day.
 
As I told you, it's a new npc you've implemented with the spawn file, to find the name of the npc just use GDB, change to the thread the segmentation fault happened and use "getName()".
 
How's that the issue i check all the npcs before i even get here what's wierd is the same package works on a 2gigs VPS with no problem. I think 16 gigs on my dedicated server has to be the issue, cause i run Custom Yourots SQL i can paste some code here if you want.
 
Tried it, didnt help. I dont get it why on shit machine it's working without problem, on a dedicaten it doesnt :/ Maybe i should try reinstall it to 32bits?
 

Similar threads

Back
Top