Hi.
I found a confusing bug today.
i was testing an app and the return random number i had was always the same in my device. to test if was some other part of my code i made a new code from a new project in corona (blank page)
i’ve made this simple code:
local centerX=display.contentWidth\*.5 local centerY=display.contentHeight\*.5 local number=math.random(1,10) local options={ text=number, fontSize=14, x=centerX, y=centerY } local text=display.newText(options)
if you start the app it should give you a random numbers from 1 to 10. it works on simulator
and on a samsung device (android 4.2.2) i had to test. but on my device (HTC 10 - android 6.01) it will give always number 10. i even shutdown the device and started again…still gives me, always 10. i changed the random values…it will give me always the highest value.
please test this simple code on your devices to see if there are more devices affected.
hope corona will check this. don’t know if they can replicate the problem without a htc 10 but the problem exist, i’ve one to prove it. don’t know if the problem is from HTC or from Corona.
btw, i’m using latest build 2017.3030
regards,
Carlos.