Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default [CLOSED]ArrayIndexOutOfBoundsException on ColumnModel

    [CLOSED]ArrayIndexOutOfBoundsException on ColumnModel


    There is a little problem with the ColumnModel, under some circumstance an ArrayIndexOutOfBoundsException occurs.

    I don't have a proper testcase because sometimes the problem occurs, sometimes it won't.

    Code:
    java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.get(ArrayList.java:324)
        at com.extjs.gxt.ui.client.widget.grid.ColumnModel.setHidden(ColumnModel.java:479)
        at com.extjs.gxt.ui.client.widget.grid.GroupingView.renderRows(GroupingView.java:456)
        at com.extjs.gxt.ui.client.widget.grid.GridView.afterRender(GridView.java:641)
        at com.extjs.gxt.ui.client.widget.grid.Grid.afterRenderView(Grid.java:657)
        at com.extjs.gxt.ui.client.widget.grid.Grid$1.run(Grid.java:646)
        at com.google.gwt.user.client.Timer.fire(Timer.java:141)
        at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
        at java.lang.Thread.run(Thread.java:619)
    Last edited by mtarantini; 28 Dec 2009 at 11:22 PM. Reason: fixed

  2. #2
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    0
    Arno.Nyhm is on a distinguished road

      0  

    Default


    maybe there is a spelling error:

    check all your typed column names ... also the expand column name ... maybe there is the error


    an better guess with my crystal ball:
    you have a GroupingView ... and something wrong with the "GroupField" (maybe misspelling or not setting it or something like this)
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    I think is the groupingstore who cause the exception.

    As I don't use the "expandColunm" function, and my store is empty as start, it must come from the groupBy function on an empty store.

  4. #4
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    Problem fixed, thx Arno.Nyhm

  5. #5
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    0
    Arno.Nyhm is on a distinguished road

      0  

    Default


    can you please explain how you fixed it?
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    It was referencing a non existing columnid. Marking this as closed.

    Please do not update the threadtitles on your own.

  7. #7
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    In fact, I was creating a empty store in the construstor of my class, and I was setting the groupBy just after.

    As my store is filled later, at rendering (the store which is still empty) the ColumnModel could not find the column setted in the groupBy.

    So I set the groupBy after my store is loaded.

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I dont think that an empty store is the problem, i cannot reproduce it with an empty store. THe problem will be that the groupby field was set to something that was not existing in the columnmodel. I will add some assert statements here to give some better hints.

Thread Participants: 2