2.5 bug reports

Simulated dice for role playing games
kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Thu Jun 10, 2010 3:42 pm

The fact that The Dicenomicon aggressively evaluates everything (rather than take a lazy approach) is probably to blame for crashing when I do this:

Code: Select all

for @I in (1 ... Rd6) do Yd6 end
The problem is that the first roll does what it does, but then when you reroll all the dice, you change the number of dice that are being rolled. If the number on the Rd6 decreases, you're safe (as you ignore any dice in excess). If the number on the Rd6 increases, you crash the app.

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: 2.5 bug reports

Post by gandreas » Thu Jun 10, 2010 5:32 pm

That's an ugly bug - the whole design is that you should be able to reroll any die after the fact. Changing the result of one die mustn't change the number of dice rolled.

Of course,there are two possible solution- either force the iterating list to be deterministic, or to prohibit rolls from within the body of the loop. Neither are perfect (since valid vases would break in either of those cases), though the latter is much easier to implement and explain.

Regardless, it is definitely a bug, and a bad bug since it is a problem with the design, instead of just the implementation...

kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Fri Jun 11, 2010 9:01 pm

Would something like introducing scope help, or would it defeat your design? By which I mean that dice are introduced in stages. So given

Code: Select all

if Rd6>3 then Gd6 else Yd6 end
It would appear to roll only the red die, and depending on the result a green die or a yellow die would appear and roll (all three will be "set to roll", but two are just hidden, say). If the red die were to be rerolled the green/yellow die would disappear (both would be "set to roll") and that part would have to be re-evaluated.

Just a thought.

On another thought, another for-loop edge case worth testing is this:

Code: Select all

@1 <- (d6).
for @I in @1 do @1 <- (@1, d6) end.
@1
I have no idea what happens...

jazzman
Honored
Posts: 63
Joined: Mon May 31, 2010 1:13 am
IQ Test: Orange

Re: 2.5 bug reports

Post by jazzman » Sun Jun 13, 2010 10:37 pm

Noticed with the ENUM parameter, the value dial remembers what you manually selected for the previous roll, where as the the actual value is the default value. Additionally, to roll that previouly selected item, you would have to change from it to something else and back.

One way to recreate this is when using the 4e 1.1 character sheet.

From the sheet, first touch STR to bring up the Check Roll. Then select dex from the dial and roll the dice. Then go back to the sheet and touch Wis. The "Stat" lists Wis, but the dial still shows dex. If you roll the die at that point it rolls against Wis. If you actually wanted to roll against Dex again, you would have to change it to one of the other 5, then back to dex. At that point "Stat" will list Dex and will roll dex.

This is not an issue with just the character sheet, it can be recreated within favorite rolls as well.

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: 2.5 bug reports

Post by gandreas » Mon Jun 14, 2010 9:50 am

kelvSYC wrote:Would something like introducing scope help, or would it defeat your design? By which I mean that dice are introduced in stages. So given

Code: Select all

if Rd6>3 then Gd6 else Yd6 end
It would appear to roll only the red die, and depending on the result a green die or a yellow die would appear and roll (all three will be "set to roll", but two are just hidden, say). If the red die were to be rerolled the green/yellow die would disappear (both would be "set to roll") and that part would have to be re-evaluated.

Just a thought.
I've actually tried that - it was miserable, because all the dice would be fed into the physics engine, and invisible dice would still cause the other dice to bounce and move, making for a very frustrating result.

I might add in an "unused" die indication (perhaps the whole thing would be shaded black or something), but dice appearing/disappearing was quite jarring and confusing - and I even knew what was going on!
On another thought, another for-loop edge case worth testing is this:

Code: Select all

@1 <- (d6).
for @I in @1 do @1 <- (@1, d6) end.
@1
I have no idea what happens...
It rolls two dice. The for loop grabs the current value of @1. The @1 <- (@1, d6) just gives a new value to @1, but does not change anything containing the old value of @1. Values are all effectively immutable - just like:

Code: Select all

@1 <- 3.
@2 <- @1.
@1 <- @1 + 1.
(@1,@2)
will evaluate "4, 3"

kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Mon Jun 14, 2010 2:06 pm

Interesting. Didn't notice that before. (Then again, a for loop in a functional language is something I haven't seen before either - most of the time I'm treating the Dicenomicon language is "mostly imperative with the . operator as a statement separator")

So I take it that it would be virtually impossible to add something like a while loop or some imperative-style loop control (break/continue).

I have to apologize for breaking holes, but I've just been interested in CFGs and compilers in general (I've built a few, so...).

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: 2.5 bug reports

Post by gandreas » Mon Jun 14, 2010 3:27 pm

Try to break all the holes you want (since those are usually bugs, and fixing bugs = good)

It might help to view it more as a "data flow" language, which happens to automatically work in parallel for lists. (At one time I had envisioned using some sort of "node & wire" graphic model, but unfortunately, that UI model sucks on a small touch based UI)

And the "." operator is just like any other operator, it just happens to be a really simple one that, but for side effects, would be useless.

kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Tue Jun 15, 2010 10:18 pm

Oh man. Totally missed the boat on that one. Dataflow languages and functional languages are completely different beasts. Now a lot of what I ask makes sense in context.

However, I just find that the word "variable" is quite misleading, since from a dataflow language standpoint, The Dicenomicon only has one type of variable - the die. Similarly, the function has one type of variable - the parameter. (In terms of dataflow languages, @ and <- merely assign names to expressions for easy reference, and reassigning names will confuse a lot of people who are used to imperative or functional styles - see the "self-expanding list" above).

