[TIMOB-2237] Android: TiUIScrollableView showPager() Assumes !null
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:58:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M05 |
Components | Android |
Labels | android, defect, release-1.6.0 |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T03:14:26.000+0000 |
Updated | 2011-04-17T01:58:30.000+0000 |
Description
On 1_4_X branch line 84 http://github.com/appcelerator/titanium_mobile/blob/1_4_X/android/modules/ui/src/ti/modules/titanium/ui/widget/TiUIScrollableView.java"> TiUIScrollableView.java the showPager method assumes that the scrollable view has "showPagingControl" as a property.
Using the trackball on a G1 caused a customer app to crash with a NPE. See http://developer.appcelerator.com/helpdesk/view/52401">Helpdesk 52401
~~~
E/TiUncaughtHandler( 919): (main) [2072,15484] Sending event:
exception on thread: main msg:java.lang.NullPointerException
E/TiUncaughtHandler( 919): java.lang.NullPointerException
E/TiUncaughtHandler( 919): at
org.appcelerator.titanium.util.TiConvert.toBoolean(TiConvert.java:223)
E/TiUncaughtHandler( 919): at
ti.modules.titanium.ui.widget.TiUIScrollableView.showPager(TiUIScrollableView.java:84)
E/TiUncaughtHandler( 919): at
ti.modules.titanium.ui.ScrollableViewProxy.handleMessage(ScrollableViewProxy.java:69)
E/TiUncaughtHandler( 919): at
android.os.Handler.dispatchMessage(Handler.java:95)
E/TiUncaughtHandler( 919): at
android.os.Looper.loop(Looper.java:123)
E/TiUncaughtHandler( 919): at
android.app.ActivityThread.main(ActivityThread.java:4203)
E/TiUncaughtHandler( 919): at
java.lang.reflect.Method.invokeNative(Native Method)
E/TiUncaughtHandler( 919): at
java.lang.reflect.Method.invoke(Method.java:521)
E/TiUncaughtHandler( 919): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/TiUncaughtHandler( 919): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/TiUncaughtHandler( 919): at dalvik.system.NativeStart.main(Native
Method)
~~~
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:14:27.000+0000 | 1971 |
Was in wrong milestone.
(from [2d56a930ddc126adc94f3bbb8dcabe3fb5086f66]) [#2237 state:fixed-in-qa] updated ScrollableView to check for null view
scrollableView checks for null view before trying to show pagingControl
https://github.com/appcelerator/titanium_mobile/commit/2d56a930ddc126adc94f3bbb8dcabe3fb5086f66"> https://github.com/appcelerator/titanium_mobile/commit/2d56a930ddc1...
Test app attached. Steps to verify fix:
1) Run test app
2) Click on "Open ScrollableView"
3) Click on "Click me then look a the log!"
4) Look at the log and you should see two entries for setting the paging control. This would result in a exception before.
Thanks
Opie
Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a
Used scrollable view test.