PDA

View Full Version : [CLOSED]ToggleButton toggling causes a ConcurrentModificationException in Hosted Mode



TedCHoward
20 Sep 2010, 11:28 AM
We recently upgraded to GXT 2.2.0. We now have a case where when we run our app in hosted mode and click a ToggleButton, we get the following exception:



java.util.ConcurrentModificationException: null
at java.util.HashMap$Haerator.nextEntry(HashMap.java:793)
at java.util.HashMap$ValueIterator.next(HashMap.java:822)
at com.extjs.gxt.ui.client.widget.button.ToggleButton.toggle(ToggleButton.java:204)
at com.extjs.gxt.ui.client.widget.button.ToggleButton.toggle(ToggleButton.java:105)
at com.extjs.gxt.ui.client.widget.button.ToggleButton.onClick(ToggleButton.java:142)
at com.extjs.gxt.ui.client.widget.button.Button.onComponentEvent(Button.java:285)
at com.extjs.gxt.ui.client.widget.Component.onBrowserEvent(Component.java:864)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263)
at sun.reflect.GeneratedMethodAccessor22.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:1714)
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.GeneratedMethodAccessor18.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:1669)
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:637)


I took a look at the source code, and it seems that the code changed from iterating over all ToggleButtons to iterating over all Components to determine if a button in the group was already toggled.

TedCHoward
20 Sep 2010, 11:32 AM
I'm a fool. My Apologies, this belongs in the GXT 2.0 bug forums.

I reposted here:
http://www.sencha.com/forum/showthread.php?110323-ToggleButton-causes-a-ConcurrentModification-Exception&p=515571#post515571