2706-2710 version is broken!

i had a project that worked fine till version 2705. after upgrade it to 2706-2710 it gives me this error:

"?:0: attempt to perform arithmetic on field ‘_scrollWidth’ (a nil value) stack traceback:

?: in function ‘_listner’

?: in function <?:167>

?: in function <?:221>

i’m not going to upload my project that have more than 20k lines to bug report.

it gives me the error in both window and mac simulator.

Regards.

+1, I’m getting the same error as above. The stack trace does not relate to any of my code so must be a change within the widgets library.

yes. it’s from widget library. problem in my case is in scrollviews. when i try to delete a scrollview gives me that error. using same code more than 2 years now started the error.

Are any of you using SSK in your projects? If so, be sure to open ssk/loadSSK.lua and set the ‘enableExperimental’ flag to false.

I don’t think this is the problem, but just in case I wanted to be sure.

-Ed

Hi all,

I’ve alerted engineering to investigate this a.s.a.p. Thanks for reporting it.

Brent

Hi all,

I’m going to need a bug report on this, because I personally can’t reproduce the error using 2710 and a basic “destroy” event on a Composer scene containing a ScrollView. In other words, I need to see how you’re setting this up in the most simple reproducable case before we can move forward on fixing it.

Thanks,

Brent

Brent, 

I think it’s related to a piece of code trying to access the scrollView while it’s being destroyed. In my case, the scrollView is populated line by line, using timers (so that the scene loads quickly and doesn’t hang while all the entries load). The timers are cancelled in the ‘did’ phase of scene:hide() and as double fail-safe, the function checks the scrollView still exists before insertion.

This has worked up until now, but now if I switch scenes before the scrollView is filled, the error occurs even though I’ve checked scrollView still exists and cancelled the timers. Moving to the ‘will’ phase of scene:hide() makes no difference.

However, if I move the timer cancellation code to just before I call composer.gotoScene, the problem is fixed. So it would seem by the time scene:hide is called, some work has already started to destroy the scrollView and it’s too late to cancel the timers?

i don’t use composer. i use my own function to create and to delete scenes. i’ve a function that remove all my objects it was refined with time, but in more than 6 months i never had a problem with it. i use it in all my projects and never had problems with it.

i had 2705 and app runned flawless, i upgraded to 2710, crashes in scenes that have scrollviews. but i notice that there are other scenes that have scrollviews that don’t crash. so it must be a combo situation. i’ve too many elements in a scene to isolate the problem right now.

like nick, i’ve always double check when deleting something, and a i repeat, in 2705 app works fine, only when i upgrade problems started.

*edit* just tested in a scene without timers and with scrollviews and it crashes when leaving the scene. still trying to isolate the problem…

well problem detected :slight_smile:

you can reproduce my problem with this simple code:

local widget = require( "widget" ) local scrollView = widget.newScrollView { hideBackground=true, horizontalScrollDisabled=true, top=0, left=0, width = 300, height = 200, scrollWidth = 600, scrollHeight = 800, } local background = display.newRect(100,100,100,100) background:setFillColor(1,0,1) scrollView:insert( background ) local function removeScroll() display.remove(background) background=nil display.remove(scrollView) scrollView=nil end timer.performWithDelay(1000,removeScroll,1)

if you commend the part where i delete background the code works fine.

so the problem is deleting an item that is inserted to the scrollview before deleting the scrollview.

When scrollview is deleted don’t check if the itens exists so it will give error if meanwhile they where. meanwhile the problem is not resolved from corona i’m already changing my code to not delete any objects that are going to the scrollview. and let them be deleted when i delete the scrollview.

problem solved on new building 2716. thx.

+1, I’m getting the same error as above. The stack trace does not relate to any of my code so must be a change within the widgets library.

yes. it’s from widget library. problem in my case is in scrollviews. when i try to delete a scrollview gives me that error. using same code more than 2 years now started the error.

Are any of you using SSK in your projects? If so, be sure to open ssk/loadSSK.lua and set the ‘enableExperimental’ flag to false.

I don’t think this is the problem, but just in case I wanted to be sure.

-Ed

Hi all,

I’ve alerted engineering to investigate this a.s.a.p. Thanks for reporting it.

Brent

Hi all,

I’m going to need a bug report on this, because I personally can’t reproduce the error using 2710 and a basic “destroy” event on a Composer scene containing a ScrollView. In other words, I need to see how you’re setting this up in the most simple reproducable case before we can move forward on fixing it.

Thanks,

Brent

Brent, 

I think it’s related to a piece of code trying to access the scrollView while it’s being destroyed. In my case, the scrollView is populated line by line, using timers (so that the scene loads quickly and doesn’t hang while all the entries load). The timers are cancelled in the ‘did’ phase of scene:hide() and as double fail-safe, the function checks the scrollView still exists before insertion.

This has worked up until now, but now if I switch scenes before the scrollView is filled, the error occurs even though I’ve checked scrollView still exists and cancelled the timers. Moving to the ‘will’ phase of scene:hide() makes no difference.

However, if I move the timer cancellation code to just before I call composer.gotoScene, the problem is fixed. So it would seem by the time scene:hide is called, some work has already started to destroy the scrollView and it’s too late to cancel the timers?

i don’t use composer. i use my own function to create and to delete scenes. i’ve a function that remove all my objects it was refined with time, but in more than 6 months i never had a problem with it. i use it in all my projects and never had problems with it.

i had 2705 and app runned flawless, i upgraded to 2710, crashes in scenes that have scrollviews. but i notice that there are other scenes that have scrollviews that don’t crash. so it must be a combo situation. i’ve too many elements in a scene to isolate the problem right now.

like nick, i’ve always double check when deleting something, and a i repeat, in 2705 app works fine, only when i upgrade problems started.

*edit* just tested in a scene without timers and with scrollviews and it crashes when leaving the scene. still trying to isolate the problem…

well problem detected :slight_smile:

you can reproduce my problem with this simple code:

local widget = require( "widget" ) local scrollView = widget.newScrollView { hideBackground=true, horizontalScrollDisabled=true, top=0, left=0, width = 300, height = 200, scrollWidth = 600, scrollHeight = 800, } local background = display.newRect(100,100,100,100) background:setFillColor(1,0,1) scrollView:insert( background ) local function removeScroll() display.remove(background) background=nil display.remove(scrollView) scrollView=nil end timer.performWithDelay(1000,removeScroll,1)

if you commend the part where i delete background the code works fine.

so the problem is deleting an item that is inserted to the scrollview before deleting the scrollview.

When scrollview is deleted don’t check if the itens exists so it will give error if meanwhile they where. meanwhile the problem is not resolved from corona i’m already changing my code to not delete any objects that are going to the scrollview. and let them be deleted when i delete the scrollview.

problem solved on new building 2716. thx.