LeastFixedPoint / wave-dice-robot

Automatically exported from code.google.com/p/wave-dice-robot
0 stars 0 forks source link

Dicey refuses to roll after a die with too many sides is asked for #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Type the following string into a Wave post "[xdy]" where x is any integer
between 1 and 10000 inclusive and where y is any integer between 2^31 and
99999999999
2.Type in a second, more mundane roll like [3d5] anywhere within the same
wave post

What is the expected output? What do you see instead?
Dicy will not calculate or return any value on the first roll nor will it
return any value on any other roll after what within the same post.

What version of the product are you using? On what operating system?
The latest I think.

Please provide any additional information below.
It would appear that there is some form of error that occurs on values
greater than 2^31-1. My guess is that a signed integer is getting
overflowed somewhere by these values. It appears there is error checking,
but it does not match the actual max value, and simply just looks at the
number of characters in the number and if it is 12 or greater than it will
say that it is an invalid number.

It is important to note that this error is confined within a single post
within a wave. A reply to a post with the offending string will calculate
normally. Additionally this issue effects the post both forwards and
backwards. Meaning that if I type the offending string within a post, no
new rolls will be made anywhere within the post.

Also it appears that the error checking for a number that is too large is
done after an attempt to calculate the number as it takes a while for it to
say the input is invalid where all other calculations are just about
instantaneous. If this is the case it might be better to code the error
check before any calculations are made.

Original issue reported on code.google.com by ticw...@gmail.com on 18 Nov 2009 at 5:51

GoogleCodeExporter commented 9 years ago
I might be seeing a similar issue, caused by an embedded map?

Original comment by nate.aus...@gmail.com on 24 Nov 2009 at 9:57

GoogleCodeExporter commented 9 years ago
The issue was caused by an unhandled exception every time a blip with roll with 
out-of-
integer-range numbers is edited.

Original comment by shooshpa...@gmail.com on 25 Nov 2009 at 10:47