JS error, but not in GWT development mode

I’m developing a client widget and getting an odd error when I’m not running in GWT development mode:

JavaScriptException: (TypeError): Result of expression ‘wrapper’ [null]
is not an object.
line: 14208
sourceId: 4785200736
sourceURL: http://jadzia:7001/TangTable/VAADIN/widgetsets/com.inomial.tangtable.TangtableWidgetset/12FC98E38BDB280E9FA3AB705F1440DA.cache.html
expressionBeginOffset: 3496
expressionCaretOffset: 3503
expressionEndOffset: 3515

The LOC that is failing is within my class and works perfectly under GWT development mode. I’m running Vaadin 6.6.2 using safari and “pretty” mode. The widgetset compiler isn’t reporting anything odd… I can’t work it out.

What would cause this difference in behaviour? It’s pretty hard to debug when it works fine when the debugger is running :wink:

After loading up firefox’s debugger (far better than safari’s!) I’ve found and fixed the cause of the problem. What’s strange to me is that it should have failed under GWT development mode too.

The failing code was attempting to get a child from an element that didn’t have a child. The result of a call to Element.getFirstChildElement() was returning null, and should have returned null under all uses…

It looks like it’s a bug in com.google.gwt.dev.shellJavaScriptHost - The invokeNative* methods don’t seem to check that “jthis” is null… perhaps that’s expected when calling a function declared in the global scope… Oh wells. I guess this is a bug in GWT rather than Vaadin? Do I log a ticket with Vaadin?

I would say you should probably first file a ticket for GWT if there is none for this issue.
If Vaadin is missing a null check it really should have, you can file a separate ticket about that for Vaadin.