Issue Details (XML | Word | Printable)

Key: LIBOMV-368
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jim Radford
Reporter: Jack
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
libopenmetaverse

ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties) is not raised and Async Packet Event Handler: System.NullRef erenceException in testclient

Created: 29/Aug/08 03:07 AM   Updated: 05/Sep/08 08:50 PM
Component/s: Objects
Affects Version/s: None
Fix Version/s: 0.6.0

File Attachments: 1. File libsl per problemi prims.diff (1.0 kB)

Issue Links:
Blocks

Environment: .NET / Windows32


 Description  « Hide
I'm using trunk snapshot at revision 2181
When i use:
  • Objects.SelectObjects
  • Objects.RequestObjectPropertiesFamily

I expect to receive object names from the sim, but:

  • ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties) is not raised
  • Object.Properties.Name is not filled

Is this a bug or i'm doing something wrong? It worked up to a week ago.

Have you added a settings switch to enable that?



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jack added a comment - 30/Aug/08 06:01 PM
On TestClient i receive these:

1 avatars online> findobjects 64 test
42125 [21] ERROR - <Cattivo Diavolo>: Async Packet Event Handler: System.NullRef
erenceException: Object reference not set to an instance of an object.
at OpenMetaverse.Primitive.op_Inequality(Primitive lhs, Primitive rhs)
at OpenMetaverse.ObjectManager.ObjectPropertiesHandler(Packet p, Simulator si
m)
at OpenMetaverse.PacketEventDictionary.ThreadPoolDelegate(Object state)
42156 [23] ERROR - <Cattivo Diavolo>: Async Packet Event Handler: System.NullRef
erenceException: Object reference not set to an instance of an object.
at OpenMetaverse.Primitive.op_Inequality(Primitive lhs, Primitive rhs)
at OpenMetaverse.ObjectManager.ObjectPropertiesHandler(Packet p, Simulator si
m)
at OpenMetaverse.PacketEventDictionary.ThreadPoolDelegate(Object state)
42171 [13] ERROR - <Cattivo Diavolo>: Async Packet Event Handler: System.NullRef
erenceException: Object reference not set to an instance of an object.
at OpenMetaverse.Primitive.op_Inequality(Primitive lhs, Primitive rhs)
at OpenMetaverse.ObjectManager.ObjectPropertiesHandler(Packet p, Simulator si
m)
at OpenMetaverse.PacketEventDictionary.ThreadPoolDelegate(Object state)
[and the list continues]

it can be related.


Jack added a comment - 30/Aug/08 06:42 PM
protected void ObjectPropertiesHandler(Packet p, Simulator sim)
{
ObjectPropertiesPacket op = (ObjectPropertiesPacket)p;
ObjectPropertiesPacket.ObjectDataBlock[] datablocks = op.ObjectData;

for (int i = 0; i < datablocks.Length; ++i)
{
ObjectPropertiesPacket.ObjectDataBlock objectData = datablocks[i];
Primitive.ObjectProperties props = new Primitive.ObjectProperties();

props.ObjectID = objectData.ObjectID;
props.AggregatePerms = objectData.AggregatePerms;
props.AggregatePermTextures = objectData.AggregatePermTextures;
props.AggregatePermTexturesOwner = objectData.AggregatePermTexturesOwner;
props.Permissions = new Permissions(objectData.BaseMask, objectData.EveryoneMask, objectData.GroupMask,
objectData.NextOwnerMask, objectData.OwnerMask);
props.Category = (ObjectCategory)objectData.Category;
props.CreationDate = Utils.UnixTimeToDateTime((uint)objectData.CreationDate);
props.CreatorID = objectData.CreatorID;
props.Description = Utils.BytesToString(objectData.Description);
props.FolderID = objectData.FolderID;
props.FromTaskID = objectData.FromTaskID;
props.GroupID = objectData.GroupID;
props.InventorySerial = objectData.InventorySerial;
props.ItemID = objectData.ItemID;
props.LastOwnerID = objectData.LastOwnerID;
props.Name = Utils.BytesToString(objectData.Name);
props.OwnerID = objectData.OwnerID;
props.OwnershipCost = objectData.OwnershipCost;
props.SalePrice = objectData.SalePrice;
props.SaleType = (SaleType)objectData.SaleType;
props.SitName = Utils.BytesToString(objectData.SitName);
props.TouchName = Utils.BytesToString(objectData.TouchName);

int numTextures = objectData.TextureID.Length / 16;
props.TextureIDs = new UUID[numTextures];
for (int j = 0; j < numTextures; ++j)
props.TextureIDs[j] = new UUID(objectData.TextureID, j * 16);

if (Client.Settings.OBJECT_TRACKING)
{
Primitive findPrim = sim.ObjectsPrimitives.Find(
delegate(Primitive prim) { return prim.ID == props.ObjectID; });

if (findPrim != null)
{
lock (sim.ObjectsPrimitives.Dictionary)

{ if (sim.ObjectsPrimitives.Dictionary.ContainsKey(findPrim.LocalID)) sim.ObjectsPrimitives.Dictionary[findPrim.LocalID].Properties = props; }

}
}

FireOnObjectProperties(sim, props);
}
}

The error is raised by " if (findPrim != null) "


Jack added a comment - 30/Aug/08 07:29 PM
fixed!

Just change this

if (findPrim != null)

in this:

if ((object)findPrim != null)

or, if you know how, make the prim override for == and != able to parse nulls.


Jack added a comment - 01/Sep/08 12:37 PM
This is the diff for the solution i've found

...i've just find out how to make a diff/patch


Blue Backbite added a comment - 01/Sep/08 03:58 PM
Seems to be the same thing as LIBOMV-367