rtikyani / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

app force closes when selecting WAUS-FM from "Local Stations", station search, etc. #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Tap Stations
2. Tap 'Call sign or zip code'
3. Enter 'waus'
4. Tap 'Search!'
5. Tap 'WAUS-FM - 90.7 FM, Berrien Springs'

At this point, the app force closes.

I am using version 1.2.1, version code 3 of the NPR app on Android 1.5 
(MotoBLUR) on a Motorola Backflip.

adb reports the backtrace below.  I started to look into this, but a) the 
downloadable source doesn't appear to match my .apk, and b) it wasn't 
immediately obvious how to build said source (I've not done Android 
development, maybe it's just ignorance).  I'll look more deeply when I get a 
chance.

java.lang.RuntimeException: Unable to start activity 
ComponentInfo{org.npr.android.news/org.npr.android.news.StationDetailsActivity}:
 java.lang.IndexOutOfBoundsException: Invalid location 0, size is 0
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2297)
    at android.app.ActivityThread.startActivityNow(ActivityThread.java:2141)
    at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
    at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
    at org.npr.android.news.BackAndForthActivityGroup.goForward(BackAndForthActivityGroup.java:85)
    at org.npr.android.news.StationListActivity.onItemClick(StationListActivity.java:143)
    at android.widget.AdapterView.performItemClick(AdapterView.java:283)
    at android.widget.ListView.performItemClick(ListView.java:3189)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:1632)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3977)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IndexOutOfBoundsException: Invalid location 0, size is 0
    at java.util.ArrayList.get(ArrayList.java:353)
    at android.widget.SimpleExpandableListAdapter.getChildrenCount(SimpleExpandableListAdapter.java:255)
    at android.widget.ExpandableListConnector.refreshExpGroupMetadataList(ExpandableListConnector.java:545)
    at android.widget.ExpandableListConnector.expandGroup(ExpandableListConnector.java:666)
    at android.widget.ExpandableListConnector.expandGroup(ExpandableListConnector.java:620)
    at android.widget.ExpandableListView.expandGroup(ExpandableListView.java:572)
    at org.npr.android.news.StationDetailsActivity.constructList(StationDetailsActivity.java:175)
    at org.npr.android.news.StationDetailsActivity.onCreate(StationDetailsActivity.java:97)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2260)

Original issue reported on code.google.com by eblan...@gmail.com on 9 Jun 2010 at 12:35

GoogleCodeExporter commented 8 years ago
This particular station has no streams or podcasts so there is no "first" group 
to be expanded.  I've proposed a fix that displays zero counts when there are 
no streams or podcasts and attached the modified source file.

Original comment by marshgos...@gmail.com on 13 Jun 2010 at 8:29

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by marshgos...@gmail.com on 18 Jun 2010 at 8:01