-
28 Dec 2009 12:36 AM #1
[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
-
28 Dec 2009 9:57 AM #2
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
-
28 Dec 2009 10:48 PM #3
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.
-
28 Dec 2009 11:22 PM #4
-
29 Dec 2009 9:49 AM #5
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
-
29 Dec 2009 10:01 AM #6
It was referencing a non existing columnid. Marking this as closed.
Please do not update the threadtitles on your own.
-
29 Dec 2009 10:47 PM #7
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.
-
30 Dec 2009 1:43 AM #8
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.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote