Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5786

methods defined by one eval are 'lost' over time



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6, 1.8.9
    • Component/s: GroovyScriptEngine
    • Labels:
    • Environment:
      64 bit IBM java 1.6 jre on AIX


      Don't suppose it's possible that a bug has been inadvertently introduced by the fix provided in GROOVY-5187 (which GC's script classes)?

      Have a scenario where an eval is done, creating some classes (basically akin to including code from a separate script). A second eval is done which depends on classes created in the first (same execution engine, obviously). A bunch of work is done in this second eval, using lots of memory, undoubtedly invoking GC. At a later point a method that was supposedly created by the first eval is called and is not found:

      MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getTRTimedParm()

      Note that it isn't even trying to associate it with a script class as it should, but with the engine itself.

      We were previously at version 2.0.1 which did not seem to have this problem, but I can't say for certain without going back to that version and trying this particular test case.

      We are working around the problem by re-evaling the first script right before the use of the 'missing' method, which is obviously not ideal.

      Is there a way to tell the engine to GC on demand?





            • Assignee:
              blackdrag Jochen Theodorou
              danno Dan Nimick
            • Votes:
              1 Vote for this issue
              5 Start watching this issue


              • Created: