Concurrent Modification Exception in Vaadin

Sir ,
In my web application , i have 41 label with icon is set . I updating the label icon in a Thread and i am using Refresher addon to do this.

     I set  the Refresher interval using user  input  in ms . If  user gives below  10ms then the browser said that  [b]

Internal Error please contact your Administrator .

     I look into the Server log it  shows that [b]

Concurrent Modification Exception
[/b]is thrown . The following is the Server log

     Jun 15, 2013 10:32:08 AM com.vaadin.Application terminalError
    SEVERE: Terminal error:
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$ Source)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.getDirtyVisibleComponents(
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)

   And i never used Array list in my code .  AbstractCommunicationManager which uses Array List which might cause the Concurrent modifcation Exception.
   What should i do to solve this problem ?

   Please give some suggestion. I have to solve this problem  as soon as possible. 

Thanking you.

Most probably you have a race condition caused by missing synchronization. Whenever you access the application from another thread, you must wrap the access in a
block. For instance:

public class MyApp extends Application {
    private Label myLabel = new Label();
    public void init() {
        new Thread() {
            public void run() {
                // do other stuff
                synchronized(MyApp.this) {
                    // here you can safely update the application
                    myLabel.setValue("Updated from thread!");

Sir ,
Thank you for your guidance . It was very helpful to me . I synchronized the label setIcon method using Application
instance . Now it’s working very well. Is there any detail given in Book of Vaadin ?

For Vaadin 7 (where the locking is done differently), the book does give more details.

For Vaadin 6, see e.g.
this forum thread
or one of many forum threads, blog posts etc.