Merge branch 'DRTVWR-522-maint' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-08-09 11:10:17 +02:00
commit 5776bd5410
14 changed files with 186 additions and 477 deletions

View File

@ -3412,9 +3412,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>6989053898b8e81e904e75553e378820</string>
<string>97fac6d88480445c856083ed20d78093</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77523/735051/viewer_manager-2.0.556340-darwin64-556340.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85206/790666/viewer_manager-2.0.562101-darwin64-562101.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -3448,9 +3448,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>3446c1e54bb32542677caad0ec0d42ac</string>
<string>3f6271ec0e2e2f0cc1067d4c4102bb4c</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77525/735058/viewer_manager-2.0.556340-windows-556340.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85208/790681/viewer_manager-2.0.562101-windows-562101.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -3461,7 +3461,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>source_type</key>
<string>hg</string>
<key>version</key>
<string>2.0.556340</string>
<string>2.0.562101</string>
</map>
<key>vlc-bin</key>
<map>

18
debian/changelog vendored
View File

@ -1,18 +0,0 @@
secondlife-viewer (0.3) unstable; urgency=low
* Initial debian configuration
-- Don Kjer <don@lindenlab.com> Wed, 04 Jul 2012 00:43:03 +0000
secondlife-viewer (0.2) unstable; urgency=low
* Adding default LSB headers for squeeze
-- Tyler Kohler <tyler@lindenlab.com> Thu, 24 Mar 2011 09:43:36 -0700
secondlife-viewer (0.1) unstable; urgency=low
* Cloned from debian package skeleton.
-- Lex Linden <lex@lindenlab.com> Mon, 20 Sep 2010 08:01:59 -0700

1
debian/compat vendored
View File

@ -1 +0,0 @@
5

16
debian/control vendored
View File

@ -1,16 +0,0 @@
Source: secondlife-viewer
Section: unknown
Priority: extra
Maintainer: Don Linden <don@lindenlab.com>
Build-Depends: debhelper (>= 5)
Homepage: http://secondlife.com
Standards-Version: 3.7.2
Package: secondlife-viewer
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
ia32-libs,
ia32-libs-gtk
Description: Second Life Viewer
Second Life is an online virtual world developed by Linden Lab.

32
debian/copyright vendored
View File

@ -1,32 +0,0 @@
Second Life Viewer Copyright: 2000-2012 Linden Research, Inc.
License:
3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion
APR Copyright (C) 2011 The Apache Software Foundation
Collada DOM Copyright 2006 Sony Computer Entertainment Inc.
cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se)
DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg.
GL Copyright (C) 1999-2004 Brian Paul.
GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia.
google-perftools Copyright (c) 2005, Google Inc.
Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
ogg/vorbis Copyright (C) 2002, Xiphophorus
OpenSSL Copyright (C) 1998-2008 The OpenSSL Project.
PCRE Copyright (c) 1997-2012 University of Cambridge
SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
This software contains source code provided by NVIDIA Corporation.
All rights reserved. See licenses.txt for details.
Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)

43
debian/postinst vendored
View File

@ -1,43 +0,0 @@
#!/bin/sh
# postinst script for secondlife-viewer
#
# Delete this file if you don't need it.
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts. Don't delete this!
#DEBHELPER#
exit 0

41
debian/postrm vendored
View File

@ -1,41 +0,0 @@
#!/bin/sh
# postrm script for secondlife-viewer
#
# Delete this file if you don't need it.
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts. Don't delete this!
#DEBHELPER#
exit 0

39
debian/preinst vendored
View File

@ -1,39 +0,0 @@
#!/bin/sh
# preinst script for secondlife-viewer
#
# Delete this file if you don't need it.
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts. Don't delete this!
#DEBHELPER#
exit 0

42
debian/prerm vendored
View File

@ -1,42 +0,0 @@
#!/bin/sh
# prerm script for secondlife-viewer
#
# Delete this file if you don't need it.
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts. Don't delete this!
#DEBHELPER#
exit 0

118
debian/rules vendored
View File

@ -1,118 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
BASEDIR=opt/linden
VIEWER_PKG=secondlife-viewer
VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged
VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG)
VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //')
VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION)
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
#$(MAKE)
#docbook-to-man debian/secondlife-viewer.sgml > secondlife-viewer.1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
#-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/secondlife-viewer.
for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \
# create containing directory \
install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \
PERM=644; \
if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
PERM=755; \
fi; \
if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \
RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \
echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
else \
install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \
fi; \
done
dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/secondlife /usr/bin/secondlife
dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/SecondLife
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# To add an init script, uncomment this line and edit debian/init.d and
# customize debian/secondlife-viewer.default to suit your needs.
# dh_installinit
# To add cron jobs, uncomment this line and make a crontab file named
# debian/cron.d, and it will be installed in /etc/cron.d/
# dh_installcron
# dh_installinfo
dh_installman
dh_link
# dh_strip
dh_compress
# dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
# dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

