Sad post, Terrible BUG. All I think about Corona team.

I understand, the Corona SDK is very cool, and I like it, and I never would have thought about switching to Marmalad, for example. But now I am thinking about :unsure:. 

The miserable support and no internal testing. Relation of the Corona team to his duties depresses me. How can you (Corona team) develop this big number of some kind of third-party plug-ins when it is already a year (!!!) has not fixed the problem with the right touch handler for android system?

To support : The great developers, Are you at least once tested how your scrollview works on some android devices? (HTC One X, for example). Are you tested (dumped) queue of touch events? 

Scrollview works almost accidentally, fast scrolling scrolls the other way. I have implemented self parallax scrollview and it works … on iOS. BUT, on Android it do not work as well as your Scrollview, because you terribly implemented touch events handler on Android. 

I hope, you missed this bug and you’ll fix it asap

and I hope you’ll pay more attention to the purity of your Corona engine than making money on the implementation of a third party unnecessary nonsense.

Thank you in advance,

Best Regards,

Nikolay,

www.xi-art.com

To support team:
Make scrollview with big group and big number of objects, build it for android and install on HTC One X. Try to do fast scroll… and you’ll see all.

Hi Nikolay,

It’s OK to describe a bug in the forums, but you should also file a bug report at http://developer.coronalabs.com/content/bug-submission with a test case that exhibits the issue.  Also, you should always specify the Corona build you’re using.

In your case, I reported what sounds like the same bug a while ago, and it was fixed in Daily Build 1149.  So, if you’re still using the last public release (build 1143), you should update to the latest public release (1202) and see if it resolves your issue.  If not, then you should provide more information – does this behavior happen only on the HTC One X, on some other Android devices, or an all devices?  Can you get it to happen in the Simulator?  That information is helpful in narrowing down the possible cause.

  • Andrew

Hi Andrew,

Thank you for post,

but I have tested on latest build (1202), and scroll on HTC One X works more better, but sometimes lost events and very hard to do fast scroll. On on China top devices from ChinaMobile (Z9 and V89 ZLH HD) this fix does nothing (they  works accidentally ).  

My code:

        local function createFriendButton( i )            if not scrollview then return end             local ok             local friend = ui:createButton( -- CREATE ANY IMAGES WITH TEXT HERE -- )             local plus = ui:createImageRect( friend, "i/m/b\_plus.png", 57, 57, 170, 0, true, 1 )             ok = ui:createImageRect( friend, "i/m/goal\_ok.png", 80, 80, 174, -4, false, 1 )             return friend         end         for i=1,#FRIENDS do             local n = i             local r = display.newRect( fgroup, -15, i \* 90 - 90, 475, 90 ); r:setFillColor( 94, 59, 1, 128 )             timer.add( timer.performWithDelay( i\*33, function() createFriendButton( n ) end ) )         end         local r = display.newRect( fgroup, -15, (#FRIENDS+1) \* 90 - 90, 475, 30 ); r:setFillColor( 94, 59, 1, 128 )         scrollview = require("widget").newScrollView{             width = 465, height = 560,             left = 90, top = display.screenOriginY + 185,             scrollWidth = fgroup.width, scrollHeight = fgroup.height,             horizontalScrollDisabled = true,             hideBackground = true,              maskFile = "i/m/mmask.png",         }          scrollview:insert( fgroup )         window:insert( scrollview )  

Thank.

What does it mean that it “works accidentally”?  You need to be more specific.  Do you mean that the scrollView simply moves by itself, randomly, without you even touching the screen?  I would find that extremely surprising.

You also said there are “sometimes lost events” and that it’s “hard to do fast scroll”.  You need to be more specific here too.  What exact events are missing that you expect to see.  What happens when you try to scroll quickly?

Also, the most important question is – do you see any of this behavior in the Corona Simulator, or only on actual devices?

  • Andrew

Are you using the seriously outdated ui library for buttons?

I’m also confused by:

[lua]timer.add( timer.performWithDelay( i*33, function() createFriendButton( n ) end ) )[/lua]

What does timer.add refer to? As far I know there’s no method on the timer API named add(), and I’m hoping you wouldn’t be running the risk of causing a namespace conflict by having your own structure named timer???

You seemed very dramatic in your original post, but I’d say there’s room for improvement in your code (that may or may not help things)

timer.add - It is part of improved Corona timer class. This updated class keeps track of memory and clears it as the the any timer call finished :). Also I improved string (unicode), transitions (automated memory tracking, destroing and memory clearing after finishing), ui, display, network, audio and other … 

Do not pay attention to my “sneaky” code :). I am certified IBM C++ programmer with 20 years experience, and I think I can afford to improve corona sdk for personal convenience and for more stable work :slight_smile:

