Error when scroll view is removed: attempt to call method 'insert' (a nil value)
Crash log from device:
/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:819: attempt to call method 'insert' (a nil value)
stack traceback:
/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:819: in function 'createScrollBar'
/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/widget/widgetLibrary/widget_scrollview.lua:306: in function 'listener'
/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:212: in function 'method'
/Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:190>
Happens if you call scroll:setScrollHeight (which set up a 2ms timer for rendering a scroll bar) and scroll view got removed just before timer triggered
Hey @Benzeliden, have you found a workaround for this issue?
I think I changed my code to not remove scroll view, but hide it instead
Alternatively you can try to override this function - https://github.com/coronalabs/framework-widget/blob/d425ae72f47b29a3da5880eebcb1111f2cdf6cd2/widgetLibrary/widget_scrollview.lua#L285
and check if self._view._fixedGroup has insert method.
https://github.com/coronalabs/framework-widget/blob/d425ae72f47b29a3da5880eebcb1111f2cdf6cd2/widgetLibrary/widget_scrollview.lua#L306
This should fix the issue I reported initially