Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


ds_aim last won the day on July 24 2016

ds_aim had the most liked content!

Community Reputation

189 Rampage


About ds_aim

  • Rank
  • Birthday 09/04/1994

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3,647 profile views
  1. Banned for multiple rule violations.

    You are not allowed to create any other account on this site!

  2. ds_aim

    Binary ERROR

    // Ira.h class Ira { public: void Func(); // Declaration }; // Ira.cpp //definition void Ira::Func() { // Do something } In your case, the definition cannot be found. The issue could be that you are including a header file, which brings in some function declarations, but you either: 1. definition for those functions cannot be found 2. The library is compiled with an older or newer compiler. And as i can see problem is in __imp__ wich is in the dllexport and dllimport Solve : - Take granny2.lib from another source Who is compiled with same compier. - Problem can be in you project toolset too. As far as i know don't matter if dynamic libs is compiled with different compiler but give it a try. Just static libs need to be compiled with same compilet that is linked. Check you project toolset Check check granny2.lib
  3. ds_aim

    Discussion thread about vanilla core

    boost::python implement started I need to adapt to make_unique now And example for Who want to rewrite entire python API , you can use SWIG too. The big job is in ScriptLib and EterPythonLib need to be rewrited frm scratch. And remebere " If you become my customers all those features will be yours when i finish "
  4. ds_aim

    Discussion thread about vanilla core

    I modernized code long time ago. I lost some time to modernize EterPythonLib because pointers... Evey time when i forced unique__ptr i got bugs. It is very hard to modernize codes. most of the new stuff in the new official stuff is actually with vectors and std maps. In 2-3 weeks i think i will finish client source modernize. Then is planned to rewrite Python API with boost::python or maybe SWIG. Maybe if someone want to rewrite via boost::python here is an advice , boost::python actually does Support std::shared_ptr but not std::unique_ptr , Boost.Python does not support move-semantics. to only Problem is that you use unique_ptr and here is a solution for that http://stackoverflow.com/questions/20581679/boost-python-how-to-expose-stdunique-ptr We tried just putting unique ptr (forcing unique_ptr) , and I think there occur dangling pointer ,I can just putting shared ptr in all place it is bad too, but I might work.. or not. The code is dirtty and pointers are too puzzled and If you use sharedptr everywhere you actually have cyclic references. If you reaally want to modernize codes is better to rewrite entire client source using modern c++ standards. Modernize take much more time than rewriting. Metin is not really a complex game , it's very simple One more example c++14 lambda Before modernize: After modenrize : I changed into lambda holy lambda it is one of most greatest feature of c++11 My advice is don't try to modernize codes you just lose time. Code is to dirty
  5. ds_aim


    You use one of my old, very old source. :)) Ahh .. You can delete it. is very unstable.
  6.  10 minutes ago my skype account was hacked. I managed to block it must send some evidence to skype to unlock it and change the password
    My paypal account ws hacked too but i managed to unlock it, so do not try to contact me on Skype i wil not answer.  I come back in a few days , if i can't unlock my Skype account i make a new one.

  7. ds_aim

    [CLIENT] Teleportation memory leak

    I just wanted to show you the corecr way for the leak. Just be careffuly and you will find it. You should learn about std::insert and about std::map . Let's take this as example : else { CMappedFile file; LPCVOID c_pvData; if(!CEterPackManager::Instance().Get(file, c_pszFileName, &c_pvData)) { return FALSE; } pTree = new CSpeedTreeWrapper; if(!pTree->LoadTree(c_pszFileName, (const BYTE *) c_pvData, file.Size())) { delete pTree; return FALSE; } m_pMainTreeMap.insert(std::map<DWORD, CSpeedTreeWrapper *>::value_type(dwCRC, pTree)); file.Destroy(); } If the map::insert fails due to the key already existing in the map, the leak is guaranteed. This code will leak memory if map::insert fails. Never write code like this if you're going to use a map to store a pointer to dynamic memory in a map, If the key value in the map already exists, then you have a leak You can also make the map a map of values rather than a map of pointers, Hou should be ok ? else { CMappedFile file; LPCVOID c_pvData; if(!CEterPackManager::Instance().Get(file, c_pszFileName, &c_pvData)) { return FALSE; } auto pTree = make_unique<CSpeedTreeWrapper>(); if(!pTree->LoadTree(c_pszFileName, (const BYTE *) c_pvData, file.Size())) { // delete pTree; return FALSE; } m_pMainTreeMap.emplace(dwCRC, std::move(pTree)); for map of unique_ptr m_pMainTreeMap.emplace(dwCRC, pTree.get()); for observer map of unique_ptr // m_pMainTreeMap.insert(std::map<DWORD, CSpeedTreeWrapper *>::value_type(dwCRC, pTree)); file.Destroy(); } Yes, this is just a small part of the example that I gave you. I said above me, the problem is much deeper. Not necessarily need to come from new x / delete . This happen for PythonNonPlayer.cpp too for(DWORD i = 0; i < dwElements; ++i, ++pTable) { TMobTable *pNonPlayerData = new TMobTable; memcpy(pNonPlayerData, pTable, sizeof(TMobTable)); TraceError("%d : %s type[%d] color[%d]", pNonPlayerData->dwVnum, pNonPlayerData->szLocaleName, pNonPlayerData->bType, pNonPlayerData->dwMonsterColor); m_NonPlayerDataMap.insert(TNonPlayerDataMap::value_type(pNonPlayerData->dwVnum, pNonPlayerData)); } don't use memcpy! better would be to give TMobTable a copy constructor instead , for(DWORD i = 0; i < dwElements; ++i, ++pTable) { / Dunno just use smart pointers. auto pNonPlayerData = make_unique<TMobTable>(pTable); // don't use memcpy! better would be to give TMobTable a copy constructor instead... *pNonPlayerData = *pTable; // if successful, ownership of the object is transferred into the map. // if failed, ownership will remain here and free the object when the unique_ptr goes out of scope. // m_NonPlayerDataMap.insert(std::make_pair(pNonPlayerData->dwVnum, std::move(pNonPlayerData))); } If the map::insert fails due to the key already existing in the map, the leak is guaranteed. SAME Is like you said. "roses are red, violets are blue". I'm sorry if is something wrong but i'm not at home. Now excuse me, my customers waiting for me to come back. What i'm trying to say is : The leaak is in those images , and maybe is in this example posted by me. This issues is more deeper. My customers waiting for me.. I need to hurry to home... xD I try to come back as fast as i can, if someone of them saw this. This is last login i will be without internet for next moments. EDIT: I have no reason to help someone like you, someone Who acused me that i steal a garbage. Yeah. Why should steal a gargage source ? xD Bye
  8. ds_aim

    [CLIENT] Teleportation memory leak

    After 10 warps : - 10 LEAKS - 10 LEAKS same memory - 10 leks same stack All those because new : You are smart. Look closely and you'll find them.
  9. ds_aim

    [CLIENT] Teleportation memory leak

    @martysama0134 This is really strange because here is how ti happen things. First start here. After here : After here : After here : Now here : Now it ends intro Property_type_tree Now here : Fuck, property_type_building ? If thr map std::alocator ? Now he jump here Now he jump here ? Now let's see New() declaration FUCKKKKKKKKKKKKKKKKKKKKKKKK Let's see alloc ? Ok. let's continue : Now it happens intro LoadArea ? Now intro LoadArea we have again New ? Hmmmmmmmmmmmm ? Update Now he jump here intro MAPTYPE_OUTDOOR . Now finally jump intro warp function. NOw here : And finally here end the leak. Here is all of the road for warp memory leak. Now is easy to fix.
  10. ds_aim

    [CLIENT] Teleportation memory leak

    As I said, the problem is much deeper. Have a look intro FreeQuadTree.
  11. ds_aim

    [CLIENT] Teleportation memory leak

    Just give a proper answer or shut up. I mean , thet just want the fix. Nobody will care about 2-3 words answer. Sad but true.. yeah.. I don't help someone who not deserver my help. And someone who click like to you posts. But here is a hint... I show you from where come the leaks, i don't work for nobody. From here come the most part of memory leaks 32404 Here is a 140 size leak. Here also is a 1.300 size leak. Also from SendBufferSize come another leak. 1.060 AND THE BIG LEAK COME FROM HERE. from the BuildIndex function. Use unique_ptr Whici is 69540 Maybe you know when you let the client minimlized in taskbar, and when you maximize after some hours is black ? Here is cause New use like a shit. And now let's talk about the BIG WARP LEAK. Here is. Remember, i not help someone who not deserver this. Who they don't just click a fucking LIKE. Nothing more. Maybe if metin2 communit was more nice, yeah. Who want all those fixed they can look to my signature and buy my services. The cause is more deep than CSpeedTreeWrapper. Best regards
  12. ds_aim

    Source refactoring and porting to linux

    It's useless to do this. FreeBSD is already good. If you want, improve, do it. Port source to libevent http://libevent.org/ or libuv.
  13. ds_aim

    [CLIENT] Teleportation memory leak

    W We don't know what is a smart pointer , tell us please.
  14. ds_aim

    Discussion thread about vanilla core

    1. Lzma or lz4 , don't really matter the compression algorithm that you use. You need a SSD and all is fine. 2. The aim of improved_packet_encryption is to cipher packets to prevent packet sniffer to decrypt and to solve buffer issues. Just don't touch it if you have no ideea how to work with memory management. And lol, why you need to cipher packets? Really is metin2, is an old game... Belive me , No big hacker will come to destroy kids server. AES is the best. I alredy use it for mysql hash password.. SELECT HEX(AES_ENCRYPT('password', 'key')); 3. SendClientConfigPacket. should be ok The packet will send true or false intro client and with one config server you can enable or disable client codes too. Here is an example config. http://prnt.sc/c5j15r from my server. Also write locale.cfg metin2.cfg mouse.cfg to be saved intro registry. if (true == ReceiveClientConfigPacket(g_enable_wolfman)) { /// Valid codes } Here is one challange for you, well.. What to include in you release, i already did all those but do it if you want. - no need to pool memory big than 1024*256, that is 18 slots, to forbidden call buffer_pool_free() -memory size 8Byte align, use memalign inseated - create a thread safe for buffers. - std::copy inseated of memcpy - convert all new operators to unique_ptr (Client / server src ) - see assert functions intro release mode (server /client ) undefined behavior (buffer.c) - Rewrite adminpage systems for a better stability. - Fix all memory leaks that come from SpeedTreeWrapper class. - Fix rotation intro intro StatePacket. - and mooooooooore things , just too lazy to tell you... Good luck.