Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-796

StackOverflowError when previewing a ScriptedField that calls ScriptedFields

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Obsolete
    • Affects Version/s: 2.0.7
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      JIRA 5.1.1, GroovyRunner 2.0.7, JRE 1.6.0_26

    • Critical Points:
      0

      Description

      I just "broke" GroovyRunner in an interesting way: I wrote a Scripted Field that itself calls for the values of two other Scripted Fields. When I try to preview the effect of the calling Scripted Field, it shows neither preview nor error message. In the logfile, however, it prints a very long stack trace, that looks pretty much like an infinite loop that was aborted by an StackOverflowError. Although calling the fields kind of recursively, I am quite sure that my tiny scripts did not go into a loop since the two called fields are rather elementary. (You can find the scripts and the error log attached to this issue.)

      Also, the error does not show up when the Scripted Field is rendered for the View Issue screen. Here, it just computes the desired value. The stack trace occurs only when previewing a Scripted Field in the UI editor. Hence, this does not really break anything since the View Issue screen is unaffected. It merely clutters the log file and renders the preview feature useless.

      Also, I am quite aware that I can avoid the calls for Scripted Fields altogether. I just wanted to report this observation.

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            mra Marcel R. Ackermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: