Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ android ] IndexOutOfBoundsException #8

Closed
etruta opened this issue Oct 1, 2013 · 4 comments
Closed

[ android ] IndexOutOfBoundsException #8

etruta opened this issue Oct 1, 2013 · 4 comments

Comments

@etruta
Copy link

etruta commented Oct 1, 2013

A IndexOutOfBoundsException when I move the scroll to down, testing the infiniteScroll. When I use Tap to load more is ok.

Only in Android!

My View:

<Alloy>
    <View id="win" class="window">
        <TableView id="clients" visible="false">
            <Widget id="clientsPullToRefresh" src="nl.fokkezb.pullToRefresh" onRelease="fetchClientsPullToRefresh" />
            <Widget id="clientsInfiniteScroll" src="nl.fokkezb.infiniteScroll" onEnd="fetchClientsInfiniteScroll" />
        </TableView>
    </View>
</Alloy>

My Controller:

...
function fetchClientsPullToRefresh(e) {
    Ti.API.log("fetchClientsPullToRefresh");
    page = 1;
    fetchClients(e);
}
function fetchClientsInfiniteScroll(e) {
    Ti.API.log("fetchClientsInfiniteScroll");
    page += 1;
    fetchClients(e);
}

The Exception:

10-01 18:58:53.644: E/TiApplication(13138): (main) [5633,13704] Sending event: exception on thread: main msg:java.lang.IndexOutOfBoundsException: Invalid index 10, size is 10; Titanium 3.1.1,2013/06/15 16:10,f7592c1
10-01 18:58:53.644: E/TiApplication(13138): java.lang.IndexOutOfBoundsException: Invalid index 10, size is 10
10-01 18:58:53.644: E/TiApplication(13138):     at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
10-01 18:58:53.644: E/TiApplication(13138):     at java.util.ArrayList.get(ArrayList.java:304)
10-01 18:58:53.644: E/TiApplication(13138):     at ti.modules.titanium.ui.widget.tableview.TiTableView.getItemAtPosition(TiTableView.java:411)
10-01 18:58:53.644: E/TiApplication(13138):     at ti.modules.titanium.ui.TableViewProxy.fireEvent(TableViewProxy.java:163)
10-01 18:58:53.644: E/TiApplication(13138):     at org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1474)
10-01 18:58:53.644: E/TiApplication(13138):     at org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1465)
10-01 18:58:53.644: E/TiApplication(13138):     at org.appcelerator.titanium.view.TiUIView$5.onTouch(TiUIView.java:1245)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.View.dispatchTouchEvent(View.java:5536)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1951)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1712)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1726)
10-01 18:58:53.644: E/TiApplication(13138):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1912)
10-01 18:58:53.644: E/TiApplication(13138):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1371)
10-01 18:58:53.644: E/TiApplication(13138):     at android.app.Activity.dispatchTouchEvent(Activity.java:2364)
10-01 18:58:53.644: E/TiApplication(13138):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1860)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.View.dispatchPointerEvent(View.java:5721)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2890)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2466)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:845)
10-01 18:58:53.644: E/TiApplication(13138):     at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2475)
10-01 18:58:53.644: E/TiApplication(13138):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-01 18:58:53.644: E/TiApplication(13138):     at android.os.Looper.loop(Looper.java:137)
10-01 18:58:53.644: E/TiApplication(13138):     at android.app.ActivityThread.main(ActivityThread.java:4424)
10-01 18:58:53.644: E/TiApplication(13138):     at java.lang.reflect.Method.invokeNative(Native Method)
10-01 18:58:53.644: E/TiApplication(13138):     at java.lang.reflect.Method.invoke(Method.java:511)
10-01 18:58:53.644: E/TiApplication(13138):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-01 18:58:53.644: E/TiApplication(13138):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-01 18:58:53.644: E/TiApplication(13138):     at dalvik.system.NativeStart.main(Native Method)
@FokkeZB
Copy link
Collaborator

FokkeZB commented Oct 2, 2013

  • Does this also happen if you only have the infiniteScroll widget, not the PTR one? Always make a test case as simple as possible to rule out other factors.
  • How much data is in the table when you scroll? If the screen is not fully filled up, this probably is https://jira.appcelerator.org/browse/TIMOB-15016

@etruta
Copy link
Author

etruta commented Oct 2, 2013

Apparently the problem really is when my screen is not fully filled up. :(

@etruta
Copy link
Author

etruta commented Oct 2, 2013

Do you have any workaround for use this widget in this situation?

@FokkeZB
Copy link
Collaborator

FokkeZB commented Oct 3, 2013

Unfortunately there is none. We'll have to wait for them to get it fixed.

@FokkeZB FokkeZB closed this as completed Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants