Hi all, and thanks in advance for the welcoming and any answer you will provide,
I built the Metin2 server starting by the sources, with minor modifications, and none of them seem to me correlated to this crash.
What i'm getting is a random segmentation fault in various calls to the BUFFER class, which provides a variable length byte array buffer.
Here is some gdb tracebacks i get from it:
#0 buffer_write_peek (buffer=0x3c0f4580) at buffer.c:163
#1 0x08078734 in CHARACTER::PointChange (this=0x11, type=9 't', amount=0,
bAmount=false, bBroadcast=false) at char.cpp:3666
#2 0x08079a3a in CHARACTER::StartStaminaConsume (this=0x466d6000)
at char.cpp:5845
#3 0x080c95a3 in CHARACTER::StateMove (this=0x466d6000) at char_state.cpp:816
#4 0x080b13f4 in std::for_each<__gnu_cxx::__normal_iterator<CHARACTER**, std::vector<CHARACTER*, std::allocator<CHARACTER*> > >, std::binder2nd<std::mem_fun1_t<void, CHARACTER, unsigned int> > > (__first={_M_current = 0x2ad89178}, __last=
{_M_current = 0x2ad89180}, __f=
{<std::unary_function<CHARACTER*,void>> = {<No data fields>}, op = {<std::binary_function<CHARACTER*,unsigned int,void>> = {<No data fields>}, _M_f = {__pfn = 0x806bdd0 <CHARACTER::UpdateCharacter(unsigned int)>, __delta = 0}}, value = 2539973}) at stl_function.h:656
#5 0x080b1112 in CHARACTER_MANAGER::Update (this=0xffffb6dc, iPulse=2539973)
at char_manager.cpp:677
#6 0x0825dca8 in idle () at main.cpp:943
#7 0x0825f366 in main (argc=1, argv=0xffffcce4) at main.cpp:609
Here is some more info:
(gdb) frame 0
#0 buffer_write_peek (buffer=0x3c0f4580) at buffer.c:163
163 in buffer.c
(gdb) print *buffer
$1 = {next = 0x8371710, write_point = 0x3c0f461c "b2277b(F017<",
write_point_pos = 137828216, read_point = 0x3c0f4594 "020▒7b", length = 0,
mem_data = 0x837e710 "", mem_size = 0, flag = 0}
Can you help me? Any idea on how to fix this?