Widget 2.0 bug: attempt to call method 'setFillColor' (a nil value)

We are experiencing this problem when scrolling up and down a table view, after we switched to Widget 2.0 and started implementing iPhone 5 support. The stack trace is short and does not include references to our code, so the problem must be internally in Corona.

Runtime error

?:0: attempt to call method ‘setFillColor’ (a nil value)

stack traceback:

        [C]: in function ‘setFillColor’

        ?: in function ‘touch’

        ?: in function <?:683>

        ?: in function <?:218>Handling the unhandled error

See a similar posting:

http://forums.coronalabs.com/topic/33927-0-attempt-to-call-method-setfillcolor-a-nil-value/

And as requested there, please build a small sample app that shows the problem and file a bug report please using the “Report a bug” link at the top of the page.

Thanks

Rob

Olavm, I am having the same problem.  Have you filed a bug yet? If not I can do it.

I have filed a bug about it Case 23218.

And as requested there, please build a small sample app that shows the problem and file a bug report please using the “Report a bug” link at the top of the page.

Thanks

Rob

Olavm, I am having the same problem.  Have you filed a bug yet? If not I can do it.

I have filed a bug about it Case 23218.

I have found a reproduction method for this bug that works every time:

  1. Create a tableview

  2. Insert a button in the tableview with an onRowTouch

  3. In the onRowTouch, update the menu scene using the code below:

[lua]

function updateScene()

  local name = storyboard.getCurrentSceneName()

  local scene = storyboard.getScene(name)

  local group = scene.view

  for i=group.numChildren, 1, -1 do

    display.remove(group[i]) group[i] = nil

  end

  scene:createScene()

end

[/lua]

Corona will crash as it tries to call display.remove() on the child containing the tableview. This worked before Widget 2.0.

I noticed bug report 23218 has been filed. Is there any way to view or add a comment to this bug report, or is this system available to Corona employees only?

I would really like to see this bug fixed in the next build.

I would recommend filing a separate bug report.  We don’t have a way to let you add on to an existing report.  Mulitple bug reports, in particular if you have an exact case, can help the engineers solve the problem.

I am seeing this issue as well as I move my code from widget 1 to widget 2. I was wondering if I did something wrong so its refreshing to see these bug reports. Hope it gets fixed soon. Are there any workarounds? Thanks

Reported as bug 24263. Hope to see a fix soon.

Reported as bug 24263. Hope to see a fix soon.

Thanks olavm

I have found a reproduction method for this bug that works every time:

  1. Create a tableview

  2. Insert a button in the tableview with an onRowTouch

  3. In the onRowTouch, update the menu scene using the code below:

[lua]

function updateScene()

  local name = storyboard.getCurrentSceneName()

  local scene = storyboard.getScene(name)

  local group = scene.view

  for i=group.numChildren, 1, -1 do

    display.remove(group[i]) group[i] = nil

  end

  scene:createScene()

end

[/lua]

Corona will crash as it tries to call display.remove() on the child containing the tableview. This worked before Widget 2.0.

I noticed bug report 23218 has been filed. Is there any way to view or add a comment to this bug report, or is this system available to Corona employees only?

I would really like to see this bug fixed in the next build.

I would recommend filing a separate bug report.  We don’t have a way to let you add on to an existing report.  Mulitple bug reports, in particular if you have an exact case, can help the engineers solve the problem.

I am seeing this issue as well as I move my code from widget 1 to widget 2. I was wondering if I did something wrong so its refreshing to see these bug reports. Hope it gets fixed soon. Are there any workarounds? Thanks

Reported as bug 24263. Hope to see a fix soon.

Reported as bug 24263. Hope to see a fix soon.

Thanks olavm