Hi there,

a while ago I reported a bug <http://sourceforge.net/p/oorexx/bugs/1161/>, which originally was reported in the BSF4ooRexx project, cf. <http://sourceforge.net/p/bsf4oorexx/bugs/16/>.

My inquiry of February has not yielded any reaction, possibly because it was difficult to set up an environment to test.

So, today I got some time to create a zip-archive that will make it easy to create the environment and execute the testprograms. The zip-archive can be downloaded from <http://wi.wu.ac.at/rgf/rexx/misc/bugs/bugAndCrash20130530.zip>.

Just unzip the archive, create a command linw window, switch into the directory "bugAndCrash20130530" (this contains a readme.txt file as well, which is given after my signature below FYI) and execute "setenv32.cmd"  or "setenv64.cmd", depending on the bitness of your ooRexx and Java (Java needs to be installed in the bitness that ooRexx uses on your machine). These batch files set PATH and CLASSPATH such, that one is abel to execute the test programs. Just switch to the subdirectory "testprograms" and run "runBug2.cmd" (this will crash ooRexx), and run "runBug1.cmd" (this one needs to be interrupted by constantly pressing CTL-C and analyzing its logfile).

This way, the developers should be able to use their debug version of ooRexx and run the test programs against it. In case of crashes it should then be possible to analyze the cause.


This contains the BSF4ooRexx runtime environment for Windows.

Prerequisite: ooRexx and Java with the same bitness (either 32 or 64 bit).

Running the test programs, open a command line window:

    - execute "setenv32.cmd" or "setenv64.cmd" depending on the bitness
      of your ooRexx and installed Java (bitness needs to match in order
      for BSF4ooRexx to be able to load Java); this script will set the
      environment's PATH and CLASSPATH to point to .\bsf4oorexx and the
      32 or 64 bit BSF4ooRexx dll

      if everything went o.k., then you will see the output of running
      the test script testJava.rxj, showing the version of ooRexx, Java
      and the BSF4ooRexx dll; otherwise please make sure that ooRexx and
      Java are of the same bitness!

    - go into the subdirectory "testprograms"

        - execute runBug1.cmd, after approximately 15 seconds press and
          continue to press CTL-C until the program returns

          - analyze the logfile "ConcurrentPackageBug1.logfile.txt" and
            look for "package.cls loaded, BSFGetTID()..."

          - about the test program "ConcurrentPackageBug1.java": this
            program will create by default 16 (using runBug1.cmd only 2)
            Java threads; for each Java thread a Rexx interpreter gets
            created (each BSFManager instance creates and represents a
            separate Rexx interpreter instance which used for executing
            a Rexx program);

            bug: looking at the logfile you will see that each Rexx
                 interpreter instance will eventually reload the package
                 "package.cls" which should not be the case

        - execute runBug2.cmd, after a while the program will crash

          - Java creates a hs_err_pidNN.log file containing the state
            of the JVM, a backtrace and a pointer to the cause of the
            crash, which is in native code (rexx.dll, RexxWaitForTermination)

          - the logfile "ConcurrentPackageBug2CrashingRexx.logfile.txt"
            will contain the output of the test program up to and including
            to the point in time when the crash occurs

          - about the test program "ConcurrentPackageBug2CrashingRexx.java":
            this program will create by default 16 (using runBug2.cmd only 2)
            Java threads; in each Java thread *each time* the while-loop
            starts over *a new Rexx interpreter instance gets created*,
            that then executes the Rexx program "crash2.rxj" which loads
            (requires) "package.cls"

            bug: crash of ooRexx


        - zip-file with all of the files will be temporarily available
          from <http://wi.wu.ac.at/rgf/rexx/misc/bugs/bugAndCrash20130530.zip>

        - original report of the bug in the BSF4ooRexx tracking system, cf.

        - bug tracker item in the ooRexx project, cf.