[Opensim-dev] Partial libSL.Packet fix submitted

Stefan Andersson stefan at tribalmedia.se
Thu Dec 20 08:22:51 UTC 2007


Sorry, just had to take the opportunity to point out that this is why you avoid using and overriding or using ToString() at all. Formatting should be application and context specific just because if it's not, changing it later is so damn hard. Not to mention the complexity of trying to find out exactly WHY that Formatter-dependant string doesn't turn out the way you'd expect.
 
I'd say the list is:
1) The formatting should be done by the serializing context.
2) Of course we also need to update the ones that are in the database (and correct the database datatypes as we go along - neither binary nor varchar is the right way.)
3) Never ever again rely on ToString or related functions on non-system types./Stefan



> From: johan at ngigroup.com> To: opensim-dev at lists.berlios.de> Date: Thu, 20 Dec 2007 16:37:19 +0900> Subject: Re: [Opensim-dev] Partial libSL.Packet fix submitted> > This problem is not caused by my work, but of changes in later versions> of LibSL. It has changed from using ToString (unhyphenated) and> ToStringHyphenated(), to only using ToString() (hyphenated). This means> that there is no way of getting an unhyphenated string from libSL> anymore. I changed all instances of ToStringHyphenated() in OpenSim to> ToString(), but I didn't realize that there would be a problem with> plain ToString() calls.> > The basic problem is that we are relying on a libSL behaviour that is> outside our control, and has changed. If we want to keep up to date with> libSL I suggest that the problem is solved.> > Possible solutions:> 1. Identify the problematic ToString() calls and use a utility function> (Util.ConvertToUnhyphentated) to fix them like before.> 2. Write scripts to update the current databases to use hyphenated> GUID:s> 3. Change the code not to use ToString at all.> > I prefer option 3, and to be compatible it could output unhyphenated> GUIDs. At least this means that we won't have problems every time libSL> is refactored (and ToString is meant as a debug tool, not as a provider> of keys to a database)> > > On Wed, 2007-12-19 at 23:55 -0700, Nebadon Izumi wrote:> > I got the following errors on my grid when i updated to 2765> > on the machine that is running the UGAI and Sim i got the following> > errors:> > http://www.pastebin.ca/824868> > > > on the remote sim servers i got these following errors:> > http://www.pastebin.ca/824870> > > > needless to say my Grid does not run at all when updating to r2765.> > > > > > On Dec 19, 2007 10:55 PM, Johan Berntsson <johan at ngigroup.com> wrote:> > >From the IRC:> > > > 02:44:09 PM) CIA-1: opensim: chi11ken * r2765 /trunk/ (43> > files in 20> > dirs): Added patch from Johan. First attempt to solve the> > LibSL.Packet> > GC problem. Works with LibSL rev>1532> > (02:50:40 PM) joha2: The patch implements a PacketPool> > (currently in > > UPDServer.cs) which recycles packages. It is used by all> > incoming> > packets, and the RegionHandshakePacket, and can easily be> > extended to> > all outgoing packages later. I have submitted a libSL patch> > which is> > included from rev. 1532, but the libsecondlife.dll version in> > OpenSim is> > based on rev 1498 with these files from the later version> > (mapgenerator.cs, Types.cs, template.cs). Rev. 1532 compiles> > and works,> > but the avatar's clothes are gray, so something is wrong. I> > don't think > > this is caused by my changes, but by other changes in LibSL,> > and I'm> > hoping that someone can figure out what's wrong. Until then> > 1498 + the> > patched files from 1532 should be ok.> > ---> > I will need to expand the fix to work for all packets and do> > performance > > testing to verify that it works better, but this should work> > for now.> > > > Cheers,> > Johan> > > > > > _______________________________________________> > Opensim-dev mailing list> > Opensim-dev at lists.berlios.de> > https://lists.berlios.de/mailman/listinfo/opensim-dev> > > > _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071220/1295ce70/attachment-0001.html>


More information about the Opensim-dev mailing list