Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Stack overflow error in GWT shell

    hello - i just started receiving a "Stack overflow at line: 0" error dialog in the GWT browser. not sure what is causing it.

    has anyone else run into this issue?

    jason

    #2
    Is this when you repeatedly refresh the hosted mode screen? I've seen it occasionally in hosted mode only and doesn't affect anything. Can you confirm that this is what you're observing.

    If you can isolate what delta made this occur, that would be very helpful.

    Thanks,
    Sanjiv

    Comment


      #3
      i am not refreshing repeatedly, it only appears in the GWT/IE7 browser. FF, Safari, etc do not have this issue.

      i am looking to see what it was i added that may be the cause, but i added a great deal of code so it's going to take me a few minutes

      Comment


        #4
        It also happens to me only in IE shell, the application got quite big, and I am unable to reproduce or to isolate the example...
        it seems that wrapping the code in a
        Code:
        		new Timer() {
        			public void run() {
        				Canvas canvas = new Canvas();
        				canvas.addChild(form.getSmartGwtDynamicForm());
        				callback.onScreenCreated(canvas);
        			}
        		}.schedule(1);
        solved my issue for now...

        I could just ignore this, but the problem is that when the application gives this error if I do a deploy to a .war file on a jboss server, when I run the application in IE7, I don't get the message but also don't have anything displayed on the screen (anything after the place where the message appears in the shell)
        Last edited by mihai007; 4 Feb 2009, 02:31.

        Comment


          #5
          I have the same problem when I close a tab in a mainTabSet

          Comment


            #6
            I get it occasionally closing a tab also. Only happens in hosted mode. We issue a GWT-RPC to our backend when a tab closes - I haven't been able to determine if the stack overflow error is because of the RPC or simply the tab closing.

            Comment


              #7
              See this GWT issue.

              Comment


                #8
                I am getting this issue in SmartGWT Showcase when closing any tab from the main tab set.

                I am using GWT 1.6.2 and SmartGWT-1.0b2.

                I added a comment on the GWT issue 1438 also.

                Any updates on how to close this issue?

                Comment


                  #9
                  This error doesn't seem to be harmless. In my case, I have a Window with some ListGrids on it. During load of the canvas I get the stack overflow at line 0 error (hosted mode) and then the event handlers seem not to do anything anymore: the Window's maximize and close buttons don't work anymore, and the listgrid's click handler doesn't do anything.


                  I've tried creating a separated module with all the used layouts (without datasources) on it, but running that one does not result in the error (maybe I'm missing some layouts).

                  As a test, I removed some layouts (making the screen ugly). Then the error does not come up during load, but after I close the Window.

                  Tried it with SmartGWT 1.1, with build 618, with the JVM stack setting, but the error keeps popping-up.

                  I think filling the window with data via a datasource doesn't really matter to the error, so I think I can rule out the recursive serializing problem GWT RPCs have.
                  Is there anyone else with tips on finding the cause? Maybe there is an interesting place in the java code to keep an eye on the stack? Hmm, maybe profiling can help.

                  Comment


                    #10
                    As previously posted by Sanjiv, this appears to be a core GWT bug with GWT-RPC. If you think this issue is related to SmartGwT itself, please post a minimal standalone test case that reproduces the problem without using GWT-RPC.

                    Note that several users in the thread for the GWT issue chime in with workarounds that appear to have worked for them, but possibly not for others.

                    Another approach of course is to use SmartGwt Pro, which doesn't have this problem, takes much less code to setup than GWT-RPC, and has a huge number of server-side features.

                    Comment


                      #11
                      standalone test case

                      I produced a standalone test case
                      http://code.google.com/p/smartgwt/issues/detail?id=311

                      Comment


                        #12
                        The simple way to reproduce the problem without GWT-RPC

                        Code:
                        public void onModuleLoad() {
                        	
                        	
                        	VLayout v1 =new VLayout();
                        	VLayout v2 =new VLayout();
                        	VLayout v3 =new VLayout();
                        	VLayout v4 =new VLayout();
                        	VLayout v5 = new VLayout();
                        
                        	HLayout h1 =new HLayout();
                        	HLayout h2 =new HLayout();
                        	HLayout h3 =new HLayout();
                        	HLayout h4 = new HLayout();
                        	
                        	Label someLabel = new Label("Some label");
                        
                        	v5.setMembers(someLabel);
                        	h4.setMembers(v5);
                        	v4.setMembers(h4);
                        	h3.setMembers(v4);
                        	v3.setMembers(h3);
                        	h2.setMembers(v3);
                        	v2.setMembers(h2);
                        	h1.setMembers(v2);
                        	v1.setMembers(h1);
                        
                        	v1.show();
                            }
                        The hosted mode browser (which is IE like in my case) shows the error "Stack overflow at line: 0"
                        Last edited by iurii; 6 Oct 2009, 06:47.

                        Comment


                          #13
                          Presumably one less level of nesting and the problem goes away? That code is going to cause a deep stack, but will definitely complete normally (it's not an infinite loop). This suggests that the problem is that GWT is introducing an arbitrarily lower stack depth limit in IE, or is perhaps adding stack frames of it's own that aren't present in real browsers. If so, look for a GWT setting to address this, it's not SmartGWT-specific.

                          Comment


                            #14
                            It still seems to be the issue in SmartGWT

                            Isomorphic,

                            I managed to reproduce the same issue in the real IE 7 (I mean in the Web mode).
                            The code
                            Code:
                            public void onModuleLoad() {
                                         Label someLabel = new Label("Some label");
                            	VLayout curLayout = new VLayout();
                            	curLayout.setMembers(someLabel);
                            	
                            	for (int i = 0;i < 10;i++) {
                            	    VLayout newLayout = new VLayout();
                            	    newLayout.setMembers(curLayout);
                            	    curLayout = newLayout;
                            	}
                            
                            	curLayout.show();
                            }
                            causes the error message "Stack oevflow at line: 0" to be shown both in the Hosted Mode and Web Mode ("real" IE)
                            If the level of the layout nesting level will be increased from 10 to 20 (let's say) then this label is not even renedred at all.

                            Unfortunally if one tries to impkement some complex layout (like java.awt.GridBagLayout) using SmartGWT then having the nesting layout of 10 seems to be quite reasonable.

                            I thougt that nesting of "plain" GWT layouts would cause the same problem, but it was not true. The code
                            Code:
                             public void onModuleLoad() {
                            	
                            	Label label = new Label("Some label");
                            	HorizontalPanel curPanel = new HorizontalPanel();
                            	curPanel.add(label);
                            	
                            	for (int i = 0;i < 25;i++) {
                            	    HorizontalPanel newPanel = new HorizontalPanel();
                            	    newPanel.add(curPanel);
                            	    curPanel = newPanel;
                            	}
                            	
                            	RootPanel.get().add(curPanel);
                                }
                            works fine both in the Hosted and Web mode.
                            So the issue seems to be located in the SmartGWT layout implementation.

                            Will it be possible for you to look into this issue?

                            P.S. Both of the code samples above work fine in Firefox 3.5.3.
                            So this problem seems to be IE specific

                            Comment


                              #15
                              I had a stupid question : could you tell me why this problem does not occur using GWT Pro version ?

                              Comment

                              Working...
                              X