Jump to content

Adrian1997

Inactive Member
  • Posts

    19
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Adrian1997

  1. 1 hour ago, martysama0134 said:

    It crashed when calling the new operator, which means it failed to allocate more memory over a 4gb of process (the limit of 32bit apps).

    Metin2 processes take 4gb of ram only when they have memory leaks.

    Most of the times, the memory leak comes from fetched mysql queries that didn't get freed.

    Thank you. Can I find out where this memory leak is from? My knowledge is quite small...

  2. I have a problem sometimes with my server, the channel 1 crash.

    I debugged the game.core and this is the results:

     

    With gdb:

    bt

    Core was generated by `./core_1'.
    Program terminated with signal SIGABRT, Aborted.
    #0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
    [Current thread is 1 (LWP 100495)]
    (gdb) bt
    #0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
    #1  0x28cf0b3b in raise () from /usr/lib32/libc.so.7
    #2  0x28cf0a9f in abort () from /usr/lib32/libc.so.7
    #3  0x2864ef75 in __gnu_cxx::__verbose_terminate_handler ()
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/vterminate.cc:95
    #4  0x2864bc15 in __cxxabiv1::__terminate (
        handler=0x2864ede0 <__gnu_cxx::__verbose_terminate_handler()>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:47
    #5  0x2864bcac in std::terminate ()
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:57
    #6  0x2864bf07 in __cxxabiv1::__cxa_throw (obj=0x299c8860,
        tinfo=0x286e1c00 <typeinfo for std::bad_alloc>,
        dest=0x286499c0 <std::bad_alloc::~bad_alloc()>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_throw.cc:84
    #7  0x2864d4d2 in operator new (sz=<optimized out>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/new_op.cc:54
    #8  0x080dda31 in CHARACTER_MANAGER::CreateCharacter (this=0xffffc5cc,
        name=0xf9eb611d "Salbatic devotat", dwPID=0) at char_manager.cpp:84
    #9  0x080de056 in CHARACTER_MANAGER::SpawnMob (this=0xffffc5cc, dwVnum=502,
        lMapIndex=43, x=857352, y=269470, z=0, bSpawnMotion=true, iRot=-1,
        bShow=true) at char_manager.cpp:415
    #10 0x080de6c6 in CHARACTER_MANAGER::SpawnMobRange (this=0xffffc5cc,
        dwVnum=502, lMapIndex=43, sx=855616, sy=268838, ex=857616, ey=270838,
    --Type <RET> for more, q to quit, c to continue without paging--
        eption=true, bSpawnMotion=true, bAggressive=false)
        at char_manager.cpp:466
    #11 0x080de89a in CHARACTER_MANAGER::SpawnGroup (this=0xffffc5cc, dwVnum=502,
        lMapIndex=43, sx=855616, sy=268838, ex=857616, ey=270838, pkRegen=0x0,
        bAggressive_=false, pDungeon=0x0) at char_manager.cpp:596
    #12 0x080f871d in CHARACTER::__StateIdle_Stone (this=0xe5e0f800)
        at char_state.cpp:413
    #13 0x0808e698 in CHARACTER::UpdateStateMachine (this=0xe5e0f800,
        dwPulse=15766990) at char.cpp:5017
    #14 0x080e03c4 in std::mem_fun1_t<void, CHARACTER, unsigned int>::operator() (
        __x=<optimized out>, __p=<optimized out>, this=<optimized out>)
        at /usr/include/c++/4.2/bits/stl_function.h:656
    #15 std::binder2nd<std::mem_fun1_t<void, CHARACTER, unsigned int> >::operator()
        (__x=<optimized out>, this=<optimized out>)
        at /usr/include/c++/4.2/bits/stl_function.h:446
    #16 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=..., __last=..., __f=...)
        at /usr/include/c++/4.2/bits/stl_algo.h:159
    #17 0x080dfe21 in CHARACTER_MANAGER::Update (this=0xffffc5cc, iPulse=15766990)
        at char_manager.cpp:695
    #18 0x082acc38 in idle () at main.cpp:962
    #19 0x082ae326 in main (argc=1, argv=0xffffdbc8) at main.cpp:628

     

    bt full

    #0  0x28cf0b5f in thr_kill () from /usr/lib32/libc.so.7
    No symbol table info available.
    #1  0x28cf0b3b in raise () from /usr/lib32/libc.so.7
    No symbol table info available.
    #2  0x28cf0a9f in abort () from /usr/lib32/libc.so.7
    No symbol table info available.
    #3  0x2864ef75 in __gnu_cxx::__verbose_terminate_handler ()
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/vterminate.cc:95
            terminating = true
            t = <optimized out>
    #4  0x2864bc15 in __cxxabiv1::__terminate (
        handler=0x2864ede0 <__gnu_cxx::__verbose_terminate_handler()>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:47
    No locals.
    #5  0x2864bcac in std::terminate ()
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_terminate.cc:57
    No locals.
    #6  0x2864bf07 in __cxxabiv1::__cxa_throw (obj=0x299c8860,
        tinfo=0x286e1c00 <typeinfo for std::bad_alloc>,
        dest=0x286499c0 <std::bad_alloc::~bad_alloc()>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/eh_throw.cc:84
            header = <optimized out>
    #7  0x2864d4d2 in operator new (sz=<optimized out>)
        at ../../.././../gcc-4.9-20130505/libstdc++-v3/libsupc++/new_op.cc:54
            handler = <optimized out>
            p = 0x0
    #8  0x080dda31 in CHARACTER_MANAGER::CreateCharacter (this=0xffffc5cc,
        name=0xf9eb611d "Salbatic devotat", dwPID=0) at char_manager.cpp:84
            dwVID = <optimized out>
            ch = <optimized out>

    Now I know that is from mob 502, but I don't know what problem...I looked to regen and mob_proto and looks fine....

    Thanks in advanced.

     

  3. 35 minutes ago, Alpha said:

    Or you use the official code like this in CPythonNetworkStream::RecvChatPacket():

     

    
    		else if (CHAT_TYPE_MISSION == kChat.type)
    		{
    			if(uChatSize)
    				PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetMissionMessage", Py_BuildValue("(s)", buf));
    			else
    				PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_CleanMissionMessage", Py_BuildValue("()"));
    
    		}
    		else if (CHAT_TYPE_SUB_MISSION == kChat.type)
    		{
    			PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetSubMissionMessage", Py_BuildValue("(s)", buf));
    		}

    Instead of the PythonNetworkStreamCommand  Part

    I tried to replace in chat_type_notice your version but the message remain on screen forever...not disappear

     

    On vegas version if i put cleanmission it's not work, if I deteled it, it's works but the same problem, message remain forever, not disapper alone

  4. char.cpp search for:

     

        if (m_bCharType == CHAR_TYPE_HORSE ||
                GetRaceNum() == 20101 ||
                GetRaceNum() == 20102 ||
                GetRaceNum() == 20103 ||
                GetRaceNum() == 20104 ||
                GetRaceNum() == 20105 ||
                GetRaceNum() == 20106 ||
                GetRaceNum() == 20107 ||
                GetRaceNum() == 20108 ||
                GetRaceNum() == 20109
          )

     

  5. UserInterface/PythonNetworkStreamModule.cpp

     

    Search: 

    #include "AbstractPlayer.h"
    

    add after

    #ifdef ENABLE_FIX_D_YMIR_WORK
    #include <windows.h>
    #include <string>
    bool WrongPathYmir(const std::string& dirName_in)
    {
    	DWORD type = GetFileAttributesA(dirName_in.c_str());
    
    	if (type == INVALID_FILE_ATTRIBUTES)
    		return false;
    
    	if (type & FILE_ATTRIBUTE_DIRECTORY)
    		return true;
    
    	return false;
    }
    #endif

    search:

    PyObject* netSetLoginInfo(PyObject* poSelf, PyObject* poArgs)
    {

    before  char* szName; add:

    #ifdef ENABLE_FIX_D_YMIR_WORK
    	std::string moduleFake = "**D:\\ymir work\\**";
    	if (WrongPathYmir(std::string("D") + std::string(":\\") + std::string("ymir") + std::string(" work\\")))
    	{
    		TraceError("D:\\ymir work folder detected.");
    		::Sleep(500);
    		exit(0);
    	}
    #endif

     

    It's not made by me

    This checks the folder when you login in game.

     

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.