[vos-d] Terangreal crash
Peter Amstutz
tetron at interreality.org
Tue Apr 17 09:02:04 EDT 2007
On Tue, Apr 17, 2007 at 11:00:09AM +0200, Karsten Otto wrote:
> Hi all,
>
> Reading about Trer'angreal crashing or hanging, I just recently
> discovered a small bug in the message handling of the 0.23.0 release.
> Of course this is regarding the VOP protocol, which probably nobody
> except me uses anymore, so I am not sure anybody else is affected :-)
>
> During normal operation wxterangreal sometimes came to a screeching
> halt with the obscure error message "Remote site error: Protocol
> violation: negative number attribute"
>
> I tracked this down to libs/vos/vos/
> messageblock.cc:XmlParser::parseNumberAttr,
> which basically does this:
>
> int res = (int)strtoul(start+pos+1, &end, 10);
> if (res < 0) throw ProtocolError(...)
>
> [snip]
>
> Is the range check actually necessary in this method? I don't have
> the time to track this down...
You're right. I'm an idiot. The variable "res" should be an unsigned
int, and the range check is unnecessary. I have no idea why that code
is there, and I'll take it out.
> Despite of this obvious bug, I am pleased to see that VOP still sort
> of works despite the long neglect :-)
I'm glad it's been useful to you. It's also proven to us the value of
supporting multiple protocols that focus on different aspects like
performance or ease of interoperability -- hopefully s5 will finally
support multiple protocols within a single session :-)
--
[ Peter Amstutz ][ tetron at interreality.org ][ peter.amstutz at gdit.com ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.interreality.org/pipermail/vos-d/attachments/20070417/43ab74f9/attachment.pgp
More information about the vos-d
mailing list