Page 1 of 1

Collections Crash

Posted: Thu Jul 14, 2011 4:05 pm
by John Adams
Got a crash when I chose "collect" on a spawn that had no loot/ground spawns assigned.

backtrace from linux:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb1c8bb70 (LWP 2807)]
0x081328a5 in Collection::NeedsItem (this=0xa02a0d8, item=0x8af0df8)
    at Collections/Collections.cpp:105
105                     if (collection_item->item->details.item_id == item->details.item_id) {
(gdb) bt
#0  0x081328a5 in Collection::NeedsItem (this=0xa02a0d8, item=0x8af0df8)
    at Collections/Collections.cpp:105
#1  0x0813332c in PlayerCollectionList::NeedsItem (this=0xa0154f4,
    item=0x8af0df8) at Collections/Collections.cpp:278
#2  0x0818986a in Item::serialize (this=0x8af0df8, packet=0x268efaa0,
    show_name=false, player=0xa013140, packet_type=0, subtype=0 '\000',
    loot_item=false) at Items.cpp:1580
#3  0x08189ee6 in Item::serialize (this=0x8af0df8,
    version=<value optimized out>, show_name=176, player=0xa013140,
    include_twice=true, packet_type=<value optimized out>, subtype=0 '\000',
    merchant_item=<value optimized out>, loot_item=false) at Items.cpp:1715
#4  0x0810b9c5 in Client::HandleExamineInfoRequest (this=0x9ff46a8,
    app=0x26d8b510) at client.cpp:1558
#5  0x0811a364 in Client::HandlePacket (this=0x9ff46a8, app=0x26d8b510)
    at client.cpp:1136
#6  0x0811fefc in Client::Process (this=0x9ff46a8, zone_process=true)
    at client.cpp:1662
#7  0x082972ab in ZoneServer::ClientProcess (this=0x8ba4938)
    at zoneserver.cpp:1912
#8  0x0829a631 in ZoneServer::Process (this=0x8ba4938) at zoneserver.cpp:886
#9  0x0829aabc in ZoneLoop (tmp=0x8ba4938) at zoneserver.cpp:3920
#10 0xb7c6880e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7beaa0e in clone () from /lib/tls/i686/cmov/libc.so.6

Re: Collections Crash

Posted: Thu Jul 14, 2011 4:27 pm
by Zcoretri
Did it crash before the item was in your inventory? or after it was in your inventory.

Re: Collections Crash

Posted: Thu Jul 14, 2011 5:24 pm
by John Adams
There are no items in the entire DB. So no loot to gather, no harvest items, just nodes with nothing in them.

It's likely another failure to check a null that Scat will find in a second, whereas I will stare at code for 2 weeks and finally ask him anyway. Unless you can find it, Z. Go for it!

Re: Collections Crash

Posted: Thu Jul 14, 2011 7:55 pm
by John Adams
k, so while I do not yet understand why... I seem to have 2 "collect" commands in my entity_commands table.

id: 10 - 'collect', which executes the "gather" command -- this is the one that crashes Linux world.

id 986 - 'collect', which executes the "collect" command -- does not crash the world.


What I still fail to understand is how a ground node that is NOT a "?" is executing "collection" functions, rather than ProcessHarvest(). I believe there has been long-term confusion about what the right-click mouse command for gathering is vs collecting, because I think SOE flopped back and forth a few times on this (according to our packetlogs).

Re: Collections Crash

Posted: Thu Jul 14, 2011 9:28 pm
by Scatman
It's executing collection functions in the serialize packet for the item. Each item has a `required_collection` flag or whatever it is to determine if you still need it for a collection. (If you dont need it, it displays extra text in the examine window). So it's looping through your collections (and possibly world's collections) to determine if you need that item. Any item you inspect will do this now.

However, you have no items in the DB? How did you inspect one then?