diff options
author | Tom | 2010-08-06 08:08:43 -0700 |
---|---|---|
committer | Tom | 2010-08-06 08:08:43 -0700 |
commit | 52e2360e9178394664d6925e14da8468cbf90cd5 (patch) | |
tree | 547fdca96de83f6415f15beef51b07e26d729b03 /OpenSim | |
parent | Fix StateSource constants, provide RegionStart (diff) | |
download | opensim-SC-52e2360e9178394664d6925e14da8468cbf90cd5.zip opensim-SC-52e2360e9178394664d6925e14da8468cbf90cd5.tar.gz opensim-SC-52e2360e9178394664d6925e14da8468cbf90cd5.tar.bz2 opensim-SC-52e2360e9178394664d6925e14da8468cbf90cd5.tar.xz |
Since i've narrowed the fault down to one function, add some spammy debug to try and fix ghost prims on HUDs in future. Note, the console only gets messages if there is a problem, so it's harmless.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 57 |
1 files changed, 47 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index c300250..2517a23 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -496,6 +496,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
496 | 496 | ||
497 | if (item != null) | 497 | if (item != null) |
498 | { | 498 | { |
499 | if (item.ID == UUID.Zero) | ||
500 | { | ||
501 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 1"); | ||
502 | } | ||
503 | |||
499 | AssetBase rezAsset = m_Scene.AssetService.Get(item.AssetID.ToString()); | 504 | AssetBase rezAsset = m_Scene.AssetService.Get(item.AssetID.ToString()); |
500 | 505 | ||
501 | if (rezAsset != null) | 506 | if (rezAsset != null) |
@@ -518,11 +523,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
518 | itemId = item.ID; | 523 | itemId = item.ID; |
519 | } | 524 | } |
520 | 525 | ||
526 | if (item.ID == UUID.Zero) | ||
527 | { | ||
528 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 2"); | ||
529 | } | ||
530 | |||
521 | string xmlData = Utils.BytesToString(rezAsset.Data); | 531 | string xmlData = Utils.BytesToString(rezAsset.Data); |
522 | SceneObjectGroup group | 532 | SceneObjectGroup group |
523 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); | 533 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); |
524 | Vector3 storedPosition = group.AbsolutePosition; | 534 | Vector3 storedPosition = group.AbsolutePosition; |
525 | 535 | if (group.UUID == UUID.Zero) | |
536 | { | ||
537 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 3"); | ||
538 | } | ||
526 | group.RootPart.FromFolderID = item.Folder; | 539 | group.RootPart.FromFolderID = item.Folder; |
527 | 540 | ||
528 | // If it's rezzed in world, select it. Much easier to | 541 | // If it's rezzed in world, select it. Much easier to |
@@ -548,9 +561,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
548 | remoteClient.SendBulkUpdateInventory(item); | 561 | remoteClient.SendBulkUpdateInventory(item); |
549 | return null; | 562 | return null; |
550 | } | 563 | } |
551 | 564 | if (group.UUID == UUID.Zero) | |
565 | { | ||
566 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 4"); | ||
567 | } | ||
552 | group.ResetIDs(); | 568 | group.ResetIDs(); |
553 | 569 | if (group.UUID == UUID.Zero) | |
570 | { | ||
571 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 5"); | ||
572 | } | ||
554 | if (attachment) | 573 | if (attachment) |
555 | { | 574 | { |
556 | group.RootPart.ObjectFlags |= (uint)PrimFlags.Phantom; | 575 | group.RootPart.ObjectFlags |= (uint)PrimFlags.Phantom; |
@@ -582,7 +601,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
582 | { | 601 | { |
583 | group.SetFromItemID(itemID); | 602 | group.SetFromItemID(itemID); |
584 | } | 603 | } |
585 | 604 | if (group.UUID == UUID.Zero) | |
605 | { | ||
606 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 6"); | ||
607 | } | ||
586 | SceneObjectPart rootPart = null; | 608 | SceneObjectPart rootPart = null; |
587 | try | 609 | try |
588 | { | 610 | { |
@@ -597,7 +619,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
597 | 619 | ||
598 | m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); | 620 | m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); |
599 | } | 621 | } |
600 | 622 | if (group.UUID == UUID.Zero) | |
623 | { | ||
624 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 7"); | ||
625 | } | ||
601 | // Since renaming the item in the inventory does not affect the name stored | 626 | // Since renaming the item in the inventory does not affect the name stored |
602 | // in the serialization, transfer the correct name from the inventory to the | 627 | // in the serialization, transfer the correct name from the inventory to the |
603 | // object itself before we rez. | 628 | // object itself before we rez. |
@@ -625,7 +650,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
625 | group.ApplyNextOwnerPermissions(); | 650 | group.ApplyNextOwnerPermissions(); |
626 | } | 651 | } |
627 | } | 652 | } |
628 | 653 | if (group.UUID == UUID.Zero) | |
654 | { | ||
655 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 8"); | ||
656 | } | ||
629 | foreach (SceneObjectPart part in partList) | 657 | foreach (SceneObjectPart part in partList) |
630 | { | 658 | { |
631 | if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 659 | if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) |
@@ -638,9 +666,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
638 | part.EveryoneMask = item.EveryOnePermissions; | 666 | part.EveryoneMask = item.EveryOnePermissions; |
639 | part.NextOwnerMask = item.NextPermissions; | 667 | part.NextOwnerMask = item.NextPermissions; |
640 | } | 668 | } |
641 | 669 | if (group.UUID == UUID.Zero) | |
670 | { | ||
671 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 9"); | ||
672 | } | ||
642 | rootPart.TrimPermissions(); | 673 | rootPart.TrimPermissions(); |
643 | 674 | if (group.UUID == UUID.Zero) | |
675 | { | ||
676 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 10"); | ||
677 | } | ||
644 | if (!attachment) | 678 | if (!attachment) |
645 | { | 679 | { |
646 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) | 680 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) |
@@ -674,8 +708,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
674 | } | 708 | } |
675 | } | 709 | } |
676 | } | 710 | } |
677 | 711 | if (group.UUID == UUID.Zero) | |
678 | return rootPart.ParentGroup; | 712 | { |
713 | m_log.Debug("[InventoryAccessModule]: Inventory object has UUID.Zero! Position 11"); | ||
714 | } | ||
715 | return group; | ||
679 | } | 716 | } |
680 | } | 717 | } |
681 | 718 | ||