For example another code with same issue (from game Towers on native Corona code :stuck_out_tongue:  ):

            local aGroup = display.newGroup()             local counter = 0             local gr = graphics.newGradient( {181,134,74}, {254,247,174}, "down" )             for i=1,5 do                 for k,v in pairs( trophiesTable ) do                     --print(k,v)                     if (v[i]) then                         local p = v[i]                         local tx, ty = 100, counter \* 50                         local ti\_back = display.newImageRect( aGroup, "i/menu/ach\_back.png", 42, 42 ); ti\_back.x, ti\_back.y = tx, ty; ti\_back.isVisible = false                         local ti = display.newImageRect( aGroup, "i/menu/ach.png", 42, 42 ); ti.x, ti.y = tx, ty                         local ztText1 = display.newText( aGroup, p.caption, 0, 0, "broadsheet", 21)                         ztText1:setReferencePoint( display.CenterLeftReferencePoint )                         ztText1.x, ztText1.y = tx + 25, ty - 8                         ztText1:setTextColor( 254, 247, 174 )                         local ztText = display.newText( aGroup, p.name, 0, 0, "broadsheet", 10)                         ztText:setReferencePoint( display.CenterLeftReferencePoint )                         ztText.x, ztText.y = tx + 27, ty + 6                         ztText:setTextColor( 250, 243, 198 )                         local line = display.newImageRect( aGroup, "i/menu/t\_line.png", 215, 1 ); line.x, line.y = tx + 120, ty + 15                         if (not p.shown) then                              ztText:setTextColor( gr ); ztText1:setTextColor( gr );                              ztText1.text = "Achievement"                             ztText1:setReferencePoint( display.CenterLeftReferencePoint )                             ztText1.x, ztText1.y = tx + 25, ty - 8                             ti.isVisible = false                              ti\_back.isVisible = true                          end                         counter = counter + 1                     end                 end             end              local scrollView = require("widget").newScrollView{                 width = 440, height = 204,                 left = 20, top = 78,                 scrollWidth = 440, scrollHeight = aGroup.height,                 horizontalScrollDisabled = true,                 hideBackground = true, maskFile = "i/menu/sub\_mask.png",             }              scrollView:insert( aGroup )             aGroup.x, aGroup.y = 20, 30                 pGroup:insert( scrollView )  

This BUG on some Android devices only!

on HTC One X scrollView sometimes stops scrolling immediately after the the touch ended (when you try to do fast scrolling or scroll quickly)

on two china devices scrollView scrolls in negative direction (when you try to do fast scrolling or scroll quickly) :( 

I implemented my scrollview (for parallax map) and got the same symptoms - on simulator and iOS all work OK, but on china devices the same issue. Therefore I think it is problem in events handling

Thanks to all!

I’m not sure at all but I wander whether requiring the widget library inline is causing a possible overhead. Is there any reason why you’re not requiring at the start of the module?

Now of course I’ll try, but you’re probably in deep delusion :), because in my own parallax scrollview I got the same symptoms (without any inline requiring)

Is there any reason why you haven’t isolated a positive test case using Corona widgets and sent a bug report? If possible, also try to test a negative: a standard, simple scrollView on the devices, so that you know the fault is not with the device performance.

Hi Nikolay,

It’s OK to describe a bug in the forums, but you should also file a bug report at http://developer.coronalabs.com/content/bug-submission with a test case that exhibits the issue.  Also, you should always specify the Corona build you’re using.

In your case, I reported what sounds like the same bug a while ago, and it was fixed in Daily Build 1149.  So, if you’re still using the last public release (build 1143), you should update to the latest public release (1202) and see if it resolves your issue.  If not, then you should provide more information – does this behavior happen only on the HTC One X, on some other Android devices, or an all devices?  Can you get it to happen in the Simulator?  That information is helpful in narrowing down the possible cause.

  • Andrew

Hi Andrew,

Thank you for post,

but I have tested on latest build (1202), and scroll on HTC One X works more better, but sometimes lost events and very hard to do fast scroll. On on China top devices from ChinaMobile (Z9 and V89 ZLH HD) this fix does nothing (they  works accidentally ).  

My code:

        local function createFriendButton( i )            if not scrollview then return end             local ok             local friend = ui:createButton( -- CREATE ANY IMAGES WITH TEXT HERE -- )             local plus = ui:createImageRect( friend, "i/m/b\_plus.png", 57, 57, 170, 0, true, 1 )             ok = ui:createImageRect( friend, "i/m/goal\_ok.png", 80, 80, 174, -4, false, 1 )             return friend         end         for i=1,#FRIENDS do             local n = i             local r = display.newRect( fgroup, -15, i \* 90 - 90, 475, 90 ); r:setFillColor( 94, 59, 1, 128 )             timer.add( timer.performWithDelay( i\*33, function() createFriendButton( n ) end ) )         end         local r = display.newRect( fgroup, -15, (#FRIENDS+1) \* 90 - 90, 475, 30 ); r:setFillColor( 94, 59, 1, 128 )         scrollview = require("widget").newScrollView{             width = 465, height = 560,             left = 90, top = display.screenOriginY + 185,             scrollWidth = fgroup.width, scrollHeight = fgroup.height,             horizontalScrollDisabled = true,             hideBackground = true,              maskFile = "i/m/mmask.png",         }          scrollview:insert( fgroup )         window:insert( scrollview )  