Still, the fact that you can still have what I call the (d6)d6@ (which, while useful in some RPG context, is nevertheless inappropriate for one roll) is pretty serious. But I can't think of any legitimate case where you would have a die expression in the for declaration and another in the for scope itself, so maybe the solution is to ban the use of both at the same time. The grammar would then be more complicated (maybe not context-free), but it avoids the (d6)d6@ problem...

kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Wed Jun 23, 2010 6:40 am

New bug to report:

The Dicenomicon Server will not apparently accept input on parameter info past the fourth parameter. On the iPhone interface, you can enter info on parameters past the fourth, but when the roll is used you can't modify these parameters.

Here's some code from "Conquest of the Empire" which makes use of six (five entered) parameters as a test case:

Code: Select all

#6 <- #1 + #2 + #3 + #5.
@1 <- #6tConquest6.
@INFANTRY <- #1 /\ sum(for @I in @1 do if @I = "Infantry" then 1 else 0 end end).
@CAVALRY <- #2 /\ sum(for @I in @1 do if @I = "Cavalry" then 1 else 0 end end).
@CATAPULT <- (#3 + #4) /\ sum(for @I in @1 do if @I = "Catapult" then 1 else 0 end end).
"%1 Hits" % (@INFANTRY + @CAVALRY + @CATAPULT)

kelvSYC
Honored
Posts: 73
Joined: Sat May 29, 2010 5:16 pm
IQ Test: Orange

Re: 2.5 bug reports

Post by kelvSYC » Wed Jun 23, 2010 6:44 am

New info on existing bug:

As you may or may not know, custom dice may or may not appear in the roll bar. For dice with custom roll graphics, it appears that if it doesn't appear, you can go into the menu and back out and the dice will appear in the roll bar. However, once you do that it appears you can't scroll the roll bar. Finally, this effect appears to repeat itself when you change game rooms...

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: 2.5 bug reports

Post by gandreas » Wed Jun 23, 2010 2:43 pm

kelvSYC wrote:New bug to report:

The Dicenomicon Server will not apparently accept input on parameter info past the fourth parameter. On the iPhone interface, you can enter info on parameters past the fourth, but when the roll is used you can't modify these parameters.
I've fixed the server's web page to handle up to 6 parameters, and found where it was getting confused when trying to switch to/from #5 and #6 in the UI.

I love bugs that are easy to reproduce and just as easy to fix...

jazzman
Honored
Posts: 63
Joined: Mon May 31, 2010 1:13 am
IQ Test: Orange

Re: 2.5 bug reports

Post by jazzman » Sat Jun 26, 2010 8:00 am

Got a new one. Currently running iOS4

Trying to use the checkbox parameter. It's not allowing me to check it.

Since I was having problems, I went basic, created a new Favorite Roll and only had the parameter in it:
#1

Set the parameter to checkbox, default 1
Then ran the roll. Touching it did nothing, there is a number pad to the right. I could enter any number into the number pad. When pressing the roll, the result was the number I entered. So if I entered 12, the result would be 12 and not 1 or 0.

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: 2.5 bug reports

Post by gandreas » Sun Jun 27, 2010 3:00 pm

That counts as two bugs - first, the checkmark isn't being drawn (it appears to work, the UI doesn't update). Second, when there is no numeric/enum parameter, the number pad should be hidden all together.

JeFurry
Posts: 6
Joined: Wed Aug 20, 2008 8:31 am

Re: 2.5 bug reports

Post by JeFurry » Tue Jul 06, 2010 6:12 pm

I'm surprised nobody else is reporting this: on both an iPad (OS 3.2) and iPhone 4 (iOS 4.0), both independently set up from a virgin state without restoring old backups full of cruft, and neither hacked or jailbroken in any way, I'm getting the same problem.

I download and install Dicenomicon 2.5, either from iTunes or direct from the App Store. I run the app and make several rolls, and all is well. The iPad/iPhone then goes to sleep if undisturbed for a couple of minutes between rolls. When I re-wake and unlock, the screen is frozen and unresponsive. Sometimes by random fiddling, I can get it to resume rolling without quitting, but although a roll total appears on screen, no dice ever visibly move. I have to quit and relaunch the app. Once only, it has recovered. I didn't do anything different as far as I knew.

Is this an isolated problem? It seems unlikely as it affects both my devices, despite them being independently set up...

Any information welcome...

jazzman
Honored
Posts: 63
Joined: Mon May 31, 2010 1:13 am
IQ Test: Orange

Re: 2.5 bug reports

Post by jazzman » Tue Jul 06, 2010 9:30 pm

JeFurry wrote:I'm surprised nobody else is reporting this: on both an iPad (OS 3.2) and iPhone 4 (iOS 4.0), both independently set up from a virgin state without restoring old backups full of cruft, and neither hacked or jailbroken in any way, I'm getting the same problem.

I download and install Dicenomicon 2.5, either from iTunes or direct from the App Store. I run the app and make several rolls, and all is well. The iPad/iPhone then goes to sleep if undisturbed for a couple of minutes between rolls. When I re-wake and unlock, the screen is frozen and unresponsive. Sometimes by random fiddling, I can get it to resume rolling without quitting, but although a roll total appears on screen, no dice ever visibly move. I have to quit and relaunch the app. Once only, it has recovered. I didn't do anything different as far as I knew.

Is this an isolated problem? It seems unlikely as it affects both my devices, despite them being independently set up...

Any information welcome...
I've seen the same, though I think I found a reliable way to restart things. I would just select the "f" button in top right. Selecting any roll(favorite or on the character sheet) or hitting the x to cancel will unfreeze the app.

Post Reply