Announcement

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

    GWTShell crash: segmentation fault

    I made some code changes and now the GWTShell is crashing with a segmentation fault in the JVM. How to I debug the cause of the problem?

    Note that I tried launching the developer consolde as instructed here:

    http://forums.smartclient.com/showthread.php?t=3033

    But control-D in my hosted browser or GWTShell window does not launch the dev console.
    Note that I am using the version of SmartClient available via maven in the maven repo at:

    http://www.smartclient.com/smartgwt/maven2/com/smartgwt/smartgwt/1.0b2-SNAPSHOT/smartgwt-1.0b2-SNAPSHOT.jar

    Is this version too old?

    BTW, SmatClient team, The web server for the maven repo at:

    http://www.smartclient.com/smartgwt/maven2

    seems to not have proper mimetype configuration so it does not allow browser clients to view a directory listing of the maven repo. Thus I have no way to know if there are newer versions available for the smartgwt jar. I would be grateful for fixing this issue.

    Thanks.

    #2
    Please use the maven configuration specified here. It contains the very latest snapshots.

    Code:
    Repository: http://smartgwtsnap.rorschach.de
    
    Group Id: com.smartgwt
    Artifact Id: smartgwt
    Version: 1.0b2-SNAPSHOT

    Comment


      #3
      The following post describes how to send log to a file:

      http://www.mail-archive.com/gwt-maven@googlegroups.com/msg00347.html

      Thanks.

      Comment


        #4
        Originally posted by sjivan
        Please use the maven configuration specified here. It contains the very latest snapshots.

        Code:
        Repository: http://smartgwtsnap.rorschach.de
        
        Group Id: com.smartgwt
        Artifact Id: smartgwt
        Version: 1.0b2-SNAPSHOT
        I used above for maven repo and dependency config and built my project from clean state. Still I am unable to launch dev console by typing CTRL-D in my app running in hosted browser.

        Noet my app has only one ENtryPoint at present and I put the suggested code at top of onModuleLoad method as follows:

        Code:
        public class Application implements EntryPoint {
        
        	/**
        	 * This is the entry point method.
        	 */
        	public void onModuleLoad() {
        
                    //Following is to launch the dev console on Ctrl-D
                    if (!GWT.isScript()) {
                        KeyIdentifier debugKey = new KeyIdentifier();
                        debugKey.setCtrlKey(true);
                        debugKey.setKeyName("D");
        
                        Page.registerKey(debugKey, new KeyCallback() {
                            public void execute(String keyName) {
                                SC.showConsole();
                            }
                        });
                    }
        	}
        
                .... app specific code ...
        }
        Am I doing something wrong?

        Comment


          #5
          What OS are you using? Try making sure that the hosted mode browser area is in focus when pressing Ctrl + D. If you are still not able to get that working, try simplifying the sample by adding an IButton with a click handler that calls SC.showConsole().

          Comment


            #6
            Originally posted by smartgwt.dev
            What OS are you using? Try making sure that the hosted mode browser area is in focus when pressing Ctrl + D. If you are still not able to get that working, try simplifying the sample by adding an IButton with a click handler that calls SC.showConsole().
            I am on Ubuntu Linux Hardy Heron 8.04 with 2.6.24-18-generic kernel.

            Oddly enough I am now able to bring up a Dev Console on Control-D. I think it depends on where I clicked in my app within hosted browser window. Some areas do not give focus to the app.

            So now that I can launch the dev console I find that it is just a blank screen with grey background. It has no visible UI components at all. This looks like incorrect behavior.

            Note that currently the offending code that crashed the JVM is disabled.

            What should I do next to debug my JVM crash running within GWTShell's hosted browser?

            Comment


              #7
              Compile your app, and run in Firefox and see if the error persists. If so, post a standalone testcase that we can run locally. GWTShell should never crash with a segment fault, no matter what. So it might be worth posting it as a GWT issue after you carry out the other steps.

              Comment


                #8
                Originally posted by smartgwt.dev
                Compile your app, and run in Firefox and see if the error persists. If so, post a standalone testcase that we can run locally. GWTShell should never crash with a segment fault, no matter what. So it might be worth posting it as a GWT issue after you carry out the other steps.
                I have created a minimal standalone maven project which manifests the bug here and attached it to the following new issue:

                http://code.google.com/p/smartgwt/issues/detail?id=99

                Unzip the file and read README.txt for where the problem code is.

                Thanks.

                Comment


                  #9
                  I checked out the sample. Thanks for the standalone testcase. You're running into a recursion problem by specifying "root" in the tree data as well as calling setRoot. Just remove the call tree.setRoot(root); and your sample will run fine.

                  The dev console shows fine when I run your sample. Remove the !GWT.isScript() check, compile the sample and monitor the http traffic in firebug when the dev console is launched to understand which resource is not being found.

                  Comment


                    #10
                    Originally posted by smartgwt.dev
                    I checked out the sample. Thanks for the standalone testcase. You're running into a recursion problem by specifying "root" in the tree data as well as calling setRoot. Just remove the call tree.setRoot(root); and your sample will run fine.
                    I was following the sample code here almost verbatim:

                    <http://www.smartclient.com/smartgwt/showcase/source/tree/databinding/LocalDataTreeSample.java.html>

                    I suppose the sample code must be based on an older code base?

                    Something I learned by trial an error is that the root nodes parent id MUST be set to null or else no node is displayed as hown in first line of code below:

                    Code:
                            FolderTreeNode root = new FolderTreeNode("home", null, "home", 1);
                            FolderTreeNode node2 = new FolderTreeNode("najmi", "home", "najmi", 2);
                            tree.setData(new TreeNode[]{root, node2});

                    The dev console shows fine when I run your sample. Remove the !GWT.isScript() check, compile the sample and monitor the http traffic in firebug when the dev console is launched to understand which resource is not being found.
                    Here is my hunch... I think the problem is due to issue 69:

                    <http://code.google.com/p/smartgwt/issues/detail?id=69>

                    It appears that the build my maven pom is picking does not have the fix for it.
                    It further appears to be a platform specific issue since I see it and you do not.
                    So I am still unable to get the cosnole to show. dev shell shows:

                    Code:
                    [WARN] Resource not found: sc/system/development/ISC_DeveloperConsole.js; (could a file be missing from the public path or a <servlet> tag misconfigured in module com.wellfleetsoftware.gis.gui.gwt.Application.gwt.xml ?)

                    Comment


                      #11
                      Originally posted by farrukh_najmi
                      Here is my hunch... I think the problem is due to issue 69:

                      <http://code.google.com/p/smartgwt/issues/detail?id=69>

                      It appears that the build my maven pom is picking does not have the fix for it.
                      It further appears to be a platform specific issue since I see it and you do not.
                      So I am still unable to get the cosnole to show. dev shell shows:

                      Code:
                      [WARN] Resource not found: sc/system/development/ISC_DeveloperConsole.js; (could a file be missing from the public path or a <servlet> tag misconfigured in module com.wellfleetsoftware.gis.gui.gwt.Application.gwt.xml ?)
                      Yes, it appears you're not picking up the latest build snapshots. Are you pointing to this maven repository :http://smartgwtsnap.rorschach.de ?

                      If so, try deleting the local smartgwt jars from your maven repository home and rebuild.

                      Comment


                        #12
                        Originally posted by farrukh_najmi
                        Here is my hunch... I think the problem is due to issue 69:

                        <http://code.google.com/p/smartgwt/issues/detail?id=69>

                        It appears that the build my maven pom is picking does not have the fix for it.
                        It further appears to be a platform specific issue since I see it and you do not.
                        So I am still unable to get the cosnole to show. dev shell shows:

                        Code:
                        [WARN] Resource not found: sc/system/development/ISC_DeveloperConsole.js; (could a file be missing from the public path or a <servlet> tag misconfigured in module com.wellfleetsoftware.gis.gui.gwt.Application.gwt.xml ?)
                        Based on suggestion in another thread it turns out that deleting the maven cache for smart gwt (on linux ~/.m2/repository/com/smartgwt) and rebuilding the app fixed the problem and I now have a dev console.

                        Comment


                          #13
                          The suggestion was made a week ago in this thread too, just above your last post.

                          Originally posted by smartgwt.dev
                          If so, try deleting the local smartgwt jars from your maven repository home and rebuild.

                          Comment

                          Working...
                          X