Sunday, February 5, 2017

ConcurrentModificationException while debugging server-side code while client is making RPC calls

Hello,

when debugging my server-side code - and only when debugging it - I receive a ConcurrentModificationException during this method:

 private void clean ()
 {
  Set<Map.Entry<String,Observator>> set = lst.entrySet();
  Iterator<Map.Entry<String,Observator>> itr = set.iterator ();

  while (itr.hasNext ())
  {
   Map.Entry<String,Observator> e = itr.next();
   
   Observator o = e.getValue();
  
   if (o.isOutdated())
    itr.remove();
  }
 }

Note that this server-side code is called repeatedly by the client inside as an RPC call a Timer.

When I run the application inside eclipse with Project -> Run As -> Web Application (Super Dev Mode), no exception occurrs.
When I debug it inside eclipse with Project -> Debug As -> Web Application (Super Dev Mode) without any breakpoints, no exception occurrs.
But when I debug while having breakpoints, the exception is thrown...

It seems to have something to do with stepping through server-side code while the client is making RPC calls...

How do you deal with such problems?

Thanks
Magnus

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment