EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   segfault in rev 640 (https://www.eqemulator.org/forums/showthread.php?t=28500)

gaeorn 06-08-2009 05:44 AM

segfault in rev 640
 
This is what I get when I try to log the first char in:

Code:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 140440410212240 (LWP 17565)]
ItemInst::PutItem (this=0x7fbad00ed6c0, index=<value optimized out>, inst=@0x0) at ../common/Item.cpp:393
393            if (!inst) {
(gdb) bt
#0  ItemInst::PutItem (this=0x7fbad00ed6c0, index=<value optimized out>, inst=@0x0) at ../common/Item.cpp:393
#1  0x000000000046c7eb in ItemInst::PutAugment (this=0x7fbad00ed700, slot=0 '\0', augment=@0x0) at ../common/Item.cpp:364
#2  0x000000000046c84f in ItemInst::PutAugment (this=0x7fbad00ed6c0, db=<value optimized out>, slot=0 '\0', item_id=<value optimized out>) at ../common/Item.cpp:371
#3  0x00000000004893e0 in SharedDatabase::GetInventory (this=0x738520, account_id=12, name=0x7fbad00ee4cc "GM", inv=0x7fbad00ed300) at ../common/shareddb.cpp:607
#4  0x000000000048ed43 in WorldDatabase::GetCharSelectInfo (this=<value optimized out>, account_id=12, cs=0x7fbad00ee060) at worlddb.cpp:108
#5  0x000000000043ddcb in Client::SendCharInfo (this=0x7fbad0023af0) at client.cpp:166
#6  0x000000000043f42a in Client::HandlePacket (this=0x7fbad0023af0, app=<value optimized out>) at client.cpp:311
#7  0x0000000000440552 in Client::Process (this=0x7fbad0023af0) at client.cpp:713
#8  0x00000000004a297f in ClientList::Process (this=0x737500) at clientlist.cpp:59
#9  0x0000000000443660 in main (argc=-1338532793, argv=0x737420) at net.cpp:395

This is even before char select shows up.

KLS 06-08-2009 12:48 PM

Could try reverting:

Code:

Index: common/Item.cpp
===================================================================
--- common/Item.cpp        (revision 638)
+++ common/Item.cpp        (working copy)
@@ -367,8 +367,9 @@
 void ItemInst::PutAugment(SharedDatabase *db, uint8 slot, uint32 item_id)
 {
        if (item_id != 0) {
-                const ItemInst aug(db, item_id);
-                PutAugment(slot,aug);
+                const ItemInst* aug = db->CreateItem(item_id);
+                PutAugment(slot,*aug);
+                safe_delete(aug);
        }
 }

And see if that helps, it was the only change to item.cpp outside adding the EvoItemInst stuff.

gaeorn 06-08-2009 03:50 PM

No more segfault after reverting that change.

KLS 06-08-2009 06:16 PM

I'll commit the revert then, thanks.

Edit: Actually I changed it up a bit rather than a full revert because I realized a full revert would take out some required functionality... With any luck the crash will be gone and everything will work.

gaeorn 06-09-2009 04:09 AM

No crash with that change.

Also, I specifically tried out the adventurer's stone and it is scaled based on number of wins.

One odd thing I noticed is I set a GM char on my server to enough wins to max the stats. With that done, the adventurer's stone was showing 108 hp and mana. I'm guessing there's a rounding problem with the math.

KLS 06-09-2009 04:17 PM

Probably a problem with the script, I know I had it set to 1.0 in the script arbitrarially earlier and it worked fine.

gaeorn 06-09-2009 05:21 PM

You are correct:

Code:

Index: quests/items/LLDAugText.pl
===================================================================
--- quests/items/LLDAugText.pl  (revision 88)
+++ quests/items/LLDAugText.pl  (working copy)
@@ -22,7 +22,7 @@
       
        if($ruj_wins > 74)
        {
-                $guk_wins = 74;
+                $ruj_wins = 74;
        }
 
        if($tak_wins > 78)


cavedude 06-09-2009 07:48 PM

It's OK, KLS I misspelled "warrior" in Gram's quest file to obtain the PoP charm.

The change to the adventure's stone will come down with the next quest svn update, thanks gaeorn.

gaeorn 06-09-2009 08:50 PM

Heh, not like I did much. KLS did all the thinking... I just looked where she pointed.


All times are GMT -4. The time now is 06:54 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.