# widget 2.0 pickerWheel doesn't soft land, then crashes when values are retrieved

**URL:** <https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522>\
**Category:** Widgets\
**Created:** [September 4, 2013, 2:17am UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522 "2013-09-04T02:17:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RealHandy](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@RealHandy](https://forums.solar2d.com/u/RealHandy)\
**Post date:** [September 4, 2013, 2:17am UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522/1 "2013-09-04T02:17:40Z")

</div>

FYI, all, I’ve opened a bug because you can easily crash the pickerWheel, even in Widget Demo on Windows simulator, just by flicking a wheel up and down a few times until it fails to soft land, then punching Values to blow it up:

```
in ...corona sdk\sample code\interface\widgetdemo\tab3.lua:121: attempt to index field '?' (a nil value) &nbsp;

```

Found out the hard way, when a customer reported it. Assuming getValues() is returning something nil-ish.

Build 1183, so this isn’t some old thing that’s been fixed.

---

<div class="post-metadata">

**Author:** ![RealHandy](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@RealHandy](https://forums.solar2d.com/u/RealHandy)\
**Post date:** [September 4, 2013, 4:05am UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522/2 "2013-09-04T04:05:47Z")

</div>

Confirmed: getValues() is returning no values including or after the non-soft-landed wheel. So, if wheel 1 (leftmost) is stuck, getValues() returns {}. If wheel 3 is stuck, getValues() returns { wheel1, wheel2 }.

I’ve worked around it by testing getValues() and informing the user if a wheel is stuck. But considering other bad behavior in pickerWheel (like sometimes stuck wheels return values, but they’re wrong; like asking for values while the wheel is still spinning can return values nowhere close to where the wheel is when getValues() is called), maybe there is a need for significant work in pickerWheel.

---

<div class="post-metadata">

**Author:** ![alexf](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexf](https://forums.solar2d.com/u/alexf)\
**Post date:** [September 4, 2013, 12:03pm UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522/3 "2013-09-04T12:03:29Z")

</div>

Added to the bug list. Will be solved soon.

Alex

---

<div class="post-metadata">

**Author:** ![RealHandy](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/r/e5b9ba/32.png) [@RealHandy](https://forums.solar2d.com/u/RealHandy)\
**Post date:** [September 4, 2013, 4:05am UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522/4 "2013-09-04T04:05:47Z")

</div>

Confirmed: getValues() is returning no values including or after the non-soft-landed wheel. So, if wheel 1 (leftmost) is stuck, getValues() returns {}. If wheel 3 is stuck, getValues() returns { wheel1, wheel2 }.

I’ve worked around it by testing getValues() and informing the user if a wheel is stuck. But considering other bad behavior in pickerWheel (like sometimes stuck wheels return values, but they’re wrong; like asking for values while the wheel is still spinning can return values nowhere close to where the wheel is when getValues() is called), maybe there is a need for significant work in pickerWheel.

---

<div class="post-metadata">

**Author:** ![alexf](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/a/bc8723/32.png) [@alexf](https://forums.solar2d.com/u/alexf)\
**Post date:** [September 4, 2013, 12:03pm UTC](https://forums.solar2d.com/t/widget-2-0-pickerwheel-doesnt-soft-land-then-crashes-when-values-are-retrieved/317522/5 "2013-09-04T12:03:29Z")

</div>

Added to the bug list. Will be solved soon.

Alex
