Groovy
  1. Groovy
  2. GROOVY-5267

getting java.lang.VerifyError depending on some simple method content

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.7.10, 1.8.0, 1.8.4, 1.8.5, 2.0-beta-2
    • Fix Version/s: 1.8.6, 2.0-beta-3
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      linux 64bit, sun jvm 1.6.0.29,

      Description

      This is a very strange issue. Everything was working but then I added some very basic code in a method and I'm now seeing this issue with 1.7.10, 1.8.0 & 1.8.4: The openStore() method is throwing java.lang.VerifyError when I activate line 104 below but it works if I comment 104 and activate 103.

      I've attached a zip file with lucene jars, two groovy files and one runme.sh script.

      Thanks for looking into this!

      BTW, I'm seeing the same issue with groovy-2.0.0-beta-2

      In LuceneStore.groovy (attached)

          97          /* FIXME: Bug triggers here
          98             with this line, everything works:
          99                  writer.setRAMBufferSizeMB(400);
         100             with this line, we get the java.lang.VerifyError
         101                 writer.setRAMBufferSizeMB(defaultRamBufferSize());
         102          */       
         103         // writer.setRAMBufferSizeMB(400);
         104         writer.setRAMBufferSizeMB(defaultRamBufferSize());
      
      1. bugreport.zip
        2.03 MB
        Jean-Philippe Robichaud
      2. bugreport.zip
        2.03 MB
        Jean-Philippe Robichaud
      3. verifyerror.groovy
        0.2 kB
        Cédric Champeau

        Activity

        Jean-Philippe Robichaud created issue -
        Hide
        Cédric Champeau added a comment -

        confirmed on 1.8.5 and master too

        Show
        Cédric Champeau added a comment - confirmed on 1.8.5 and master too
        Cédric Champeau made changes -
        Field Original Value New Value
        Affects Version/s 1.8.5 [ 18071 ]
        Description This is a very strange issue. Everything was working but then I added some very basic code in a method and I'm now seeing this issue with 1.7.10, 1.8.0 & 1.8.4: The openStore() method is throwing java.lang.VerifyError when I activate line 104 below but it works if I comment 104 and activate 103.

        I've attached a zip file with lucene jars, two groovy files and one runme.sh script.

        Thanks for looking into this!

        BTW, I'm seeing the same issue with groovy-2.0.0-beta-2

        In LuceneStore.groovy (attached)
            97 /* FIXME: Bug triggers here
            98 with this line, everything works:
            99 writer.setRAMBufferSizeMB(400);
           100 with this line, we get the java.lang.VerifyError
           101 writer.setRAMBufferSizeMB(defaultRamBufferSize());
           102 */
           103 // writer.setRAMBufferSizeMB(400);
           104 writer.setRAMBufferSizeMB(defaultRamBufferSize());
        This is a very strange issue. Everything was working but then I added some very basic code in a method and I'm now seeing this issue with 1.7.10, 1.8.0 & 1.8.4: The openStore() method is throwing java.lang.VerifyError when I activate line 104 below but it works if I comment 104 and activate 103.

        I've attached a zip file with lucene jars, two groovy files and one runme.sh script.

        Thanks for looking into this!

        BTW, I'm seeing the same issue with groovy-2.0.0-beta-2

        In LuceneStore.groovy (attached)
        {code}
            97 /* FIXME: Bug triggers here
            98 with this line, everything works:
            99 writer.setRAMBufferSizeMB(400);
           100 with this line, we get the java.lang.VerifyError
           101 writer.setRAMBufferSizeMB(defaultRamBufferSize());
           102 */
           103 // writer.setRAMBufferSizeMB(400);
           104 writer.setRAMBufferSizeMB(defaultRamBufferSize());
        {code}
        Hide
        Cédric Champeau added a comment - - edited

        The problem is most likely due to the fact you've written writer.setRAMBufferSizeMB(defaultRamBufferSize()) instead of writer.setRAMBufferSizeMB(defaultRamBufferSize) (defaultRamBufferSize is an int, not a method nor a closure). However, a VerifyError should not happen.=

        Show
        Cédric Champeau added a comment - - edited The problem is most likely due to the fact you've written writer.setRAMBufferSizeMB(defaultRamBufferSize()) instead of writer.setRAMBufferSizeMB(defaultRamBufferSize) (defaultRamBufferSize is an int, not a method nor a closure). However, a VerifyError should not happen.=
        Hide
        Cédric Champeau added a comment -

        Attached a simpler example which triggers the same error (on 1.8.X, not on master, where an NPE is thrown instead).

        Show
        Cédric Champeau added a comment - Attached a simpler example which triggers the same error (on 1.8.X, not on master, where an NPE is thrown instead).
        Cédric Champeau made changes -
        Attachment verifyerror.groovy [ 58669 ]
        Hide
        Cédric Champeau added a comment -

        Stripped down:

        class Bar {
           int defaultValue = 40
           void m() {
            defaultValue()
           }
        }
        new Bar().m()
        
        Show
        Cédric Champeau added a comment - Stripped down: class Bar { int defaultValue = 40 void m() { defaultValue() } } new Bar().m()
        Hide
        Jean-Philippe Robichaud added a comment -

        oh, wow, good catch removing this typo (not sure why I ended up with that, I'm currently re-factoring some code) makes everything working properly now.

        I guess a "no such method" exception would have been better

        Thanks!

        Show
        Jean-Philippe Robichaud added a comment - oh, wow, good catch removing this typo (not sure why I ended up with that, I'm currently re-factoring some code) makes everything working properly now. I guess a "no such method" exception would have been better Thanks!
        Hide
        Jochen Theodorou added a comment -

        I set it as critical bug for 1.8,so we don't forget about this one

        Show
        Jochen Theodorou added a comment - I set it as critical bug for 1.8,so we don't forget about this one
        Jochen Theodorou made changes -
        Fix Version/s 1.8.6 [ 18245 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Cédric Champeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Assignee Cedric Champeau [ melix ]
        Fix Version/s 2.0-beta-3 [ 18244 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734190 ] Default workflow, editable Closed status [ 12745995 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971715 ] Default workflow, editable Closed status [ 12979521 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 1h 1 Cédric Champeau 31/Jan/12 10:54
        Resolved Resolved Closed Closed
        11d 17h 8m 1 Paul King 12/Feb/12 04:03

          People

          • Assignee:
            Cédric Champeau
            Reporter:
            Jean-Philippe Robichaud
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development