Sunday, July 1, 2007

OpenSim in grid mode error...

*geek mode on*

Started playing with OGS (Open Grid Services) for opensim, and spent a wild amount of time with a "simple" error - the coordinates in the client profile were not the same as the coordinates as the coordinates of the sim (997,996).

The stack trace looked as follows:

System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.Parse (System.String uriString) [0x00000]
at System.Uri.ParseUri () [0x00000]
at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000]
at System.Uri..ctor (System.String uriString) [0x00000]
at System.Net.WebRequest.Create (System.String requestUriString) [0x00000]
at Nwc.XmlRpc.XmlRpcRequest.Send (System.String url, Int32 timeout) [0x00000]
at OpenSim.Framework.User.UserProfileManager.CustomiseResponse (System.Collections.Hashtable& response, OpenSim.Framework.User.UserProfile theUser) [0x00000]
at OpenSim.Framework.User.UserProfileManager.XmlRpcLoginMethod (Nwc.XmlRpc.XmlRpcRequest request) [0x00000]

Hopefully it saves some time to others =)

And a small addition to LoadFromGrid() method in the Common/OpenSim.Framework/SimProfile.cs, which would have helped, would look something like this:

if ((string)RespData["error"] != "") {
Console.WriteLine("Error from grid server: " + (string)RespData["error"]);

I'm writing this since I saw at least one other soul hitting the same problem - so mostly for google feeding.

No comments: