Rick McGuire wrote:
> I just thought of one more thing that could cause the error you're
> seeing.  If you do an AttachThread() at some point and neglect to do a
> corresponding DetachThread() before returning to your caller, you'll
> end up with a corrupted activaation stack that will result in problems
> with legacy callback APIs like RexxVariablePool or RexxStemSort.
> What;s showing up in this traceback very much appears to match what
> might happen in that sort of situation.
>   
Finally could trace this down and come by that problem. However, it has
nothing to do with AttachThread() and DetachThread()!

The following happens: rexx.exe runs a rexx script which loads BSF4Rexx
and then Java. This will cause on the Java side the creation of another
RexxInterpreterInstance in the same thread that does not get used at
all, as upon return the current executing rexx scripts continues to run.
Then, from this script calls to the external function BSF() occur, which
means that that function has a callContext availble for further
processing (hence no need in this case to execute an AttachThread() and
DetachThread()).

Not sure, whether this is a bug in the interpreter runtime. It seems
that after creating a new Rexx interpreter instance that unused instance
later interferes with the original Rexx interpreter instance?

---rony

P.S.: This use case is not yet debugged in full, as I run into problems
in the unloader, which may have to do with this. Will only be able to
trace that further later in the afternoon, or if all goes foul only
tomorrow. (And then going after the particular multithreading problem I
have been chasing down, in the case of multithreaded executed Rexx
scripts that get halted.)



------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to