Thank.

What does it mean that it “works accidentally”?  You need to be more specific.  Do you mean that the scrollView simply moves by itself, randomly, without you even touching the screen?  I would find that extremely surprising.

You also said there are “sometimes lost events” and that it’s “hard to do fast scroll”.  You need to be more specific here too.  What exact events are missing that you expect to see.  What happens when you try to scroll quickly?

Also, the most important question is – do you see any of this behavior in the Corona Simulator, or only on actual devices?

  • Andrew

Are you using the seriously outdated ui library for buttons?

I’m also confused by:

[lua]timer.add( timer.performWithDelay( i*33, function() createFriendButton( n ) end ) )[/lua]

What does timer.add refer to? As far I know there’s no method on the timer API named add(), and I’m hoping you wouldn’t be running the risk of causing a namespace conflict by having your own structure named timer???

You seemed very dramatic in your original post, but I’d say there’s room for improvement in your code (that may or may not help things)

timer.add - It is part of improved Corona timer class. This updated class keeps track of memory and clears it as the the any timer call finished :). Also I improved string (unicode), transitions (automated memory tracking, destroing and memory clearing after finishing), ui, display, network, audio and other … 

Do not pay attention to my “sneaky” code :). I am certified IBM C++ programmer with 20 years experience, and I think I can afford to improve corona sdk for personal convenience and for more stable work :slight_smile:

For example another code with same issue (from game Towers on native Corona code :stuck_out_tongue:  ):

            local aGroup = display.newGroup()             local counter = 0             local gr = graphics.newGradient( {181,134,74}, {254,247,174}, "down" )             for i=1,5 do                 for k,v in pairs( trophiesTable ) do                     --print(k,v)                     if (v[i]) then                         local p = v[i]                         local tx, ty = 100, counter \* 50                         local ti\_back = display.newImageRect( aGroup, "i/menu/ach\_back.png", 42, 42 ); ti\_back.x, ti\_back.y = tx, ty; ti\_back.isVisible = false                         local ti = display.newImageRect( aGroup, "i/menu/ach.png", 42, 42 ); ti.x, ti.y = tx, ty                         local ztText1 = display.newText( aGroup, p.caption, 0, 0, "broadsheet", 21)                         ztText1:setReferencePoint( display.CenterLeftReferencePoint )                         ztText1.x, ztText1.y = tx + 25, ty - 8                         ztText1:setTextColor( 254, 247, 174 )                         local ztText = display.newText( aGroup, p.name, 0, 0, "broadsheet", 10)                         ztText:setReferencePoint( display.CenterLeftReferencePoint )                         ztText.x, ztText.y = tx + 27, ty + 6                         ztText:setTextColor( 250, 243, 198 )                         local line = display.newImageRect( aGroup, "i/menu/t\_line.png", 215, 1 ); line.x, line.y = tx + 120, ty + 15                         if (not p.shown) then                              ztText:setTextColor( gr ); ztText1:setTextColor( gr );                              ztText1.text = "Achievement"                             ztText1:setReferencePoint( display.CenterLeftReferencePoint )                             ztText1.x, ztText1.y = tx + 25, ty - 8                             ti.isVisible = false                              ti\_back.isVisible = true                          end                         counter = counter + 1                     end                 end             end              local scrollView = require("widget").newScrollView{                 width = 440, height = 204,                 left = 20, top = 78,                 scrollWidth = 440, scrollHeight = aGroup.height,                 horizontalScrollDisabled = true,                 hideBackground = true, maskFile = "i/menu/sub\_mask.png",             }              scrollView:insert( aGroup )             aGroup.x, aGroup.y = 20, 30                 pGroup:insert( scrollView )  

This BUG on some Android devices only!

on HTC One X scrollView sometimes stops scrolling immediately after the the touch ended (when you try to do fast scrolling or scroll quickly)

on two china devices scrollView scrolls in negative direction (when you try to do fast scrolling or scroll quickly) :( 

I implemented my scrollview (for parallax map) and got the same symptoms - on simulator and iOS all work OK, but on china devices the same issue. Therefore I think it is problem in events handling

Thanks to all!

I’m not sure at all but I wander whether requiring the widget library inline is causing a possible overhead. Is there any reason why you’re not requiring at the start of the module?

Now of course I’ll try, but you’re probably in deep delusion :), because in my own parallax scrollview I got the same symptoms (without any inline requiring)

Is there any reason why you haven’t isolated a positive test case using Corona widgets and sent a bug report? If possible, also try to test a negative: a standard, simple scrollView on the devices, so that you know the fault is not with the device performance.