Hi,
I'm facing "too much recursion" javascript exception on adding many Labels to layout. The code is much complicated, but it works like:
1. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
2. After a while remove Vlayout from main Layout.
3. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
4. After a while remove Vlayout from main Layout.
5. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
6. After repeating adding and removing operations 3-4 times, which results in creating about 7000 new Labels, I get "too much recursion" exception.
I have no idea why this happens, because 'old' VLayouts and Labels are removed from main HLayout (and it's references remains null) so browser's memory should be released. Please help.
Software that I use:
GWT 2.1.0, SmartGWT 2.4, FF 5.0 or IE 8
The Java code is:
Exception caught with GWT Development Mode is:
Thanks,
Adam
I'm facing "too much recursion" javascript exception on adding many Labels to layout. The code is much complicated, but it works like:
1. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
2. After a while remove Vlayout from main Layout.
3. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
4. After a while remove Vlayout from main Layout.
5. Create new VLayout, add 2000-4000 Labels to it, add VLayout to main HLayout.
6. After repeating adding and removing operations 3-4 times, which results in creating about 7000 new Labels, I get "too much recursion" exception.
I have no idea why this happens, because 'old' VLayouts and Labels are removed from main HLayout (and it's references remains null) so browser's memory should be released. Please help.
Software that I use:
GWT 2.1.0, SmartGWT 2.4, FF 5.0 or IE 8
The Java code is:
Code:
mainHLayout.addMember(vLayout);
Code:
00:13:03.010 [ERROR] Exception caught
Caused by: com.google.gwt.core.client.JavaScriptException: (InternalError): too much recursion
fileName: http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js
lineNumber: 368
stack: isc_Class_isA("FormItem")@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:368
([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:157
isc_DynamicForm_getTabIndexSpan()@http://localhost/seed/gwt.Main/sc/modules/ISC_Forms.js:305
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
...many, many more exacly the same lines...
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(0)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__shiftTabIndexForward(1)@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2927
isc_Canvas__slotTabBetween([object Object],[object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2923
isc_Canvas__setTabBefore([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2917
isc_Canvas__slotChildrenIntoTabOrder()@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2938
isc_Canvas__setTabBefore([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2917
isc_Canvas__slotChildrenIntoTabOrder()@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2938
isc_Canvas__setTabBefore([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2917
isc_Canvas__slotChildrenIntoTabOrder()@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2938
isc_Canvas__setTabBefore([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2917
isc_Canvas__slotChildrenIntoTabOrder()@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2938
isc_Canvas__setTabBefore([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2917
isc_Canvas__slotChildrenIntoTabOrder()@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2938
isc_Canvas__setTabAfter([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:2921
isc_Layout_updateMemberTabIndex([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Foundation.js:531
isc_Layout__setupMembers()@http://localhost/seed/gwt.Main/sc/modules/ISC_Foundation.js:343
isc_Layout_drawChildren()@http://localhost/seed/gwt.Main/sc/modules/ISC_Foundation.js:338
isc_Canvas_draw((void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0),(void 0))@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:1959
isc_c_Class_invokeSuper([object Object],"draw",(void 0),(void 0),(void 0),(void 0))@http://localhost/seed/gwt.Main/sc/modules/ISC_Core.js:279
isc_Window_draw()@http://localhost/seed/gwt.Main/sc/modules/ISC_Containers.js:74
()@http://localhost:363
isc_Layout_addMembers([object Array],(void 0),(void 0))@http://localhost/seed/gwt.Main/sc/modules/ISC_Foundation.js:493
isc_Layout_addMember([object Object])@http://localhost/seed/gwt.Main/sc/modules/ISC_Foundation.js:483
([object Object])@http://localhost:228
([object GWTJavaObject],22740994,[object XMLHttpRequest])@http://localhost/seed/gwt.Main/hosted.html?gwt_Main:56
([object Event])@http://localhost:10
((function () {__gwt_makeJavaInvoke(1)(handler, 22740994, _this);}),[object XMLHttpRequest],[object Arguments])@http://localhost:34
(null,65642,(function () {__gwt_makeJavaInvoke(1)(handler, 22740994, _this);}),[object XMLHttpRequest],[object Arguments])@http://localhost/seed/gwt.Main/hosted.html?gwt_Main:56
([object Event])@http://localhost:76
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
at sun.reflect.GeneratedMethodAccessor29.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)
Adam
Comment