Hello,
I have figgured out a bug.
I have also already broken it down as far as it was possible for me.
(I have already reported it as a bug but did not receive an email yet with a case ID)
If somebody has encoutered similar issues or knows a workaround I’d love to hear from you
Here it goes:
I have an app running on 60 FPS.
I also expect (at least) 60 touch events per second on a touch event listener.
Here is the project sample that works perfectly fine:
config.lua
application = { content = { width = 1080, height = 1920, scale = "letterBox", fps = 60, xAlign = "center", yAlign = "center", }, }
main.lua
local widget = require( "widget" ) local spinningObj = display.newRect( 100, 100, 100, 100 ) function globalFPSTimerDummy(e) --spinningObj.rotation = spinningObj.rotation + 3 --if spinningObj.rotation \> 360 then -- spinningObj.rotation = spinningObj.rotation - 360 --end end Runtime:addEventListener( "enterFrame", globalFPSTimerDummy ) local ctr = 0 local function printThis(e) print("hey there ", ctr) ctr = ctr + 1 end local levelSelectionScrollView levelSelectionScrollView = widget.newScrollView { width = 1080, height = 1920, scrollWidth = 1080, scrollHeight = 1920, hideBackground = true, listener = printThis, } local someRect = display.newRect( 500, 500, 100, 100 ) someRect.strokeWidth = 8 someRect:setFillColor( 0.0 ) levelSelectionScrollView:insert(someRect)
This project sample (consiting only of the main and the config file) shows the print “hey there some#” 60 times per second.
All I do in the program is swiping on the screen up and down.
(You can see the rect moving smoothly)
So now it get weird:
I uncomment the lines:
--spinningObj.rotation = spinningObj.rotation + 3 --if spinningObj.rotation \> 360 then -- spinningObj.rotation = spinningObj.rotation - 360 --end
recompile and reinstall … and now
The print “hey there some#” occures only 30 times per second.
While scolling the scrollView “someRect” you can see the difference it makes having 30 fps.
(The rect is now not as smooth as it used to be.
However!!! - the scroll view transition that scrolls the rect back in place is smooth)
Please Note:
Sometimes this error does not occur immediately.
In this case susspending the app by pressing the home button and reopening it like 3 seconds later makes the error occur.
In our main project we did not observe this error with android.
To test this I have used
Corona Version 3012
Compiled on a MAC.
Device: IPAD Air 2 and IPhone 6S
Thank you for the good work really appreciate it