Management Karbust 4884 Posted September 4, 2020 Management Share Posted September 4, 2020 (edited) Hello guys, Sometimes after a few time using switchbot (mijago) (only noticed here, not sure if happens with any other action) I can't get to char select with any account, I get stuck at the last message after successful login. This is the auth syserr: Sep 5 00:28:59 :: SYSTEM: new connection from [192.168.1.79] fd: 24 handshake 1055712891 output input_len 0, ptr 0x29d6aa80 Sep 5 00:28:59 :: Handshake: client_time 0 server_time 1298755 Sep 5 00:28:59 :: AUTH_PHASE 0x29d6aa80 Sep 5 00:28:59 :: InputAuth::Login : admin(5) desc 0x29d6aa80 Sep 5 00:28:59 :: SetLoginKey 987462297 Sep 5 00:28:59 :: InputAuth::Login : key 987462297:0x4a4b80db login admin Sep 5 00:29:00 :: QID_AUTH_LOGIN: START 987462297 0x29d6aa80 Sep 5 00:29:00 :: Create_Time 0 19700101 Sep 5 00:29:00 :: Block Time -2 Sep 5 00:29:00 :: SetRemainSecs admin 0 type 2 Sep 5 00:29:00 :: SendAuthLogin admin key 1 Sep 5 00:29:00 :: AuthLogin result 1 key 987462297 Sep 5 00:29:00 :: SYSTEM: closing socket. DESC #24 https://metin2.download/picture/fOA7iW1c3ebalV6H4sl6VtDrQLu3HStZ/.gif EDIT: db is crashing... GDB: Spoiler root@vanilla_source:/usr/home/game/cores/db # gdb db -c db.core GNU gdb (GDB) 8.2.1 [GDB v8.2.1 for FreeBSD] Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from db...done. [New LWP 100418] [New LWP 100682] [New LWP 100683] [New LWP 100684] [New LWP 100685] [New LWP 100686] [New LWP 100687] [New LWP 100688] [New LWP 100689] Core was generated by `db'. Program terminated with signal SIGABRT, Aborted. #0 0x28b15f73 in thr_kill () from /lib/libc.so.7 [Current thread is 1 (LWP 100418)] (gdb) bt full #0 0x28b15f73 in thr_kill () from /lib/libc.so.7 No symbol table info available. #1 0x28b141b1 in raise () from /lib/libc.so.7 No symbol table info available. #2 0x28a87353 in abort () from /lib/libc.so.7 No symbol table info available. #3 0x0814637f in emergency_sig (sig=11) at Main.cpp:57 No locals. #4 0x28987408 in ?? () from /lib/libthr.so.3 No symbol table info available. #5 0x2898683b in ?? () from /lib/libthr.so.3 No symbol table info available. #6 <signal handler called> No symbol table info available. #7 0x28a7195b in ?? () from /lib/libc.so.7 No symbol table info available. #8 0x28a3754c in ?? () from /lib/libc.so.7 No symbol table info available. #9 0x28a78574 in malloc () from /lib/libc.so.7 No symbol table info available. #10 0x2893723a in operator new(unsigned int) () from /usr/lib/libc++.so.1 No symbol table info available. #11 0x080c4895 in CClientManager::PutItemCache (this=0xffbfec08, pNew=0x2b2382da, bSkipQuery=false) at ClientManager.cpp:1557 c = 0x0 it = {node_ = 0x28f540f0} #12 0x080c47cf in CClientManager::QUERY_ITEM_SAVE (this=0xffbfec08, pkPeer=0x29b6e000, c_pData=0x2b2382da "\315\247\230") at ClientManager.cpp:1478 p = 0x2b2382da #13 0x080cac7d in CClientManager::ProcessPackets (this=0xffbfec08, peer=0x29b6e000) at ClientManager.cpp:2568 header = 30 '\036' dwHandle = 0 dwLength = 64 data = 0x2b2382da "\315\247\230" i = 90 iCount = 2 #14 0x080b8d8c in CClientManager::Process (this=0xffbfec08) at ClientManager.cpp:3325 pulses = -1 num_events = 2 idx = 1 peer = 0x29b6e000 Also happens on login GDB: Spoiler root@vanilla_source:/usr/home/game/cores/db # gdb db -c db.core GNU gdb (GDB) 8.2.1 [GDB v8.2.1 for FreeBSD] Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from db...done. [New LWP 100339] [New LWP 100892] [New LWP 100893] [New LWP 100894] [New LWP 100895] [New LWP 100896] [New LWP 100897] [New LWP 100899] [New LWP 100900] Core was generated by `db'. Program terminated with signal SIGABRT, Aborted. #0 0x28b0bf73 in thr_kill () from /lib/libc.so.7 [Current thread is 1 (LWP 100339)] (gdb) bt full #0 0x28b0bf73 in thr_kill () from /lib/libc.so.7 No symbol table info available. #1 0x28b0a1b1 in raise () from /lib/libc.so.7 No symbol table info available. #2 0x28a7d353 in abort () from /lib/libc.so.7 No symbol table info available. #3 0x0813cd8f in emergency_sig (sig=11) at Main.cpp:57 No locals. #4 0x2897d408 in ?? () from /lib/libthr.so.3 No symbol table info available. #5 0x2897c83b in ?? () from /lib/libthr.so.3 No symbol table info available. #6 <signal handler called> No symbol table info available. #7 0x28a6795b in ?? () from /lib/libc.so.7 No symbol table info available. #8 0x28a2d54c in ?? () from /lib/libc.so.7 No symbol table info available. #9 0x28a6e574 in malloc () from /lib/libc.so.7 No symbol table info available. #10 0x2892d23a in operator new(unsigned int) () from /usr/lib/libc++.so.1 No symbol table info available. #11 0x080bbf55 in CClientManager::PutItemCache (this=0xffbfec08, pNew=0x29b76180, bSkipQuery=true) at ClientManager.cpp:1491 c = 0x0 it = {node_ = 0x28f23370} #12 0x08095b5b in CClientManager::RESULT_ITEM_LOAD (this=0xffbfec08, peer=0x28ec5000, pRes=0x2aa500c0, dwHandle=8, dwPID=4) at ClientManagerPlayer.cpp:734 i = 6 s_items = std::vector of length 13 = {{id = 10000391, window = 1 '\001', pos = 1, count = 1, vnum = 19, alSockets = {1, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000394, window = 1 '\001', pos = 4, count = 1, vnum = 15009, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, { bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000397, window = 1 '\001', pos = 9, count = 200, vnum = 70038, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000390, window = 1 '\001', pos = 0, count = 1, vnum = 11209, alSockets = {1, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, { bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000399, window = 1 '\001', pos = 11, count = 1, vnum = 72727, alSockets = {0, 0, 100000, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000400, window = 1 '\001', pos = 12, count = 1, vnum = 72701, alSockets = {0, 0, 1800, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, { bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000392, window = 1 '\001', pos = 2, count = 1, vnum = 13009, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000402, window = 1 '\001', pos = 14, count = 1, vnum = 70007, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, { id = 10000401, window = 1 '\001', pos = 13, count = 1, vnum = 50053, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, { bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000393, window = 1 '\001', pos = 3, count = 1, vnum = 14009, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000395, window = 1 '\001', pos = 7, count = 1, vnum = 16009, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000396, window = 1 '\001', pos = 8, count = 1, vnum = 17009, alSockets = {0, 0, 0, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, { bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}, {id = 10000398, window = 1 '\001', pos = 10, count = 1, vnum = 72723, alSockets = {0, 0, 1000000, 0, 0, 0}, aAttr = {{bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}, {bType = 0 '\000', sValue = 0}}, owner = 4}} dwCount = 13 #13 0x08095275 in CClientManager::RESULT_COMPOSITE_PLAYER (this=0xffbfec08, peer=0x28ec5000, pMsg=0x28f16ae0, dwQID=1) at ClientManagerPlayer.cpp:611 qi = 0x28f23360 info = std::unique_ptr<CClientManager::ClientHandleInfo> = 0x28e57db0 pSQLResult = 0x2aa500c0 #14 0x080afbaf in CClientManager::AnalyzeQueryResult (this=0xffbfec08, msg=0x28f16ae0) at ClientManager.cpp:2948 qi = 0x28f23360 peer = 0x28ec5000 Any idea? Thank you Edited August 27, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Sherer 481 Posted September 4, 2020 Share Posted September 4, 2020 It looks to be related to something else. Check on DB memory usage and RAM level right before the crash. Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted September 5, 2020 Premium Share Posted September 5, 2020 void CClientManager::QUERY_ITEM_SAVE(CPeer * pkPeer, const char * c_pData) { ..... PutItemCache(p); } You did shits there installing some system. Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 5, 2020 Author Management Share Posted September 5, 2020 9 minutes ago, WeedHex said: void CClientManager::QUERY_ITEM_SAVE(CPeer * pkPeer, const char * c_pData) { ..... PutItemCache(p); } You did shits there installing some system. Here's my function, nothing much... void CClientManager::QUERY_ITEM_SAVE(CPeer * pkPeer, const char * c_pData) { TPlayerItem * p = (TPlayerItem *) c_pData; // 창고면 캐쉬하지 않고, 캐쉬에 있던 것도 빼버려야 한다. // auction은 이 루트를 타지 않아야 한다. EnrollInAuction을 타야한다. if (p->window == SAFEBOX || p->window == MALL) { CItemCache * c = GetItemCache(p->id); if (c) { TItemCacheSetPtrMap::iterator it = m_map_pkItemCacheSetPtr.find(c->Get()->owner); if (it != m_map_pkItemCacheSetPtr.end()) { if (g_test_server) sys_log(0, "ITEM_CACHE: safebox owner %u id %u", c->Get()->owner, c->Get()->id); it->second->erase(c); } m_map_itemCache.erase(p->id); delete c; } char szQuery[512]; snprintf(szQuery, sizeof(szQuery), "REPLACE INTO item%s (id, owner_id, item.window, pos, count, vnum, socket0, socket1, socket2, " #ifdef ENABLE_6_SLOT_STONES " socket3, socket4, socket5, " #endif "attrtype0, attrvalue0, " "attrtype1, attrvalue1, " "attrtype2, attrvalue2, " "attrtype3, attrvalue3, " "attrtype4, attrvalue4, " "attrtype5, attrvalue5, " "attrtype6, attrvalue6) " "VALUES(%u, %u, %d, %d, %u, %u, %ld, %ld, %ld, " #ifdef ENABLE_6_SLOT_STONES " %ld, %ld, %ld, " #endif "%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", GetTablePostfix(), p->id, p->owner, p->window, p->pos, p->count, p->vnum, p->alSockets[0], p->alSockets[1], p->alSockets[2], #ifdef ENABLE_6_SLOT_STONES p->alSockets[3], p->alSockets[4], p->alSockets[5], #endif p->aAttr[0].bType, p->aAttr[0].sValue, p->aAttr[1].bType, p->aAttr[1].sValue, p->aAttr[2].bType, p->aAttr[2].sValue, p->aAttr[3].bType, p->aAttr[3].sValue, p->aAttr[4].bType, p->aAttr[4].sValue, p->aAttr[5].bType, p->aAttr[5].sValue, p->aAttr[6].bType, p->aAttr[6].sValue); CDBManager::instance().ReturnQuery(szQuery, QID_ITEM_SAVE, pkPeer->GetHandle(), NULL); } #ifdef __AUCTION__ else if (p->window == AUCTION) { sys_err("invalid window. how can you enter this route?"); return ; } #endif else { if (g_test_server) sys_log(0, "QUERY_ITEM_SAVE => PutItemCache() owner %d id %d vnum %d ", p->owner, p->id, p->vnum); PutItemCache(p); } } Link to comment Share on other sites More sharing options...
HITRON 694 Posted September 5, 2020 Share Posted September 5, 2020 (edited) The PutItemCache found a 0x0 (null) so make a check: ::PutItemCache Find: c = GetItemCache(pNew->id); Add above: if (!pNew) return false; But try to put a sys_err to see what the id in the GetItemCache is. But as i saw you using root@vanilla_source:/usr/home/game/cores/db # gdb db -c db.core vanilla_source (vanilla) so you should probably ask her, because she changed a lot of stuff. Try the solution and let us know. Edited September 5, 2020 by HITRON Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted September 5, 2020 Premium Share Posted September 5, 2020 #ifdef ENABLE_6_SLOT_STONE Undefine it and check again. Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 5, 2020 Author Management Share Posted September 5, 2020 (edited) 8 hours ago, HITRON said: The PutItemCache found a 0x0 (null) so make a check: ::PutItemCache Find: c = GetItemCache(pNew->id); Add above: if (!pNew) return false; But try to put a sys_err to see what the id in the GetItemCache is. But as i saw you using root@vanilla_source:/usr/home/game/cores/db # gdb db -c db.core vanilla_source (vanilla) so you should probably ask her, because she changed a lot of stuff. Try the solution and let us know. vanilla's source was barely touched on db side, and this is something not to do with the source, it was working before I tried to add 6 slots. 2 hours ago, WeedHex said: #ifdef ENABLE_6_SLOT_STONE Undefine it and check again. So far, no crashes. I'm try doing everything again, maybe I missed something, but I removed it from my older source that was working... EDIT: crashed... Spoiler root@vanilla_source:/usr/home/game/cores/db # gdb db -c db.core GNU gdb (GDB) 8.2.1 [GDB v8.2.1 for FreeBSD] Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from db...done. [New LWP 100212] [New LWP 100569] [New LWP 100570] [New LWP 100572] [New LWP 100573] [New LWP 100574] [New LWP 100575] [New LWP 100576] Core was generated by `db'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x2827cba9 in vio_description(Vio*, char*) () from /usr/local/lib/mysql/libmysqlclient.so.21 [Current thread is 1 (LWP 100212)] (gdb) bt #0 0x2827cba9 in vio_description(Vio*, char*) () from /usr/local/lib/mysql/libmysqlclient.so.21 #1 0x2821a5b7 in ?? () from /usr/local/lib/mysql/libmysqlclient.so.21 #2 0x2821aa65 in cli_safe_read_with_ok () from /usr/local/lib/mysql/libmysqlclient.so.21 #3 0x282260d0 in ?? () from /usr/local/lib/mysql/libmysqlclient.so.21 #4 0x282223e7 in mysql_set_character_set () from /usr/local/lib/mysql/libmysqlclient.so.21 #5 0x0817ac64 in CAsyncSQL2::SetLocale(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) () #6 0x08100828 in CDBManager::SetLocale (this=0xffbfee08, szLocale=0x81abf99 <g_stLocale+1> "latin1") at DBManager.cpp:172 #7 0x080af2db in CClientManager::InitializeLocalization (this=0xffbfec08) at ClientManager.cpp:3772 #8 0x080a60c5 in CClientManager::Initialize (this=0xffbfec08) at ClientManager.cpp:96 #9 0x0813e6e6 in Start () at Main.cpp:375 #10 0x0813cf24 in main () at Main.cpp:80 (gdb) bt full #0 0x2827cba9 in vio_description(Vio*, char*) () from /usr/local/lib/mysql/libmysqlclient.so.21 No symbol table info available. #1 0x2821a5b7 in ?? () from /usr/local/lib/mysql/libmysqlclient.so.21 No symbol table info available. #2 0x2821aa65 in cli_safe_read_with_ok () from /usr/local/lib/mysql/libmysqlclient.so.21 No symbol table info available. #3 0x282260d0 in ?? () from /usr/local/lib/mysql/libmysqlclient.so.21 No symbol table info available. #4 0x282223e7 in mysql_set_character_set () from /usr/local/lib/mysql/libmysqlclient.so.21 No symbol table info available. #5 0x0817ac64 in CAsyncSQL2::SetLocale(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) () No symbol table info available. #6 0x08100828 in CDBManager::SetLocale (this=0xffbfee08, szLocale=0x81abf99 <g_stLocale+1> "latin1") at DBManager.cpp:172 n = 1 stLocale = "latin1" #7 0x080af2db in CClientManager::InitializeLocalization (this=0xffbfec08) at ClientManager.cpp:3772 col = 2 locale = {szValue = "portugal\000\060 12 14 16 18 20 22 24", szKey = "LOCALE\000OWER_BY_LEVEL_TYPE7\000(\220\301\227("} n = 8 szQuery = "SELECT mValue, mKey FROM locale\000(,\261\345(\\\203\230(\\\311\277\377\256\060\230(\000\260\345(\001\000\000\000\000\000\000\000dp\034(\000\262\034(|b\034(x\311\277\377\037n\033(\200\036\231(\200\036\231(x\362 ( \224'(|b\034(\364\311\277\377D\367\032(dp\034(\260\311\277\377\000\262\034(\000\262\034(\240\370 (\221%\247(\370\215'(\355H-(>\000\000\000\060&W(<P\034(\000\262\034(\001\000\000\000D\366\032(|b\034(|\311\277\377\364\311\277\377<P\034(\260\311\277\377@\332\262(\b\000\000\000\000\000\000\000\347\060\361"... pMsg = std::unique_ptr<_SQLMsg> = 0x28e726c0 row = 0x28ef6e58 #8 0x080a60c5 in CClientManager::Initialize (this=0xffbfec08) at ClientManager.cpp:96 tmpValue = 682693939 szBindIP = '\000' <repeats 16 times>, "\365\356\227(\030\255\263(\254\323\261(T\340\277\377\240t\345(@\332\262(\\\203\230(h\340\277\377\320\370\227(\000\000\000\000\n\325\227(\030\255\263(\254\323\261(|\340\277\377\306\354\260(\030\255\263(\310\340\277\377\254\323\261(\214\340\277\377p\353\260(\300\254\263(\\\203\230(\240\340\277\377\nb\230(\300\254\263(\000\000\000\000\254\323\261(\260\340\277\377" iChinaEventServer = 0 Edited September 5, 2020 by Karbust Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted September 5, 2020 Premium Share Posted September 5, 2020 Waste of time. Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 12, 2021 Author Management Share Posted September 12, 2021 (edited) Well, I'm reliving this topic because recently got back at it and I haven't fixed it before... I get either one of this 2 errors, but they all end up crashing on PutItemCache... I also noticed this random items showing up on item table... Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 14, 2021 Author Management Share Posted September 14, 2021 BUMP @Finnis and @Separate tried to have at it but without luck. Thank you anyway to both of you. 1 Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted September 14, 2021 Share Posted September 14, 2021 c = 0x0 (null) ------ check CItemCache * CClientManager::GetItemCache Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 14, 2021 Author Management Share Posted September 14, 2021 3 minutes ago, Denizeri24 said: c = 0x0 (null) ------ check CItemCache * CClientManager::GetItemCache This is the function, already checks if c is null and allocates a new... void CClientManager::PutItemCache(TPlayerItem * pNew, bool bSkipQuery) { CItemCache * c; if (!pNew) return; c = GetItemCache(pNew->id); // 아이템 새로 생성 if (!c) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } // 있을시 else { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> Have Cache"); // 소유자가 틀리면 if (pNew->owner != c->Get()->owner) { // 이미 이 아이템을 가지고 있었던 유저로 부터 아이템을 삭제한다. TItemCacheSetPtrMap::iterator it = m_map_pkItemCacheSetPtr.find(c->Get()->owner); if (it != m_map_pkItemCacheSetPtr.end()) { if (g_log) sys_log(0, "ITEM_CACHE: delete owner %u id %u new owner %u", c->Get()->owner, c->Get()->id, pNew->owner); it->second->erase(c); } } } // 새로운 정보 업데이트 c->Put(pNew, bSkipQuery); TItemCacheSetPtrMap::iterator it = m_map_pkItemCacheSetPtr.find(c->Get()->owner); if (it != m_map_pkItemCacheSetPtr.end()) { if (g_log) sys_log(0, "ITEM_CACHE: save %u id %u", c->Get()->owner, c->Get()->id); else sys_log(1, "ITEM_CACHE: save %u id %u", c->Get()->owner, c->Get()->id); it->second->insert(c); } else { // 현재 소유자가 없으므로 바로 저장해야 다음 접속이 올 때 SQL에 쿼리하여 // 받을 수 있으므로 바로 저장한다. if (g_log) sys_log(0, "ITEM_CACHE: direct save %u id %u", c->Get()->owner, c->Get()->id); else sys_log(1, "ITEM_CACHE: direct save %u id %u", c->Get()->owner, c->Get()->id); c->OnFlush(); } } Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted September 14, 2021 Active+ Member Share Posted September 14, 2021 What compiler do you use for compiling the db, what freebsd for compiling and what freebsd for runing, also do you compile with -j ? Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 14, 2021 Author Management Share Posted September 14, 2021 (edited) 24 minutes ago, Abel(Tiger) said: What compiler do you use for compiling the db, what freebsd for compiling and what freebsd for runing, also do you compile with -j ? clang with c++2a on FreeBSD 13 (just upgraded from 12, same error) (compiling and running), and yes, I use the -j flag... Edited September 14, 2021 by Karbust Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted September 14, 2021 Active+ Member Share Posted September 14, 2021 I think it's a compiling problem, not a source problem (I had a similar problem in the past) so try these things: 1. Don't compile with -j flag when you move to production 2. Try downgrade c++2a to c++14 or c++11 3. If 1 and 2 don't work try to upgrade clang to version 10 (I think you use 9) Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 15, 2021 Author Management Share Posted September 15, 2021 (edited) 11 hours ago, Abel(Tiger) said: I think it's a compiling problem, not a source problem (I had a similar problem in the past) so try these things: 1. Don't compile with -j flag when you move to production 2. Try downgrade c++2a to c++14 or c++11 3. If 1 and 2 don't work try to upgrade clang to version 10 (I think you use 9) Tried without the -j flag, same error. Also without the -j flag, tried c++17 and c++14, nothing. My clang version: # clang++ -v FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: i386-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin Without using the 6 slots it works completely, that PutItemCache function isn't something new, so I wasn't expecting changes to make it work Edited September 15, 2021 by Karbust Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted September 15, 2021 Share Posted September 15, 2021 DO NOT USE EXTERNAL DOWNLOADED GCC LIBRARIES! Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 15, 2021 Author Management Share Posted September 15, 2021 17 minutes ago, Denizeri24 said: DO NOT USE EXTERNAL DOWNLOADED GCC LIBRARIES! What? My extern folder only has cryptopp self-compiled, nothing else, all other libraries are through installed packages... Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted September 15, 2021 Share Posted September 15, 2021 12 minutes ago, Karbust said: What? My extern folder only has cryptopp self-compiled, nothing else, all other libraries are through installed packages... nevermind... just try this; find; if (!c) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } and change; if (!c && c != NULL) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } this is will fix the crash but you probably take new problems. 4 Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 15, 2021 Author Management Share Posted September 15, 2021 55 minutes ago, Denizeri24 said: nevermind... just try this; find; if (!c) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } and change; if (!c && c != NULL) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; //crashes here... m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } this is will fix the crash but you probably take new problems. That's the complete opposite of the previous instruction... Obviously it will crash on the else when it tries to access anything inside and find nothing... Link to comment Share on other sites More sharing options...
Denizeri24 35 Posted September 15, 2021 Share Posted September 15, 2021 (edited) 1 hour ago, Karbust said: That's the complete opposite of the previous instruction... Obviously it will crash on the else when it tries to access anything inside and find nothing... you said; c = new CItemCache; //crashes here... and your core said "c" variable is fucking NULL (0x0) ; you cant create new pointer. check your fucking system libraries(freebsd and compiler(gcc or clang)) and optimization flags. Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 15, 2021 Author Management Share Posted September 15, 2021 (edited) 1 minute ago, Denizeri24 said: you said; c = new CItemCache; //crashes here... and your core said "c" variable is fucking NULL (0x0) ; you cant create new pointer. check your fucking system libraries(freebsd and compiler(gcc or clang)) and optimization flags. GetItemCache already returns NULL in case it doesn't find the item... CItemCache * CClientManager::GetItemCache(DWORD id) { TItemCacheMap::iterator it = m_map_itemCache.find(id); if (it == m_map_itemCache.end()) return NULL; return it->second; } In here: CItemCache * c; if (!pNew) return; c = GetItemCache(pNew->id); // 아이템 새로 생성 if (!c) { if (g_log) sys_log(0, "ITEM_CACHE: PutItemCache ==> New CItemCache id%d vnum%d new owner%d", pNew->id, pNew->vnum, pNew->owner); c = new CItemCache; m_map_itemCache.insert(TItemCacheMap::value_type(pNew->id, c)); } Declares "c", then if GetItemCache doesn't return an object of type CItemCache, it will return a NULL value, then it's the if... Doing "!c" or "c == NULL" it's the same thing. The problem is why the "new CItemCache" crashes the db, and only when the 6 slots are enabled, otherwise it runs without any problem... Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium flatik 190 Posted September 16, 2021 Premium Share Posted September 16, 2021 i think the 6 slot solution is incomplete c++latest, latest libs... Link to comment Share on other sites More sharing options...
Management Karbust 4884 Posted September 17, 2021 Author Management Share Posted September 17, 2021 12 hours ago, flatik said: i think the 6 slot solution is incomplete Well, I don't know what to tell you. I've search all "socket" occurrences on db and I can't find any problem... Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted September 17, 2021 Active+ Member Share Posted September 17, 2021 (edited) Did you try to increase this char list ? Edited August 17, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now