IE8 Javascript Out of Memory

Hi, I’ve been seeing an intermittent issue with out webapp where upon UI load, I get a JavaScript error and the page doesn’t load. There are no errors logged server side.

Message: Out of memory
Line: 1
Char: 1051692
Code: 0
URI: https://localhost/mywebapp/VAADIN/widgetsets/com.vaadin.DefaultWidgetSet/A7907B90ECC3A7CAC12BC61C75D97341.cache.js

The only workaround is to close the tab and open a new one.

Has anyone encountered this? Also if we compile and define our own widgetset in web.xml, should com.vaadin.DefaultWidgetSet be sending from the server at all? This means vaadin-client-compiled is on the class path.

I cannot remember ever having seen a client side OOME on UI load, at least not with DefaultWidgetSet. Hard to tell what might be causing it. If it happens, information like the exact version of Vaadin used are needed.

Try to use the option “?debug” at the end of the URL and see if something else is printed there, or if something is printed to the browser console (see e.g.
this page
if not familiar with IE8 debugging tools). The messages might be cryptic if any are printed, though, as the widgetset has been compiled obfuscated and optimized.

If you compile your own widgetset, use the option “-style PRETTY” (selectable also on the Vaadin property page in Eclipse and for the Maven plug-in in POM) when troubleshooting to get a widgetset whose errors are easier to interpret in the JS debugger. When using a custom widgetset, vaadin-client-compiled is not needed.

We are on version 7.1.5. I will try the -style Pretty. I believe to do this via maven plugin, we would add “ -Dgwt.style=PRETTY ” to the configuration in pom?

I did a IE8 console and saw the following:
LOG: init applicationcontextservlet-538393160[object Object]

LOG: loadTheme./VAADIN/themes/mytheme
LOG: load widgetset./VAADIN/widgetsets/MyWidgetsets/MyWidgetsets.nocache.js?1382537372931MyWidgetsets
LOG: Fetching root config
LOG: sending request to http://ourUrlWithParameters
LOG: Got root config response{lots of json}
LOG: Setting pending startupcontextservlet-538393160
Out of memory ourUrlWithParameters, line 1 character 1

I notice that the browser tab basically becomes unusable and I need to open a new tab. Could there be some limitation I’m hitting with the json response that renders the UI? I’m counting 27804 characters.

Use PRETTY instead.

The supported goals and parameters are practically the same as for the GWT plug-in, see e.g.
here
.

Unobfuscated javascript did not point to anything specific in the javascript code. Troubleshooting so far has shown this to be with IE8 only. Chrome and Firefox keep its memory in check according to Windows Task Manager. perfmon also agrees.

Reproduction involves navigating from one UI to another and then back repeatedly. I’m seeing about a 40,000K-50,000K increase from going from UI A to UI B and back to UI A again. Simply hitting F5 in the browser for UI A will cause memory to jump 15000K-20000K. Eventually the memory builds up to a point where the browser flashes on any sort of mouse movement. It’s a tell that the browser is becoming unstable and soon after I get the Out of Memory Javascript error. PreserveOnRefresh is on and I dont’ see a difference if I turn it off.

There are lots of articles out there on IE8 and various memory leaks but I’m not sure how this can be applied with Vaadin. Are there any known issues with using certain types of Vaadin components or listeners that could be the root cause? I"m just looking for tips to see if we’re grossly misusing something.

Just wanted to close this out. Issue was something we were doing with wrong jars.