While going after the current state of some of the reported crashes in the past
(could not recreate
any anymore) I stumbled over a problem, which may mostly be linked to changes I
did to BSF4ooRexx in
the past weeks, so will have to go after them one by one.
One interesting thing maybe is as follows: while doing the work on BSF4ooRexx
(new reflection core
to allow it to work from Java 1.6 onward to Java 9 and beyond) I added caching
on the Java side and
made BSF4ooRexx faster on its Rexx side by fetching the most used external BSF
Rexx functions
individually to make them available via .routines, which improves speed
considerably compared to
using the normal function lookup (intend to talk about my findings at this
year's symposium in the
workshop following the symposium, have no slides yet to point to). So a new
pattern here is that
most invocations from Rexx will excercise someRoutine~call(...) or
someRoutine~callWith(...) and the
calls occur with more intensity than before in the test unit cases (see below).
The strange thing is as follows:
* there are test units for different parts of BSF4ooRexx using ooRexx' test
unit framework, namely
testOORexx.rex to instrumentate them,
* when running three subgroups independently from each other, all pass
without errors,
* when running all three subgroups together in one run, then there are five
failures and one error
on Windows and Linux
The error looks like it BSF4ooRexx could not be the culprit, as it occurs from
a call from Rexx to
an external Rexx function remaining in C++ (so no Java involved here; the
function call should
return .nil as this test case tests that no "userData" Rexx object is defined):
[error] [20180318 21:56:42.853000] svn: runknown Change date: unknown Test:
TEST_01_PLAIN_BSFREXXPROXY Class: testBsfProxyObject1 File:
F:\work\svn\bsf4oorexx\...\01_rexx_testBsfProxyObject.testGroup Event:
[SYNTAX 88.909] raised
unexpectedly. Argument index must have a string value. Line: 55 *-*
Compiled method "AT" with
scope "Directory". *-* Compiled routine "BSFREXXPROXY". *55 *-*
ud2=BsfRexxProxy(rpo,
"userData")* *-* Compiled method "SEND" with scope "Message". 1631 *-*
.message~new(self,
methodName)~send 1609 *-* self~doTheTest(fName, aTestResult) -- carry out
the testmethod 553 *-*
test~execute(testResult, verbose) 553 *-* test~execute(testResult, verbose)
115 *-*
suite~execute(testResult) 79 *-* retCode = 'worker.rex'(arguments)
The external Rexx function BsfRexxProxy() is coded like this (excerpt):
//
---------------------------------------------------------------------------------------
//
---rgf, 2009-09-06: usage BsfRexxProxy(proxy [, "ooRexxObject" | "userData"
| "refCount"]) //
argument 1: // proxy ... must be a RexxProxy object, i.e. a BSF-wrapped
Java RexxProxy object //
argument 2: // "ooRexxObject" (default) ... return ooRexx object that gets
proxied // "userData"
... return ooRexx object representing the supplied "userData" object at
creation time, or .nil
// "refCount" ... return actual number of references for this RexxProxy
RexxRoutine2(RexxObjectPtr, BsfRexxProxy, RexxObjectPtr, proxy,
OPTIONAL_CSTRING, arg2val) { //
process argument 1, check whether proxy is a RexxProxy indeed // 1)
instance of BSF or a
subclass ? (a must) RexxStringObject rexxObjectID=NULL; logical_t
flag=context->IsOfType(proxy,
"BSF"); if (flag==1) // o.k., proceed { // try to get the RexxObjectID
rexxObjectID=(RexxStringObject) context->SendMessage0(proxy,
"GETREXXOBJECTID"); // get
RexxObjectID } if (flag==0 || rexxObjectID==NULL ||
context->CheckCondition()) // not a
RexxProxy object that points to a valid (cached) Rexx object! { // get and
supply condition
message logical_t bCondition= context->CheckCondition(); char *cond_msg=new
char[2048]; if
(bCondition) // clear a pending condition { RexxDirectoryObject
condObj=context->GetConditionInfo(); char * msg=RgfCreateRexxlikeErrorInfo
(context->threadContext, condObj, ""); snprintf( cond_msg, 2048, "
[underlying Rexx condition:
'%.1536s']", msg); RexxFreeMemory(msg); context->ClearCondition(); } //
context->InvalidRoutine(); char *msg=new char[4096]; if (flag==0 ||
bCondition==1) { snprintf(
msg, 4096, "%.16s/routine/BsfRexxProxy(), error 1: argument 1 must be
RexxProxy object, received
'%.1536s' of type '%s' '%.2048s'", DLLNAME,
context->ObjectToStringValue(proxy),
context->ObjectToStringValue( context->SendMessage0(proxy, "CLASS") ),
cond_msg ); } else //
rexxObjectId == NULL { snprintf( msg, 4096, "%.16s/routine/BsfRexxProxy(),
error 2: argument 1
does not embed a Rexx object (returns \"NULL\"), supplied RexxProxy object:
'%.1536s' of type
'%s' ", DLLNAME, context->ObjectToStringValue(proxy),
context->ObjectToStringValue(
context->SendMessage0(proxy, "CLASS") ) ); }
context->RaiseException1(Rexx_Error_Incorrect_call_user_defined,
context->String(msg)); delete
[] cond_msg; delete [] msg; return NULL; } RexxObjectPtr rop=NULL; // o.k.
so far, process
argument 2 if (arg2val==NULL || arg2val[0]=='o' || arg2val[0]=='O') // get
and return proxied
Rexx object { rop=RgfGetProxyObject(context->threadContext, rexxObjectID);
} else if
(arg2val[0]=='u' || arg2val[0]=='U') // get and return userData, or .nil,
if none supplied {
RexxObjectPtr rexxUserDataID=context->SendMessage0(proxy,
"GETREXXUSERDATAID"); // get
RexxObjectID if (rexxUserDataID==context->Nil()) // none defined, returns
.nil { return
rexxUserDataID; // return .nil }
rop=RgfGetProxyObject(context->threadContext,
(RexxStringObject) rexxUserDataID); } else if (arg2val[0]=='r' ||
arg2val[0]=='R') // get and
return current refCount value {
rop=RgfGetProxyObjectRefCount(context->threadContext,
rexxObjectID); } else { char *msg=new char[4096]; snprintf( msg, 4096,
"%.16s/routine/BsfRexxProxy(), error 3: illegal argument 2 value '%.3900s'
(valid:
'ooRexxObject', 'userData', 'refCount').", DLLNAME, arg2val);
context->RaiseException1(Rexx_Error_Incorrect_call_user_defined,
context->String(msg)); delete
[] msg; return NULL; } return rop; }
The failures, which I need to research on the BSF4ooRexx side are all (but one)
related to returning
the .nil object:
[failure] [20180318 21:56:44.600000] svn: runknown Change date: unknown
Test:
TEST_08_TEST_CONSTRUCTORS_AND_FIELDS Class: testAbstractCallback1 File:
F:\work\svn\bsf4oorexx\...\03_rexx_testAbstractCallback.testGroup Line: 273
Failed: assertEquals
Expected: [[The NIL object], identityHash="-8796084307793"] Actual: [[.NIL],
identityHash="-8796058392961"] [failure] [20180318 21:56:45.661000] svn:
runknown Change date:
unknown Test: TEST_08_TEST_CONSTRUCTORS_AND_FIELDS Class:
testNormalTestCallback1 File:
F:\work\svn\bsf4oorexx\...\03_rexx_testExtendNormalCallback.testGroup Line:
416 Failed:
assertEquals Expected: [[The NIL object], identityHash="-8796084307793"]
Actual: [[.NIL],
identityHash="-8796045902321"] [failure] [20180318 21:56:46.067000] svn:
runknown Change date:
unknown Test: TEST_14_TEST_FORWARDTOSUPER Class: testNormalTestCallback1
File:
F:\work\svn\bsf4oorexx\...\03_rexx_testExtendNormalCallback.testGroup Line:
929 Failed:
assertNull Expected: [.nil] Actual: [[.NIL], identityHash="-8796043219617"]
Just mentioning these three failures as maybe there is some side-effect from
the new "dot variable"
(environment symbol) lookup as they and also the above error is linked to
returning .nil values.
Again, except of the error case I am not sure yet, whether the failures are
rooted in some (timing)
errors in the BSF4ooRexx code.
---
Now, I could come up with a zip archive that would be prepared such, that it is
simple to run these
BSF4ooRexx units as described to debug the external function call. As this will
take quite some time
and currently I am pressed by time, I just want to make sure that such a zip
archive would get
tested for that error. The only prerequisite would be to have Java installed
with the same bitness
as the Rexx interpreter. Everything else I can setup via scripts.
The idea would be to make this a "zero-invasive" zip archive for the sole
purpose of checking out
that error which only occurs if all the test cases get instrumentated by
testOORexx.rex. So shall I
come up with such a zip archive (by Tuesday the latest)?
---rony
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel