Jump to content

Game core debug result


Recommended Posts

Hi everyone. I was expecting some random crash's on my server and never have an syserr to analyze and take a conclusion. But now i learner how to debug the core and i have some results, hope some of you guys could help me with that. i haven't any knowledge about c++ to check those functions.

 

First one:

#0  0x08156079 in CItem::GetValue (this=0x3adb0f00, idx=0) at item.cpp:957
957	long CItem::GetValue(DWORD idx)
[New Thread 29005500 (LWP 100508/game)]
[New Thread 29005200 (LWP 100503/game)]
[New Thread 29004f00 (LWP 100502/game)]
[New Thread 29004300 (LWP 100883/game)]
(gdb) bt
#0  0x08156079 in CItem::GetValue (this=0x3adb0f00, idx=0) at item.cpp:957
#1  0x081b123c in quest::item_has_flag (L=0x3af9bdc0) at questlua_item.cpp:155
#2  0x08363cba in luaD_precall (L=0x3af9bdc0, func=0x3b1cedd8) at ldo.c:249
#3  0x0836ba86 in luaV_execute (L=0x3af9bdc0) at lvm.c:637
#4  0x08363fad in resume (L=0x3af9bdc0, ud=0xffffa164) at ldo.c:337
#5  0x0836393b in luaD_protectedparser (L=0x3af9bdc0, z=0x8363f80, bin=-24220)
    at ldo.c:462
#6  0x08363adb in lua_resume (L=0x0, nargs=1) at ldo.c:378
#7  0x08198952 in quest::CQuestManager::RunState (this=0xffffd940, 
    qs=@0x3a3982a4) at questlua.cpp:846
#8  0x081cebdf in quest::CQuestManager::Input (this=0xffffd940, pc=99118, 
    msg=0xffffa1fb "1") at questmanager.cpp:220
#9  0x08148f0f in CInputMain::QuestInputString (this=0x3a19d89c, 
    ch=0x309fb800, c_pData=0x3a753006) at input_main.cpp:1963
#10 0x0814f778 in CInputMain::Analyze (this=0x3a19d89c, d=0x3a19d800, 
    bHeader=<value optimized out>, c_pData=0x3a753006 "0361")
    at input_main.cpp:3166
#11 0x0813844b in CInputProcessor::Process (this=0x3a19d89c, 
    lpDesc=0x3a19d800, c_pvOrig=0x3a753000, iBytes=90, 
    r_iBytesProceed=@0xffffa734) at input.cpp:103
#12 0x08101933 in DESC::ProcessInput (this=0x3a19d800) at desc.cpp:313
#13 0x0825b3f4 in io_loop (fdw=0x29bd4840) at main.cpp:1012
#14 0x0825be51 in idle () at main.cpp:946
#15 0x0825d4ac in main (argc=1, argv=0xffffde08) at main.cpp:610

Second:

#0  CHARACTER::GetName (this=0x30303631) at char.cpp:571
571             return m_stName.empty() ? (m_pkMobData ? m_pkMobData->m_table.sz
LocaleName : "") : m_stName.c_str();
[New Thread 29005500 (LWP 100892/game)]
[New Thread 29005200 (LWP 100885/game)]
[New Thread 29004f00 (LWP 100884/game)]
[New Thread 29004300 (LWP 100205/game)]
(gdb) bt
#0  CHARACTER::GetName (this=0x30303631) at char.cpp:571
#1  0x0815c31d in ITEM_MANAGER::SaveSingleItem (this=0xffffa844,
    item=0x3cb85c00) at item_manager.cpp:453
#2  0x0815e3f4 in ITEM_MANAGER::Update (this=0xffffa844)
    at item_manager.cpp:484
#3  0x0825aec3 in heartbeat (ht=0x297d0bb0, pulse=863981) at main.cpp:330
#4  0x0825b04f in idle () at main.cpp:929
#5  0x0825c70c in main (argc=1, argv=0xffffde08) at main.cpp:602

Third and last one(look like the first):

#0  0x081552d9 in CItem::GetValue (this=0x3de1cd00, idx=0) at item.cpp:957
957	long CItem::GetValue(DWORD idx)
[New Thread 29005500 (LWP 100345/game)]
[New Thread 29005200 (LWP 100313/game)]
[New Thread 29004f00 (LWP 100311/game)]
[New Thread 29004300 (LWP 100145/game)]
(gdb) bt
#0  0x081552d9 in CItem::GetValue (this=0x3de1cd00, idx=0) at item.cpp:957
#1  0x081b049c in quest::item_get_value (L=0x3c70d280) at questlua_item.cpp:202
#2  0x08362f1a in luaD_precall (L=0x3c70d280, func=0x3d373ed8) at ldo.c:260
#3  0x0836ace6 in luaV_execute (L=0x3c70d280) at lvm.c:627
#4  0x0836320d in resume (L=0x3c70d280, ud=0xffffa164) at ldo.c:344
#5  0x08362b9b in luaD_rawrunprotected (L=0x3c70d280, f=0x83631e0 <resume>, 
    ud=0xffffa164) at ldo.c:88
#6  0x08362d3b in lua_resume (L=0x3c70d280, nargs=1) at ldo.c:371
#7  0x08197bb2 in quest::CQuestManager::RunState (this=0xffffd940, 
    qs=@0x3d737b14) at questlua.cpp:803
#8  0x081cde3f in quest::CQuestManager::Input (this=0xffffd940, pc=95865, 
    msg=0xffffa1fb "1") at questmanager.cpp:241
#9  0x0814816f in CInputMain::QuestInputString (this=0x3d5dc09c, 
    ch=0x2d649000, c_pData=0x3d71b000) at input_main.cpp:1963
#10 0x0814e9d8 in CInputMain::Analyze (this=0x3d5dc09c, d=0x3d5dc000, 
    bHeader=<value optimized out>, c_pData=0x3d71b000 "0361")
    at input_main.cpp:3166
#11 0x081376ab in CInputProcessor::Process (this=0x3d5dc09c, 
    lpDesc=0x3d5dc000, c_pvOrig=0x3d71b000, iBytes=79, 
    r_iBytesProceed=@0xffffa734) at input.cpp:103
#12 0x08100b93 in DESC::ProcessInput (this=0x3d5dc000) at desc.cpp:313
#13 0x0825a654 in io_loop (fdw=0x297d4840) at main.cpp:1064
#14 0x0825b0b1 in idle () at main.cpp:941
#15 0x0825c70c in main (argc=1, argv=0xffffde08) at main.cpp:602
(gdb) 
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Bot

1 + 3 is caused by some quest making operations on GetValue() it might pass an invalid pointer to LPITEM => leading to a segfault while trying to get the Values (q.GetCurrentItem()) is providing the ITEM Pointer.

 => start looking for an item.has_flag() on your quests and see if it might trigger faulty behaviour (User Input ?).

 

2: Its either m_stName being corrupted or m_pkMobData not returning valid results => Throwing an exception on access.

english_banner.gif

Link to comment
Share on other sites

1 + 3 is caused by some quest making operations on GetValue() it might pass an invalid pointer to LPITEM => leading to a segfault while trying to get the Values (q.GetCurrentItem()) is providing the ITEM Pointer.

 => start looking for an item.has_flag() on your quests and see if it might trigger faulty behaviour (User Input ?).

 

2: Its either m_stName being corrupted or m_pkMobData not returning valid results => Throwing an exception on access.

 

First of all, thank you.

 

 

1: I search for item.has_flag on my quest folder and on object folder and only find it on the quest_functions and nothing more, any other command that i should search?

 

2: Something i can do to about it?

Link to comment
Share on other sites

Is it possible that your debug symbols / source doesnt match your binary ? 

There should be no way that this gets into the backtrace if you dont use it.

 

Dont think so. I'm using the same game to debug it.

And i'm using

Game source: mainline

Client source: novaline

 

Maybe i'm debugging wrong?

 

i do

gdb game game.core
core game.core
bt
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.