View File

@ -1,8 +0,0 @@
# Linden packages install in opt/linden
secondlife-viewer: dir-or-file-in-opt
secondlife-viewer: section-is-dh_make-template
secondlife-viewer: binary-without-manpage
secondlife-viewer: maintainer-script-empty postrm
secondlife-viewer: maintainer-script-empty preinst
secondlife-viewer: maintainer-script-empty prerm
secondlife-viewer: unstripped-binary-or-object

BIN
doc/sl-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -1300,19 +1300,27 @@ bool LLAppViewer::init()
if (count > 0 && v1 <= 10)
{
LL_INFOS("AppInit") << "Detected obsolete intel driver: " << driver << LL_ENDL;
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
details.setArg("[VERSION]", driver);
details.setArg("[GPUNAME]", gpu_name);
S32 button = OSMessageBox(details.getString(),
LLStringUtil::null,
OSMB_YESNO);
if (OSBTN_YES == button && gViewerWindow)
if (!gViewerWindow->getInitAlert().empty() // graphic initialization crashed on last run
|| LLVersionInfo::getInstance()->getChannelAndVersion() != gLastRunVersion // viewer was updated
|| mNumSessions % 20 == 0 //periodically remind user to update driver
)
{
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
if (gViewerWindow->getWindow())
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
LL_INFOS("AppInit") << "Notifying user about obsolete intel driver for " << gpu_name << LL_ENDL;
details.setArg("[VERSION]", driver);
details.setArg("[GPUNAME]", gpu_name);
S32 button = OSMessageBox(details.getString(),
LLStringUtil::null,
OSMB_YESNO);
if (OSBTN_YES == button && gViewerWindow)
{
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
if (gViewerWindow->getWindow())
{
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
}
}
}
}

View File

