SEVERE: The Cell Widget is attempting to render itself within the render loop

395 views
Skip to first unread message

zixzigma

unread,
Jan 29, 2011, 10:27:35 PM1/29/11
to google-we...@googlegroups.com
Hello Everyone,

I was going back and forth within my CellTable, I got this random Severe exception which I couldn't reproduce.
other than this random exception my table seems to be stable and everything seem to be fine.

the IDE highlights this line within my code:

        table.addColumn(new TextColumn<EmployeeProxy>() {
            @Override
            public String getValue(Employee employeeProxy) {
                return employeeProxy.getName(); // highlighted by IDE
            }

do you think I need to check for nulls here ?
the exception however provides a diagnostic message which I unfortunately do not fully understand : (

SEVERE: The Cell Widget is attempting to render itself within the render loop.
This usually happens when your render code modifies the state of the Cell Widget then accesses data or elements within the Widget.
java.lang.IllegalStateException: The Cell Widget is attempting to render itself within the render loop. This usually happens when your render code modifies the state of the Cell Widget then accesses data or elements within the Widget.
    at com.google.gwt.user.cellview.client.HasDataPresenter.resolvePendingState(HasDataPresenter.java:1140)
    at com.google.gwt.user.cellview.client.HasDataPresenter.access$3(HasDataPresenter.java:1112)
    at com.google.gwt.user.cellview.client.HasDataPresenter$2.execute(HasDataPresenter.java:1037)
    at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
    at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:229)
    at com.google.gwt.core.client.impl.SchedulerImpl.flushFinallyCommands(SchedulerImpl.java:328)
    at com.google.gwt.core.client.impl.Impl.exit(Impl.java:238)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:229)
    at sun.reflect.GeneratedMethodAccessor474.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.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Thread.java:662)

Tiago Neves

unread,
Jan 31, 2011, 1:18:51 PM1/31/11
to Google Web Toolkit
I get the same error when my Column getValue uses a Date. If it uses
any other type of object it goes ok.
Maybe a bug from google guys?

zixzigma

unread,
Jan 31, 2011, 1:50:02 PM1/31/11
to google-we...@googlegroups.com
I am getting this exception more and more now.
I am not using a Date type,
but I manipulate the "range" the table is showing using table.setVisibleRange.
My problem is that I don't understand what exactly is that I am doing wrong,
and how to change my code to avoid this exception.
in other words, what is this Exception "Really" saying ?
if it has to do with Range, under what circumstances this exception occur
so that I can guard against it.

Thank You

John LaBanca

unread,
Jan 31, 2011, 4:01:19 PM1/31/11
to google-we...@googlegroups.com
CellTable renders itself in a rendering loop, which means that you can make multiple synchronous changes to the range and/or data but only render once at the end of the synchronous changes.  However, the table isn't designed to handle the case where user code actually modifies the table within the rendering loop.

The main things that can cause this are the following:
  • Modifying the CellTable from within Cell#render()
  • Overriding CellTable#renderRowValues() and modifying the CellTable from within it
  • Trying to access an Element in CellTable from either of those methods
Are you doing any of these?  The code is somewhat complicated because its optimized for performance and has some special cases.  Its certainly possible that there are subtle bugs.

Thanks,
John LaBanca
jlab...@google.com




--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Tiago Neves

unread,
Feb 1, 2011, 7:16:59 AM2/1/11
to google-we...@googlegroups.com
I solved my problem. In my case sometimes the date was null and it then would throw an Exception. It seems that if any Exception is thrown during rendering, this message (exception) is thrown, masking the original one.

Christian Goudreau

unread,
Jul 14, 2011, 10:42:09 AM7/14/11
to google-we...@googlegroups.com
It seems to happen when I have editable checkbox column and a selection handler.
Reply all
Reply to author
Forward
0 new messages