Scala Programming Language
  1. Scala Programming Language
  2. SI-7013

Scaladoc parser crashes with a StackOverflow

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.2-RC1
    • Component/s: Scaladoc Tool
    • Labels:
      None

      Description

      Getting a StackOverflowError in 2.9.2 and 2.10.0.

      This source file crashes it:
      https://gist.github.com/cab02ebbc18b9716108f

      However, if you remove one of the package statements, or if you remove
      some lines in the @example, it starts working. I am unable to narrow it
      further.

      The stack spins around on some lines that are close together in
      SyntaxHigh.scala

      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:225)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:217)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:225)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:217)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:252)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:278)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:225)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:274)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)
      at scala.tools.nsc.doc.html.SyntaxHigh$.parse$1(SyntaxHigh.scala:219)

      Thanks to Tony Morris for reporting and working on minimizing.

        Activity

        Hide
        Heather Miller added a comment -

        Vlad-- I assigned this to you, since you're technically the responsible "Scaladoc" person. I'm not sure what role Eugene V. has with regard to Scaladoc + tickets, so please feel free to reassign if necessary!

        Show
        Heather Miller added a comment - Vlad-- I assigned this to you, since you're technically the responsible "Scaladoc" person. I'm not sure what role Eugene V. has with regard to Scaladoc + tickets, so please feel free to reassign if necessary!
        Hide
        Tony Morris added a comment -

        Hello, I am the original reporter of this bug. I could not narrow it further because removing some lines stops the crash, adding some lines does the same. It is unclear which lines cause the crash and why, only that it is related to the @example tag.

        Show
        Tony Morris added a comment - Hello, I am the original reporter of this bug. I could not narrow it further because removing some lines stops the crash, adding some lines does the same. It is unclear which lines cause the crash and why, only that it is related to the @example tag.
        Hide
        Kato Kazuyoshi added a comment -

        Sorry for taking this assigned issue but it's easy to fix!
        https://github.com/scala/scala/pull/2279

        Show
        Kato Kazuyoshi added a comment - Sorry for taking this assigned issue but it's easy to fix! https://github.com/scala/scala/pull/2279

          People

          • Assignee:
            Kato Kazuyoshi
            Reporter:
            Heather Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development