@ -520,7 +520,8 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
S32 count = cats->size();
for(S32 i = 0; i < count; ++i)
{
if(cats->at(i)->getPreferredType() == preferred_type)
LLViewerInventoryCategory* p_cat = cats->at(i);
if(p_cat && p_cat->getPreferredType() == preferred_type)
{
const LLUUID& folder_id = cats->at(i)->getUUID();
if (rv.isNull() || folder_id < rv)
@ -2917,6 +2918,7 @@ void LLInventoryModel::createCommonSystemCategories()
gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, true);
gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, true); // folder should exist before user tries to 'landmark this'
gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS, true);
gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, true);
}
struct LLUUIDAndName
@ -4215,17 +4217,18 @@ void LLInventoryModel::dumpInventory() const
// returning an overall good/bad flag.
bool LLInventoryModel::validate() const
{
bool valid = true;
const S32 MAX_VERBOSE_ERRORS = 40; // too many errors can cause disconect or freeze
S32 error_count = 0;
if (getRootFolderID().isNull())
{
LL_WARNS() << "no root folder id" << LL_ENDL;
valid = false;
error_count++;
}
if (getLibraryRootFolderID().isNull())
{
LL_WARNS() << "no root folder id" << LL_ENDL;
valid = false;
error_count++;
}
if (mCategoryMap.size() + 1 != mParentChildCategoryTree.size())
@ -4233,7 +4236,7 @@ bool LLInventoryModel::validate() const
// ParentChild should be one larger because of the special entry for null uuid.
LL_INFOS() << "unexpected sizes: cat map size " << mCategoryMap.size()
<< " parent/child " << mParentChildCategoryTree.size() << LL_ENDL;
valid = false;
error_count++;
}
S32 cat_lock = 0;
S32 item_lock = 0;
@ -4245,23 +4248,32 @@ bool LLInventoryModel::validate() const
const LLViewerInventoryCategory *cat = cit->second;
if (!cat)
{
LL_WARNS() << "invalid cat" << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "invalid cat" << LL_ENDL;
}
error_count++;
continue;
}
if (cat_id != cat->getUUID())
{
LL_WARNS() << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL;
}
error_count++;
}
if (cat->getParentUUID().isNull())
{
if (cat_id != getRootFolderID() && cat_id != getLibraryRootFolderID())
{
LL_WARNS() << "cat " << cat_id << " has no parent, but is not root ("
<< getRootFolderID() << ") or library root ("
<< getLibraryRootFolderID() << ")" << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "cat " << cat_id << " has no parent, but is not root ("
<< getRootFolderID() << ") or library root ("
<< getLibraryRootFolderID() << ")" << LL_ENDL;
}
}
}
cat_array_t* cats;
@ -4269,8 +4281,11 @@ bool LLInventoryModel::validate() const
getDirectDescendentsOf(cat_id,cats,items);
if (!cats || !items)
{
LL_WARNS() << "invalid direct descendents for " << cat_id << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "invalid direct descendents for " << cat_id << LL_ENDL;
}
error_count++;
continue;
}
if (cat->getDescendentCount() == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)
@ -4279,12 +4294,15 @@ bool LLInventoryModel::validate() const
}
else if (cats->size() + items->size() != cat->getDescendentCount())
{
LL_WARNS() << "invalid desc count for " << cat_id << " name [" << cat->getName()
<< "] parent " << cat->getParentUUID()
<< " cached " << cat->getDescendentCount()
<< " expected " << cats->size() << "+" << items->size()
<< "=" << cats->size() +items->size() << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "invalid desc count for " << cat_id << " name [" << cat->getName()
<< "] parent " << cat->getParentUUID()
<< " cached " << cat->getDescendentCount()
<< " expected " << cats->size() << "+" << items->size()
<< "=" << cats->size() + items->size() << LL_ENDL;
}
error_count++;
}
if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
@ -4304,8 +4322,11 @@ bool LLInventoryModel::validate() const
if (!item)
{
LL_WARNS() << "null item at index " << i << " for cat " << cat_id << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "null item at index " << i << " for cat " << cat_id << LL_ENDL;
}
error_count++;
continue;
}
@ -4313,10 +4334,13 @@ bool LLInventoryModel::validate() const
if (item->getParentUUID() != cat_id)
{
LL_WARNS() << "wrong parent for " << item_id << " found "
<< item->getParentUUID() << " expected " << cat_id
<< LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "wrong parent for " << item_id << " found "
<< item->getParentUUID() << " expected " << cat_id
<< LL_ENDL;
}
error_count++;
}
@ -4324,17 +4348,24 @@ bool LLInventoryModel::validate() const
item_map_t::const_iterator it = mItemMap.find(item_id);
if (it == mItemMap.end())
{
LL_WARNS() << "item " << item_id << " found as child of "
<< cat_id << " but not in top level mItemMap" << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item " << item_id << " found as child of "
<< cat_id << " but not in top level mItemMap" << LL_ENDL;
}
error_count++;
}
else
{
LLViewerInventoryItem *top_item = it->second;
if (top_item != item)
{
LL_WARNS() << "item mismatch, item_id " << item_id
<< " top level entry is different, uuid " << top_item->getUUID() << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item mismatch, item_id " << item_id
<< " top level entry is different, uuid " << top_item->getUUID() << LL_ENDL;
}
}
}
@ -4343,19 +4374,25 @@ bool LLInventoryModel::validate() const
bool found = getObjectTopmostAncestor(item_id, topmost_ancestor_id);
if (!found)
{
LL_WARNS() << "unable to find topmost ancestor for " << item_id << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "unable to find topmost ancestor for " << item_id << LL_ENDL;
}
error_count++;
}
else
{
if (topmost_ancestor_id != getRootFolderID() &&
topmost_ancestor_id != getLibraryRootFolderID())
{
LL_WARNS() << "unrecognized top level ancestor for " << item_id
<< " got " << topmost_ancestor_id
<< " expected " << getRootFolderID()
<< " or " << getLibraryRootFolderID() << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "unrecognized top level ancestor for " << item_id
<< " got " << topmost_ancestor_id
<< " expected " << getRootFolderID()
<< " or " << getLibraryRootFolderID() << LL_ENDL;
}
error_count++;
}
}
}
@ -4369,9 +4406,12 @@ bool LLInventoryModel::validate() const
getDirectDescendentsOf(parent_id,cats,items);
if (!cats)
{
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL;
}
error_count++;
}
else
{
@ -4387,8 +4427,11 @@ bool LLInventoryModel::validate() const
}
if (!found)
{
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL;
}
}
}
}
@ -4400,24 +4443,33 @@ bool LLInventoryModel::validate() const
LLViewerInventoryItem *item = iit->second;
if (item->getUUID() != item_id)
{
LL_WARNS() << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL;
valid = false;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL;
}
error_count++;
}
const LLUUID& parent_id = item->getParentUUID();
if (parent_id.isNull())
{
LL_WARNS() << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL;
}
}
else
else if (error_count < MAX_VERBOSE_ERRORS)
{
cat_array_t* cats;
item_array_t* items;
getDirectDescendentsOf(parent_id,cats,items);
if (!items)
{
LL_WARNS() << "item " << item_id << " name [" << item->getName()
<< "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item " << item_id << " name [" << item->getName()
<< "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL;
}
}
else
{
@ -4432,63 +4484,70 @@ bool LLInventoryModel::validate() const
}
if (!found)
{
LL_WARNS() << "item " << item_id << " name [" << item->getName()
<< "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL;
if (error_count < MAX_VERBOSE_ERRORS)
{
LL_WARNS() << "item " << item_id << " name [" << item->getName()
<< "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL;
}
}
}
}
// Link checking
if (item->getIsLinkType())
{
const LLUUID& link_id = item->getUUID();
const LLUUID& target_id = item->getLinkedUUID();
LLViewerInventoryItem *target_item = getItem(target_id);
LLViewerInventoryCategory *target_cat = getCategory(target_id);
// Linked-to UUID should have back reference to this link.
if (!hasBacklinkInfo(link_id, target_id))
{
LL_WARNS() << "link " << item->getUUID() << " type " << item->getActualType()
<< " missing backlink info at target_id " << target_id
<< LL_ENDL;
}
// Links should have referents.
if (item->getActualType() == LLAssetType::AT_LINK && !target_item)
{
LL_WARNS() << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
}
else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat)
{
LL_WARNS() << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
}
if (target_item && target_item->getIsLinkType())
{
LL_WARNS() << "link " << item->getName() << " references a link item "
<< target_item->getName() << " " << target_item->getUUID() << LL_ENDL;
}
// Links should not have backlinks.
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(link_id);
if (range.first != range.second)
{
LL_WARNS() << "Link item " << item->getName() << " has backlinks!" << LL_ENDL;
}
}
else
{
// Check the backlinks of a non-link item.
const LLUUID& target_id = item->getUUID();
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(target_id);
for (backlink_mmap_t::const_iterator it = range.first; it != range.second; ++it)
{
const LLUUID& link_id = it->second;
LLViewerInventoryItem *link_item = getItem(link_id);
if (!link_item || !link_item->getIsLinkType())
{
LL_WARNS() << "invalid backlink from target " << item->getName() << " to " << link_id << LL_ENDL;
}
}
}
// Link checking
if (error_count < MAX_VERBOSE_ERRORS)
{
if (item->getIsLinkType())
{
const LLUUID& link_id = item->getUUID();
const LLUUID& target_id = item->getLinkedUUID();
LLViewerInventoryItem *target_item = getItem(target_id);
LLViewerInventoryCategory *target_cat = getCategory(target_id);
// Linked-to UUID should have back reference to this link.
if (!hasBacklinkInfo(link_id, target_id))
{
LL_WARNS() << "link " << item->getUUID() << " type " << item->getActualType()
<< " missing backlink info at target_id " << target_id
<< LL_ENDL;
}
// Links should have referents.
if (item->getActualType() == LLAssetType::AT_LINK && !target_item)
{
LL_WARNS() << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
}
else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat)
{
LL_WARNS() << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
}
if (target_item && target_item->getIsLinkType())
{
LL_WARNS() << "link " << item->getName() << " references a link item "
<< target_item->getName() << " " << target_item->getUUID() << LL_ENDL;
}
// Links should not have backlinks.
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(link_id);
if (range.first != range.second)
{
LL_WARNS() << "Link item " << item->getName() << " has backlinks!" << LL_ENDL;
}
}
else
{
// Check the backlinks of a non-link item.
const LLUUID& target_id = item->getUUID();
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(target_id);
for (backlink_mmap_t::const_iterator it = range.first; it != range.second; ++it)
{
const LLUUID& link_id = it->second;
LLViewerInventoryItem *link_item = getItem(link_id);
if (!link_item || !link_item->getIsLinkType())
{
LL_WARNS() << "invalid backlink from target " << item->getName() << " to " << link_id << LL_ENDL;
}
}
}
}
}
if (cat_lock > 0 || item_lock > 0)
@ -4505,9 +4564,9 @@ bool LLInventoryModel::validate() const
LL_INFOS() << "Found " << version_unknown_count << " cats with unknown version" << LL_ENDL;
}
LL_INFOS() << "Validate done, valid = " << (U32) valid << LL_ENDL;
LL_INFOS() << "Validate done, found " << error_count << " errors" << LL_ENDL;
return valid;
return error_count == 0;
}
#endif