• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      hudson.model.Label.ConverterImpl does Hudson.getInstance().getLabel(reader.getValue()), presumably so there is a singleton instance of each Label type. However, when the Label is a LabelAtom this results in new LabelAtom() which calls load() which unmarshalls the object and returns to the getLabel call in ConverterImpl.. infinite loop, eventual StackOverflow.

          [JENKINS-7378] StackOverflow at startup from LabelAtom.load

          Alan Harder added a comment -

          Perhaps LabelAtom.getConfigFile() should use a different XStream instance instead of Hudson.XSTREAM? One that doesn't use Label.ConverterImpl.. then the LabelAtom.properties fields can save/load via RobustReflectionConverter.. is this the right approach?

          Alan Harder added a comment - Perhaps LabelAtom.getConfigFile() should use a different XStream instance instead of Hudson.XSTREAM? One that doesn't use Label.ConverterImpl.. then the LabelAtom.properties fields can save/load via RobustReflectionConverter.. is this the right approach?

          Alan Harder added a comment -

          OK, I now remember that when I saw the new LabelAtom stuff and that a config page existed, just playing around I tried adding "/configure" on a "/label/foo" page, and submitting the form.. so I have a $HUDSON_HOME/labels/foo.xml file.. probably most people won't see this StackOverflow as they wouldn't have any existing xml files here..

          Alan Harder added a comment - OK, I now remember that when I saw the new LabelAtom stuff and that a config page existed, just playing around I tried adding "/configure" on a "/label/foo" page, and submitting the form.. so I have a $HUDSON_HOME/labels/foo.xml file.. probably most people won't see this StackOverflow as they wouldn't have any existing xml files here..

          Alan Harder added a comment -

          Ok, I'm committing a fix using a separate XStream instance to avoid use of Label.ConverterImpl for LabelAtom.save/load.. feel free to refactor if there is a better way.

          Alan Harder added a comment - Ok, I'm committing a fix using a separate XStream instance to avoid use of Label.ConverterImpl for LabelAtom.save/load.. feel free to refactor if there is a better way.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java
          http://jenkins-ci.org/commit/34476
          Log:
          [FIXED JENKINS-7378] avoid StackOverflow error in LabelAtom.load

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java http://jenkins-ci.org/commit/34476 Log: [FIXED JENKINS-7378] avoid StackOverflow error in LabelAtom.load

          dogfood added a comment -

          Integrated in hudson_main_trunk #243
          [FIXED JENKINS-7378] avoid StackOverflow error in LabelAtom.load

          mindless :
          Files :

          • /trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java

          dogfood added a comment - Integrated in hudson_main_trunk #243 [FIXED JENKINS-7378] avoid StackOverflow error in LabelAtom.load mindless : Files : /trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java
          http://jenkins-ci.org/commit/34591
          Log:
          JENKINS-7378 LabelProperties should be able to refer to other labels, and those things should be persisted as references, not as a bean.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java http://jenkins-ci.org/commit/34591 Log: JENKINS-7378 LabelProperties should be able to refer to other labels, and those things should be persisted as references, not as a bean.

          dogfood added a comment -

          Integrated in hudson_main_trunk #250
          JENKINS-7378 LabelProperties should be able to refer to other labels, and those things should be persisted as references, not as a bean.

          kohsuke :
          Files :

          • /trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java

          dogfood added a comment - Integrated in hudson_main_trunk #250 JENKINS-7378 LabelProperties should be able to refer to other labels, and those things should be persisted as references, not as a bean. kohsuke : Files : /trunk/hudson/main/core/src/main/java/hudson/model/labels/LabelAtom.java

            mindless Alan Harder
            mindless Alan Harder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: