Issue Details (XML | Word | Printable)

Key: LIBOMV-281
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Jim Radford
Reporter: Christopher Omega
Votes: 0
Watchers: 0
Operations

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

SLProxy set command attempts to modify variable block array field.

Created: 15/Jul/08 09:57 PM   Updated: 25/Jul/08 07:52 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.6.0

File Attachments: 1. Text File setfix.patch (4 kB)


Environment: .NET / Windows32
Steps to Reproduce:
The UpdateInventoryItem packet has a variable InventoryData block.

Using this command:
/set UpdateInventoryItem InventoryData TransactionID 00608804-cb4a-f046-0d6f-b9f398d1c770

When an UpdateInventoryItem packet comes in, MagicSetField throws an exception. "Couldn't find field inventoryDataaBlock[].TransactionID"



 Description  « Hide
When the set command is used on a packet with a variable block, it looks for a field on the array of variable blocks, and fails when it doesn't find the block class field.

In Analyst.cs, the Analyst.Modify method has a FIXME comment indicating that variable blocks are not supported yet.



 All   Comments   Change History   Subversion Commits   Patches      Sort Order: Ascending order - Click to sort in descending order
Christopher Omega added a comment - 25/Jul/08 07:48 PM
Turns out, set is completely broken. The modifiedPackets Hashtable had been set up in CmdSet using BlockField keys and object values, and they tried to use a FieldInfo as a key in Modify. Bad programmer! Bad bad programmer!

I fixed that. Variable blocks are handled (crudely) if you set a field for a variable block, all the block's fields will be set to the same value. I haven't added anything that would allow you to set the blocks by index.

To prevent the problem from ever cropping up again, I made the Hashtables into generic Dictionarys with the appropriate types enforced. I think the same should be done with the loggedPackets Hashtable, but its working and I dont want to break it.