error with randoms when UpdateConstruction()

ccambre shared this problem 1 week ago
Solved

I'm making a lot of exercises with random generated values. Yesterday, for the first time a strange thing occured. I defined a serie of randoms. When making a button with just 1 command: UpdateConstruction() a lot of these randoms turned to be not defined. Between them

aaplus=10*RandomBetween(2, 6) is recalculated and another bbplus equallly random defined isn't.

If I recall bb out of the list with previous definitions trying to redefine it, I get a failure message.

It works to define another number ccplus with the same random definition, and also the recalculation works. But when I define a 4th object ddplus with this definition, ccplus turns out to be not defined when clicking on the button, whereas ddplus is no problem. SO there's definitely a strange problem with randoms.

I'm using version 5.0.464 Windows 10

chris

Comments (7)

photo
1

a second example:

I defined

- the numbers a, b, c, d

- the random number aa=RandomBetween(1,4) and likewise bb, cc, and dd

- the number ga = a * 10 * aa and likewise gb, gc, and gd

All these number are generated and appear in the Algebra view. When recalculating them with UpdateConstruction() the numbers ga, gb, gc, and gd become not defined. Where all randoms as such are recalculated the problem seems to be making calculations with random generated values.

This is illustrated in a the most simple use of random calculation. First c= a+b is wrongly calculated, then when recalculating with the button it gets not-defined

chris

12d40b1ae0fd50d75dbcba964b65244b

6c400e7c63a4e49bb737710b943a3735

photo
1

As the next test I tried the to produce the same file in GG5 as well in GG6, When I make it it in GG6, download and save it as a ggb file and doubbleclick on it, it opens in GG5 and there's no problem at all. When I make it directly in GG5 I still have the problem that the numbers g1 and g2, calculated out of ramdom generated numbers produce an error.

If I try to open the earlier sent files I cannot open them. So there's definitly a GG5 problem.

ff3fd6d71a2054dc1613832779af3828

Files: g1g2.ggb
photo
1

I have same problem in GG5 win7. More: when ga get undefined the properties of ga turn blank/j8kRm3U7J4PXwAAAABJRU5ErkJgggA=

photo
1

Ahora, tras el n-ésimo intento, no soy capaz de repetir el error


¿hay que esperar a que algún java sea reinstalado o algo parecido?

photo
1

indeed, I now I can create things similar to the ones earlier sent, so that's a great relief.

Like mathmagic I can only guess the reason of it. Whatever the reason and/or the fixing I can confirm it seems to be ok.

I'll change the status to 'solved' an hope it can stay in it

chris

photo
1

Please try the new version (v465)

photo
1

This morning I worked without any problem on similar files as above, so things seem to be OK.

chris

© 2018 International GeoGebra Institute