From 1bbcc4be8359b177aca093be0b451c12212f8a7d Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 12 Nov 2009 20:21:33 -0500 Subject: EXT-24131 : Diagnose warning spam: "WARNING: LLObjectBridge::performAction: object not found - ignoring" This warning is a false positive, also existed in 1.23. Removing. --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 1 + indra/newview/llinventorybridge.cpp | 7 +-- indra/newview/llinventorymodel.cpp | 5 +- indra/newview/llinventorypanel.cpp | 116 +++++++++++++++++++----------------- 4 files changed, 65 insertions(+), 64 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0901289dac..e7123d5000 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1167,6 +1167,7 @@ void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update) const LLInventoryItem* item = item_array.get(i).get(); if (item->getLinkedUUID() == item_id) { + llinfos << "Purging object " << item->getUUID() << "for linked item " << item->getLinkedUUID() << llendl; gInventory.purgeObject(item_array.get(i)->getUUID()); } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1bc9297bba..10c4b620df 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3889,16 +3889,11 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model gMessageSystem->sendReliable( gAgent.getRegion()->getHost()); } // this object might have been selected, so let the selection manager know it's gone now - LLViewerObject *found_obj = - gObjectList.findObject(item->getUUID()); + LLViewerObject *found_obj = gObjectList.findObject(item->getLinkedUUID()); if (found_obj) { LLSelectMgr::getInstance()->remove(found_obj); } - else - { - llwarns << "object not found - ignoring" << llendl; - } } else LLItemBridge::performAction(folder, model, action); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 4b0d524906..a61f45c2c9 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -886,7 +886,7 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) // Delete a particular inventory object by ID. void LLInventoryModel::deleteObject(const LLUUID& id) { - purgeLinkedObjects(id); + //purgeLinkedObjects(id); lldebugs << "LLInventoryModel::deleteObject()" << llendl; LLPointer obj = getObject(id); if(obj) @@ -923,13 +923,14 @@ void LLInventoryModel::deleteObject(const LLUUID& id) } addChangedMask(LLInventoryObserver::REMOVE, id); obj = NULL; // delete obj + gInventory.notifyObservers(); } } // Delete a particular inventory item by ID, and remove it from the server. void LLInventoryModel::purgeObject(const LLUUID &id) { - lldebugs << "LLInventoryModel::purgeObject()" << llendl; + lldebugs << "LLInventoryModel::purgeObject() id:" << id << llendl; LLPointer obj = getObject(id); if(obj) { diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index dfd4af5c28..1a800b96d1 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -346,73 +346,77 @@ void LLInventoryPanel::modelChanged(U32 mask) LLInventoryObject* model_item = model->getObject(*id_it); LLFolderViewItem* view_item = mFolders->getItemByID(*id_it); - if (model_item) + // ADD operation + if (model_item && !view_item) { - if (!view_item) + // this object was just created, need to build a view for it + if ((mask & LLInventoryObserver::ADD) != LLInventoryObserver::ADD) { - // this object was just created, need to build a view for it - if ((mask & LLInventoryObserver::ADD) != LLInventoryObserver::ADD) - { - llwarns << *id_it << " is in model but not in view, but ADD flag not set" << llendl; - } - buildNewViews(*id_it); - - // select any newly created object - // that has the auto rename at top of folder - // root set - if(mFolders->getRoot()->needsAutoRename()) - { - setSelection(*id_it, FALSE); - } + llwarns << "( Operation: " << mask << " panel name: " << mStartFolderString << " ) Item in model but not in view, but ADD flag not set [ Name: " << model_item->getName() << " UUID: " << *id_it << " ]" << llendl; } - else + buildNewViews(*id_it); + + // select any newly created object + // that has the auto rename at top of folder + // root set + if(mFolders->getRoot()->needsAutoRename()) { - // this object was probably moved, check its parent - if ((mask & LLInventoryObserver::STRUCTURE) != LLInventoryObserver::STRUCTURE) - { - llwarns << *id_it << " is in model and in view, but STRUCTURE flag not set" << " for model (Name :" << model_item->getName() << " )" << llendl; - } - - LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID()); - - // added check against NULL for cases when Inventory panel contains startFolder. - // in this case parent is LLFolderView (LLInventoryPanel::mFolders) itself. - // this check is a fix for bug EXT-1859. - if (NULL != new_parent && view_item->getParentFolder() != new_parent) - { - view_item->getParentFolder()->extractItem(view_item); - view_item->addToFolder(new_parent, mFolders); - } -/* - on the other side in case Inventory Panel has content of the any folder - it is possible that item moved to some folder which is absent in current - Panel. For ex. removing item (via moving to trash). - In this case we need to check if new parent is other then inventory start folder - and simply remove its View from the hierarchy. - See details in EXT-2098. -*/ - // So, let check if item was moved into folder out of this Inventory Panel. - else if (mStartFolderID.notNull() && NULL == new_parent && model_item->getParentUUID() != mStartFolderID) - { - view_item->getParentFolder()->extractItem(view_item); - } + setSelection(*id_it, FALSE); } } - else + + // STRUCTURE operation + if (model_item && view_item) { - if (view_item) + // this object was probably moved, check its parent + if ((mask & LLInventoryObserver::STRUCTURE) != LLInventoryObserver::STRUCTURE) { - if ((mask & LLInventoryObserver::REMOVE) != LLInventoryObserver::REMOVE) - { - llwarns << *id_it << " is not in model but in view, but REMOVE flag not set" << llendl; - } - // item in view but not model, need to delete view - view_item->destroyView(); + llwarns << "( Operation: " << mask << " panel name: " << mStartFolderString << " ) Item in model and in view, but STRUCTURE flag not set [ Name:" << model_item->getName() << " UUID: " << *id_it << " ]" << llendl; + } + + LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID()); + + // added check against NULL for cases when Inventory panel contains startFolder. + // in this case parent is LLFolderView (LLInventoryPanel::mFolders) itself. + // this check is a fix for bug EXT-1859. + if (NULL != new_parent && view_item->getParentFolder() != new_parent) + { + view_item->getParentFolder()->extractItem(view_item); + view_item->addToFolder(new_parent, mFolders); + } + /* + on the other side in case Inventory Panel has content of the any folder + it is possible that item moved to some folder which is absent in current + Panel. For ex. removing item (via moving to trash). + In this case we need to check if new parent is other then inventory start folder + and simply remove its View from the hierarchy. + See details in EXT-2098. + */ + // So, let check if item was moved into folder out of this Inventory Panel. + else if (mStartFolderID.notNull() && NULL == new_parent && model_item->getParentUUID() != mStartFolderID) + { + view_item->getParentFolder()->extractItem(view_item); } - else + } + + // REMOVE operation + if (!model_item && view_item) + { + if ((mask & LLInventoryObserver::REMOVE) != LLInventoryObserver::REMOVE) { - llwarns << *id_it << "Item does not exist in either view or model, but notification triggered" << llendl; + llwarns << "( Operation: " << mask << " panel name: " << mStartFolderString << " ) Item is not in model but in view, but REMOVE flag not set [ UUID: " << *id_it << " ] " << llendl; } + // item in view but not model, need to delete view + view_item->destroyView(); + llinfos << "Deleting " << *id_it << " from " << this << llendl; + } + + // False positive. This item probably just doesn't exist in the + // particular inventory panel (e.g. is outside the root folder of the inventory panel). + // Ignore the operation. + if (!model_item && !view_item) + { + // llwarns << "( Operation: " << mask << " panel name: " << mStartFolderString << " ) Item does not exist in either view or model, but notification triggered [ UUID: " << *id_it << " ] " << llendl; } } } -- cgit v1.2.3