Hi,
without going into too much detail I would say it's hard to track down the
root cause just from the stack traces. It still looks like a memory
corruption issue that you're facing, especially because it's not a
deterministic failure. I don't see why you want to call into Rexx from
different Java threads. Rexx has a global interpreter lock so you won't
benefit from parallelism unless you have fully independent Rexx instances.

Is the code available somewhere? Can you put it on Github or some other
place so people can have a look? (You can also create private repos there)

Cheers,
Moritz

On Mon, Aug 7, 2017 at 2:01 PM, Rony G. Flatscher <rony.flatsc...@wu.ac.at>
wrote:

> After intensive further experimentations today, on one occasion I got the
> following runtime-popup-error, if this matters:
>
> ---------------------------
> Microsoft Visual C++ Runtime Library
> ---------------------------
> Debug Error!
>
> Program: C:\Program Files (x86)\ooRexx\rexx.dll
> Module: C:\Program Files (x86)\ooRexx\rexx.dll
> File: 
> g:\oorexx.tmp\oorexxsvn\main\trunk\interpreter\classes\support\hashcollection.cpp
> Line: 426
>
> Run-Time Check Failure #0 - The value of ESP was not properly saved across a 
> function call.
> This is usually a result of calling a function declared with one calling 
> convention with a function
> pointer declared with a different calling convention.
>
>
> (Press Retry to debug the application)
>
> ---------------------------
> Abort   Retry   Ignore
> ---------------------------
>
> ---
>
> After extenisve testing all day it has become clear, that there are
> actually more and different crash locations according to the call stacks.
> Somehow they depend on the intensity of updating the GUI (the Rexx class
> method uses sysSleep() to sleep between the GUI update invocations).
>
> One remarkable observation: so far *all* (!) the crashes occur *only*
> while executing Rexx code on the JavaFX-GUI thread (which was not created
> by Rexx, but by Java)!
>
> Occasionally, the program completes without an error!
> :)
>
> ---rony
>
>
>
> P.S.: It may be the case that the exceptions occur at random locations,
> nevertheless, maybe they help to shed some light where the problems become
> visible therefore a few are enclosed.
>
> Here two Java hs_error*log ("siginfo: ExceptionCode=0xc0000005, reading
> address 0x00000000") in case that matters:
>
> C  [rexx.dll+0x2a368]  MethodDictionary::getMethod+0x18
> C  [rexx.dll+0x911e6]  RexxBehaviour::methodLookup+0x26
> C  [rexx.dll+0x4c7f2]  RexxObject::messageSend+0x32
> C  [rexx.dll+0xfce7c]  ExpressionStack::send+0x3c
> C  [rexx.dll+0xfc809]  RexxExpressionMessage::evaluate+0x119
> C  [rexx.dll+0x112afe]  RexxInstruction::evaluateArguments+0x5e
> C  [rexx.dll+0xfbf1f]  RexxExpressionFunction::evaluate+0x6f
> C  [rexx.dll+0xfc748]  RexxExpressionMessage::evaluate+0x58
> C  [rexx.dll+0x112cee]  RexxInstructionExpression::evaluateExpression+0x3e
> C  [rexx.dll+0x11288a]  RexxInstructionReturn::execute+0x2a
> C  [rexx.dll+0xa93be]  *RexxActivation::run+0x39e*
> C  [rexx.dll+0xb6948]  RexxCode::run+0x58
> C  [rexx.dll+0x37243]  MethodClass::run+0x43
> C  [rexx.dll+0x4c989]  RexxObject::messageSend+0xb9
> C  [rexx.dll+0xfcee0]  ExpressionStack::send+0x40
> C  [rexx.dll+0x10e586]  RexxInstructionMessage::execute+0x156
> C  [rexx.dll+0xa93be]  *RexxActivation::run+0x39e*
> C  [rexx.dll+0xb6948]  RexxCode::run+0x58
> C  [rexx.dll+0x37243]  MethodClass::run+0x43
> C  [rexx.dll+0x4c88c]  RexxObject::messageSend+0xcc
> C  [rexx.dll+0x2b1b2]  RexxObject::sendMessage+0x22
> C  [rexx.dll+0x4b1ba]  RexxObject::uninit+0x8a
> C  [rexx.dll+0xd2894]  UninitDispatcher::run+0x24
> C  [rexx.dll+0xb9815]  NativeActivation::run+0x85
> C  [rexx.dll+0xee155]  *Activity::run+0x45*
> C  [rexx.dll+0xdb505]  MemoryObject::runUninits+0xe5
> C  [rexx.dll+0xb214f]  MemoryObject::checkUninitQueue+0x1f
> C  [rexx.dll+0xedf0f] * Activity::exitCurrentThread+0x2f*
> C  [rexx.dll+0x817dd]  ApiContext::~ApiContext+0x4d
> C  [rexx.dll+0x89106]  NewStringFromAsciiz+0x96
> C  [BSF4ooRexx.DLL+0x8b06
>
> and another hs_error-log:
>
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native 
> code)
> C  [rexx.dll+0xb9409]  *NativeActivation::findRexxContext*+0x39
> C  [rexx.dll+0xeb378]  *Activity::updateFrameMarkers*+0x38
> C  [rexx.dll+0xeb54d]  *Activity::popStackFrame*+0x7d
> C  [rexx.dll+0xa94dc]  *RexxActivation::run*+0x4bc
> C  [rexx.dll+0xb6948]  RexxCode::run+0x58
> C  [rexx.dll+0x37243]  MethodClass::run+0x43
> C  [rexx.dll+0x4c88c]  RexxObject::messageSend+0xcc
> C  [rexx.dll+0x24234]  RexxObject::sendMessage+0x24
> C  [rexx.dll+0x84c2e]  SendMessage1+0x8e
> C  [BSF4ooRexx.DLL+0x8c25]
>
>
>
> And here three Visual Studio call stacks from three different crashes from
> today, again given in case it matters:
>
> Call Stack:
>
> >     rexx.dll!MethodDictionary::getMethod(RexxString * 
> > methodName=0x7edb3268) Line 69        C++
>       rexx.dll!RexxBehaviour::methodLookup(RexxString * 
> messageName=0x7edb3268) Line 432      C++
>       rexx.dll!RexxObject::messageSend(RexxString * msgname=0x7edb3268, 
> RexxObject * * arguments=0x1ca8f488, unsigned int count=1, ProtectedObject & 
> result={...}) Line 815   C++
>       rexx.dll!RexxObject::operator_equal(RexxObject * operand=0x7dbcba08) 
> Line 2633  C++
>       rexx.dll!RexxObject::callOperatorMethod(unsigned int methodOffset=11, 
> RexxObject * argument=0x7dbcba08) Line 2955       C++
>       rexx.dll!RexxBinaryOperator::evaluate(RexxActivation * 
> context=0x7e2aa258, ExpressionStack * stack=0x7e2aa320) Line 186 C++
>       rexx.dll!RexxInstructionIf::execute(RexxActivation * 
> context=0x7e2aa258, ExpressionStack * stack=0x7e2aa320) Line 139   C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x00000000, 
> RexxString * name=0x7dbce708, RexxObject * * _arglist=0x7d8b7560, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!RexxCode::call(Activity * activity=0x7e037fa0, RoutineClass * 
> routine=0x7dbd0828, RexxString * routineName=0x7dbce708, RexxObject * * 
> argPtr=0x7d8b7560, unsigned int argcount=1, RexxString * calltype=0x7eea4a50, 
> RexxString * environment=0x00000000, ActivationContext context=EXTERNALCALL, 
> ProtectedObject & result={...}) Line 188      C++
>       rexx.dll!RoutineClass::call(Activity * activity=0x7e037fa0, RexxString 
> * routineName=0x7dbce708, RexxObject * * argPtr=0x7d8b7560, unsigned int 
> argcount=1, RexxString * calltype=0x7eea4a50, RexxString * 
> environment=0x00000000, ActivationContext context=EXTERNALCALL, 
> ProtectedObject & result={...}) Line 192     C++
>       rexx.dll!*RexxActivation::externalCall(RexxString* * target=0x7dbce708, 
> RexxObject * * arguments=0x7d8b7560, unsigned int argcount=1, RexxString * 
> calltype=0x7eea4a50, ProtectedObject & resultObj={...}) Line 2670    C++
>       rexx.dll!RexxExpressionFunction::evaluate(RexxActivation * 
> context=0x7e2a6f18, ExpressionStack * stack=0x7e2a6fe0) Line 201     C++
>       rexx.dll!RexxInstructionExpression::evaluateExpression(RexxActivation * 
> context=0x7e2a6f18, ExpressionStack * stack=0x7e2a6fe0) Line 229        C++
>       rexx.dll!RexxInstructionReturn::execute(RexxActivation * 
> context=0x7e2a6f18, ExpressionStack * stack=0x7e2a6fe0) Line 72        C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7e03a240, 
> RexxString * name=0x7ee01f78, RexxObject * * _arglist=0x1ca8f780, unsigned 
> int _argcount=2, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!RexxCode::run(Activity * activity=0x7e037fa0, MethodClass * 
> method=0x7dbe4420, RexxObject * receiver=0x7e03a240, RexxString * 
> msgname=0x7ee01f78, RexxObject * * argPtr=0x1ca8f780, unsigned int 
> argcount=2, ProtectedObject & result={...}) Line 212  C++
>       rexx.dll!MethodClass::run(Activity * activity=0x7e037fa0, RexxObject * 
> receiver=0x7e03a240, RexxString * msgname=0x7ee01f78, RexxObject * * 
> argPtr=0x1ca8f780, unsigned int count=2, ProtectedObject & result={...}) Line 
> 170   C++
>       rexx.dll!RexxObject::processUnknown(RexxString * 
> messageName=0x7dc94288, RexxObject * * arguments=0x7d8b74f4, unsigned int 
> count=1, ProtectedObject & result={...}) Line 948    C++
>       rexx.dll!RexxObject::messageSend(RexxString * msgname=0x7dc94288, 
> RexxObject * * arguments=0x7d8b74f4, unsigned int count=1, ProtectedObject & 
> result={...}) Line 842   C++
>       rexx.dll!ExpressionStack::send(RexxString * message=0x7dc94288, 
> unsigned int count=1, ProtectedObject & result={...}) Line 80   C++
>       rexx.dll!RexxInstructionMessage::execute(RexxActivation * 
> context=0x7e29ae90, ExpressionStack * stack=0x7e29af58) Line 188      C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7dcc8300, 
> RexxString * name=0x7dfbc468, RexxObject * * _arglist=0x7d8b744c, unsigned 
> int _argcount=4, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!RexxCode::run(Activity * activity=0x7e037fa0, MethodClass * 
> method=0x7dc95e48, RexxObject * receiver=0x7dcc8300, RexxString * 
> msgname=0x7dfbc468, RexxObject * * argPtr=0x7d8b744c, unsigned int 
> argcount=4, ProtectedObject & result={...}) Line 212  C++
>       rexx.dll!MethodClass::run(Activity * activity=0x7e037fa0, RexxObject * 
> receiver=0x7dcc8300, RexxString * msgname=0x7dfbc468, RexxObject * * 
> argPtr=0x7d8b744c, unsigned int count=4, ProtectedObject & result={...}) Line 
> 170   C++
>       rexx.dll!RexxObject::messageSend(RexxString * msgname=0x7dfbc468, 
> RexxObject * * arguments=0x7d8b744c, unsigned int count=4, ProtectedObject & 
> result={...}) Line 839   C++
>       rexx.dll!ExpressionStack::send(RexxString * message=0x7dfbc468, 
> unsigned int count=4, ProtectedObject & result={...}) Line 80   C++
>       rexx.dll!RexxInstructionMessage::execute(RexxActivation * 
> context=0x7e249d78, ExpressionStack * stack=0x7e249e40) Line 188      C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7dfbe428, 
> RexxString * name=0x7dfb91b8, RexxObject * * _arglist=0x7d8b74e8, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!*RexxActivation::dispatch() *Line 441  C++
>       rexx.dll!*Activity::runThread()* Line 208       C++
>       rexx.dll!dispatch_activity_function(void * arguments=0x7e037fa0) Line 
> 65        C++
>       kernel32.dll!@BaseThreadInitThunk@12 () Unknown
>       ntdll.dll!___RtlUserThreadStart@8 ()    Unknown
>       ntdll.dll!__RtlUserThreadStart@8 ()     Unknown
>
>
> Locals:
>
> -             this    0x00000000 <NULL>       MethodDictionary *
>       +               StringHashCollection    <struct at NULL>        
> StringHashCollection
>                       instanceMethods <Unable to read memory> 
>                       scopeList       <Unable to read memory> 
>                       scopeOrders     <Unable to read memory> 
> -             methodName      0x7edb3268 {hashValue=61 length=1 
> numberStringValue=0x00000000 <NULL> ...}      RexxString *
>       +               RexxObject      {objectVariables=0x00000000 <NULL> }    
> RexxObject
>                       hashValue       61      unsigned int
>                       length  1       unsigned int
>       +               numberStringValue       0x00000000 <NULL>       
> NumberString *
>               -               attributes      {flags={_Array=0x7edb3288 {18} 
> } }      FlagSet<enum RexxString::StringFlag,32>
>               -               flags   {_Array=0x7edb3288 {18} }       
> std::bitset<32>
>               -               _Array  0x7edb3288 {18} unsigned long[1]
>                               [0]     18      unsigned long
>               -               stringData      0x7edb328c "="  char[4]
>                       [0]     61 '='  char
>                       [1]     0 '\0'  char
>                       [2]     0 '\0'  char
>                       [3]     0 '\0'  char
>
>
>
> And here one that we have seen in the past as well:
>
> -------------------
>
> Call Stack:
>
> >     rexx.dll!ObjectHeader::isObjectMarked(unsigned int mark=65) Line 119    
> > C++
>       rexx.dll!RexxInternalObject::isObjectMarked(unsigned int markword=65) 
> Line 288  C++
>       rexx.dll!*N**ativeActivation::live*(unsigned int liveMark=65) Line 136  
> C++
>       rexx.dll!MemoryObject::markObjectsMain(RexxInternalObject * 
> rootObject=0x63cef698) Line 256     C++
>       rexx.dll!MemoryObject::markObjects() Line 414   C++
>       rexx.dll!MemoryObject::collect() Line 765       C++
>       rexx.dll!NormalSegmentSet::handleAllocationFailure(unsigned int 
> allocationLength=24) Line 1314  C++
>       rexx.dll!MemoryObject::newObject(unsigned int requestLength=24, 
> unsigned int type=28) Line 857  C++
>       rexx.dll!new_object(unsigned int s=24, unsigned int t=28) Line 442      
> C++
>       rexx.dll!StringTable::operator new(unsigned int size=24) Line 71        
> C++
>       rexx.dll!new_string_table(unsigned int capacity=17) Line 70     C++
>       rexx.dll!*RexxActivation::checkTrapTable*() Line 1409   C++
>       rexx.dll!*RexxActivation::trapOn*(RexxString * condition=0x7dbb6be0, 
> RexxInstructionTrapBase * handler=0x7dc93b20, bool signal=true) Line 1433  C++
>       rexx.dll!RexxInstructionSignalOn::execute(RexxActivation * 
> context=0x7e05a5d8, ExpressionStack * stack=0x7e05a6a0) Line 311     C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7dcc8300, 
> RexxString * name=0x7dfbbd78, RexxObject * * _arglist=0x7d8b504c, unsigned 
> int _argcount=4, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!RexxCode::run(Activity * activity=0x7e037c20, MethodClass * 
> method=0x7dc94638, RexxObject * receiver=0x7dcc8300, RexxString * 
> msgname=0x7dfbbd78, RexxObject * * argPtr=0x7d8b504c, unsigned int 
> argcount=4, ProtectedObject & result={...}) Line 212  C++
>       rexx.dll!MethodClass::run(Activity * activity=0x7e037c20, RexxObject * 
> receiver=0x7dcc8300, RexxString * msgname=0x7dfbbd78, RexxObject * * 
> argPtr=0x7d8b504c, unsigned int count=4, ProtectedObject & result={...}) Line 
> 170   C++
>       rexx.dll!RexxObject::messageSend(RexxString * msgname=0x7dfbbd78, 
> RexxObject * * arguments=0x7d8b504c, unsigned int count=4, ProtectedObject & 
> result={...}) Line 839   C++
>       rexx.dll!ExpressionStack::send(RexxString * message=0x7dfbbd78, 
> unsigned int count=4, ProtectedObject & result={...}) Line 80   C++
>       rexx.dll!RexxInstructionMessage::execute(RexxActivation * 
> context=0x7e037ae8, ExpressionStack * stack=0x7e037bb0) Line 188      C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7dfbe428, 
> RexxString * name=0x7dfb91b8, RexxObject * * _arglist=0x7d8b50e8, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!*RexxActivation::dispatch*() Line 441  C++
>       rexx.dll!*Activity::runThread() *Line 208       C++
>       rexx.dll!dispatch_activity_function(void * arguments=0x7e037c20) Line 
> 65        C++
>       kernel32.dll!@BaseThreadInitThunk@12 () Unknown
>       ntdll.dll!___RtlUserThreadStart@8 ()    Unknown
>       ntdll.dll!__RtlUserThreadStart@8 ()     Unknown
>
>
> Locals:
>
>
> -             this    0x00000008 {objectSize=??? flags=??? sizePadding=??? }  
> ObjectHeader *
>                       objectSize      <Unable to read memory> 
>                       flags   <Unable to read memory> 
>                       sizePadding     <Unable to read memory> 
>               mark    65      unsigned int
>
> This one is a new one for me:
>
> >     rexx.dll!*NativeActivation::setDigits*(long _digits=18) Line 2133       
> > C++
>       rexx.dll!RexxInstructionNumeric::execute(RexxActivation * 
> context=0x7e19f3f0, ExpressionStack * stack=0x7e19f4b8) Line 106      C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7e19eba8, 
> RexxString * name=0x7edba868, RexxObject * * _arglist=0x1cacf860, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!RexxCode::run(Activity * activity=0x7e038620, MethodClass * 
> method=0x7edd23a0, RexxObject * receiver=0x7e19eba8, RexxString * 
> msgname=0x7edba868, RexxObject * * argPtr=0x1cacf860, unsigned int 
> argcount=1, ProtectedObject & result={...}) Line 212  C++
>       rexx.dll!MethodClass::run(Activity * activity=0x7e038620, RexxObject * 
> receiver=0x7e19eba8, RexxString * msgname=0x7edba868, RexxObject * * 
> argPtr=0x1cacf860, unsigned int count=1, ProtectedObject & result={...}) Line 
> 170   C++
>       rexx.dll!RexxObject::messageSend(RexxString * msgname=0x7edba868, 
> RexxObject * * arguments=0x1cacf860, unsigned int count=1, ProtectedObject & 
> result={...}) Line 839   C++
>       rexx.dll!RexxObject::operator_minus(RexxObject * operand=0x7e021bd0) 
> Line 2624  C++
>       rexx.dll!RexxObject::callOperatorMethod(unsigned int methodOffset=2, 
> RexxObject * argument=0x7e021bd0) Line 2955        C++
>       rexx.dll!RexxBinaryOperator::evaluate(RexxActivation * 
> context=0x7e0384e8, ExpressionStack * stack=0x7e0385b0) Line 186 C++
>       rexx.dll!RexxInstructionAssignment::execute(RexxActivation * 
> context=0x7e0384e8, ExpressionStack * stack=0x7e0385b0) Line 129   C++
>       rexx.dll!*RexxActivation::run*(RexxObject * _receiver=0x7dfbee10, 
> RexxString * name=0x7dfb92e8, RexxObject * * _arglist=0x7d8b50e8, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620   C++
>       rexx.dll!*RexxActivation::dispatch*() Line 441  C++
>       rexx.dll!*Activity::runThread*() Line 208       C++
>       rexx.dll!dispatch_activity_function(void * arguments=0x7e038620) Line 
> 65        C++
>       kernel32.dll!@BaseThreadInitThunk@12 () Unknown
>       ntdll.dll!___RtlUserThreadStart@8 ()    Unknown
>       ntdll.dll!__RtlUserThreadStart@8 ()     Unknown
>
>
> Locals:
>
>
> -             this    0x7e19f3f0 {activity=0x7de477e0 {instance=0x7de47b40 
> {context={instanceContext={functions=0x63ce74c4 
> {rexx.dll!RexxInstanceInterface InterpreterInstance::interfaceVector} {...} 
> ...} ...} ...} ...} ...}       NativeActivation *
>       +               ActivationBase  {previous=0x00000000 <NULL> 
> executable=0x00000000 <NULL> objectScope=SCOPE_RELEASED (0) }       
> ActivationBase
>       +               activity        0x7de477e0 {instance=0x7de47b40 
> {context={instanceContext={functions=0x63ce74c4 
> {rexx.dll!RexxInstanceInterface InterpreterInstance::interfaceVector} {...} 
> ...} ...} ...} ...} Activity *
>       +               code    0x00000000 <NULL>       NativeCode *
>       +               receiver        0x00000000 <NULL>       RexxObject *
>       +               messageName     0x00000000 <NULL>       RexxString *
>       +               activation      0x00000000 <NULL>       RexxActivation *
>                       argCount        0       unsigned int
>       +               argList 0x00000000 {???}        RexxObject * *
>       +               argArray        0x00000000 <NULL>       ArrayClass *
>       +               firstSavedObject        0x00000000 <NULL>       
> RexxInternalObject *
>       +               saveList        0x7e19ecf8 
> {reservingActivity=0x00000000 <NULL> contents=0x7e19ed20 {...} 
> waitingActivities=0x00000000 <NULL> ...}      IdentityTable * 
> {VariableDictionary}
>       +               result  0x00000000 <NULL>       RexxObject *
>                       activationType  PROGRAM_ACTIVATION (0)  
> NativeActivation::ActivationType
>       +               conditionObj    0x00000000 <NULL>       DirectoryClass *
>       +               securityManager 0x00000000 <NULL>       SecurityManager 
> *
>       +               objectVariables 0x00000000 <NULL>       
> VariableDictionary *
>                       stackBase       true    bool
>                       trapErrors      true    bool
>                       trapConditions  false   bool
>                       variablePoolEnabled     false   bool
>       +               iterator        {dictionary=0x00000000 <NULL> 
> dictionaryIterator={contents=0x00000000 <NULL> position=0 nextBucket=0 } ...} 
>     VariableDictionary::VariableIterator
>               _digits 18      long
>
>
>
>
> On 06.08.2017 19:37, Rony G. Flatscher wrote:
>
> In GUI systems the GUI maintenance and interaction are usually
> single-threaded. As a consequence calls to interact with GUI objects must
> be executed on that GUI thread, otherwise undefined behaviour may occur
> (usually hanging the GUI and its applications).
>
> GUI systems usually supply a utility method that allows one to be called
> on the GUI thread later.
> As students are using the JavaFX GUI system (very easy to create complex
> GUIs with SceneBuilder) it has been interesting to observe the difficulties
> they (and "normal" users as well!) face when trying to correctly interface
> with the GUI on the GUI thread.
>
> In order to come up with a solution that eases correct addressing of GUI
> objects for Rexx programmers, I came up with a utility class that will
> dispatch Rexx messages when being executed on the GUI thread.
>
> While creating a tutorial application (one that uses a progress bar and
> various labels to give feedback to the user) everything has been working
> out fine, initially. Running a demo application, that constantly updates
> the GUI objects (without hanging the GUI! :) ) in sub-second intervals (to
> animate the progress bar and the datetime displayed in the labels) will run
> successfully and animates the progress bar and updates the labels
> accordingly. The principles deployed are:
>
>    - a Rexx program uses JavaFX to load and create a GUI from a
>    fxml-file, which includes two Rexx programs that get invoked one after the
>    other by the Java FXMLLoader class correctly,
>    - the GUI is created and displayed (GUI objects are configured by the
>    Rexx controller program (which requires a Rexx package containing the
>    Worker class that carries out thw work),
>    - when pressing the start button a class method in the worker class
>    gets invoked on the GUI thread and issues a "reply" to continue its work on
>    a new (non-GUI) thread and it invokes an unguarded class method that issues
>    a "reply" itself and which updates the GUI; the progress of the work
>    between the Rexx class methods is communicated via class attributes, the
>    GUI-updating Rexx method uses the JavaFX runLater-Utility method to have
>    the updating Rexx messages be carried out on the GUI thread later
>
> This works. :)
>
> Here, there are at least two Rexx threads running concurrently (the Rexx
> worker method and the Rexx GUI updating method both employ "reply" and
> execute for the duration of the worker method) plus the JavaFX-GUI-thread
> which dispatches the Rexx messages coming from the Rexx GUI updating method.
>
> Then, between three and 30 seconds in running the demo application two
> different things may happen: a crash "out of the blue" or the "stalling of
> the program".
>
> It may be interesting to know that this demo application now is always
> able to cause these fatal errors to occur (if they occur, then always, when
> Rexx messages are originating from the Java GUI thread!). And it seems that
> there are only two different stack traces that play a role here!
>
> Therefore this demo application may be eligible to be used to debug the
> problem, as the fatal errors are reproducible!
>
> I can create a zip-archive that contains this application with the minimal
> needed BSF4ooRexx files e.g. for 32-bit Windows (then one needs to make
> sure that a 32-bit Java is also installed in addition to a 64-bit Java).
> This should allow anyone who knows ooRexx  inner workings to start to debug
> this problem that has been hunting us for months by now!
>
> So really seeking for help for fixing this! If there is anything else I
> can do to help debug this, please advise!
>
> ---rony
>
> P.S.: Here are the two different pieces of information, depending whether
> the application was started via Java or via Rexx:
>
>    - via Java, hs_error*log-file stack-trace:
>
>    C  [rexx.dll+0xc6479]  DeadObject::remove+0x29
>    C  [rexx.dll+0xce90e]  DeadObjectPool::findFit+0x6e
>    C  [rexx.dll+0xce4cf]  NormalSegmentSet::allocateObject+0xff
>    C  [rexx.dll+0xdb053]  MemoryObject::newObject+0x63
>    C  [rexx.dll+0x23eb5]  new_object+0x15
>    C  [rexx.dll+0xb8661]  NativeActivation::operator new+0x11
>    C  [rexx.dll+0xe32e1]  ActivityManager::newNativeActivation+0x41
>    C  [rexx.dll+0xeb488]  Activity::createNewActivationStack+0x28
>    C  [rexx.dll+0xedcb5]  Activity::nestAttach+0x25
>    C  [rexx.dll+0x1430c8]  InterpreterInstance::attachThread+0x58
>    C  [rexx.dll+0x14317f]  InterpreterInstance::attachThread+0x1f
>    C  [rexx.dll+0x828e2]  AttachThread+0x32
>    C  [BSF4ooRexx.dll+0x8aa4]
>
>
>
>    - or via Rexx and then using Visual Studio, e.g.
>    - Call Stack
>
>       >       rexx.dll!MethodDictionary::getMethod(RexxString * 
> methodName=0x7ed9a640) Line 69        C++
>               rexx.dll!RexxBehaviour::methodLookup(RexxString * 
> messageName=0x7ed9a640) Line 432      C++
>               rexx.dll!RexxObject::messageSend(RexxString * 
> msgname=0x7ed9a640, RexxObject * * arguments=0x1cd6f3b8, unsigned int 
> count=1, ProtectedObject & result={...}) Line 815   C++
>               rexx.dll!RexxObject::operator_integerDivide(RexxObject * 
> operand=0x7e038f88) Line 2627  C++
>               rexx.dll!RexxObject::callOperatorMethod(unsigned int 
> methodOffset=5, RexxObject * argument=0x7e038f88) Line 2955        C++
>               rexx.dll!RexxBinaryOperator::evaluate(RexxActivation * 
> context=0x7e038d70, ExpressionStack * stack=0x7e038e38) Line 186 C++
>               
> rexx.dll!RexxInstructionExpression::evaluateExpression(RexxActivation * 
> context=0x7e038d70, ExpressionStack * stack=0x7e038e38) Line 229        C++
>               rexx.dll!RexxInstructionReturn::execute(RexxActivation * 
> context=0x7e038d70, ExpressionStack * stack=0x7e038e38) Line 72        C++
>               rexx.dll!RexxActivation::run(RexxObject * _receiver=0x7e034178, 
> RexxString * name=0x7ed97e38, RexxObject * * _arglist=0x7d8950f0, unsigned 
> int _argcount=0, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620     C++
>               rexx.dll!RexxCode::run(Activity * activity=0x7e0153d0, 
> MethodClass * method=0x7ed9a7e8, RexxObject * receiver=0x7e034178, RexxString 
> * msgname=0x7ed97e38, RexxObject * * argPtr=0x7d8950f0, unsigned int 
> argcount=0, ProtectedObject & result={...}) Line 212  C++
>               rexx.dll!MethodClass::run(Activity * activity=0x7e0153d0, 
> RexxObject * receiver=0x7e034178, RexxString * msgname=0x7ed97e38, RexxObject 
> * * argPtr=0x7d8950f0, unsigned int count=0, ProtectedObject & result={...}) 
> Line 170   C++
>               rexx.dll!RexxObject::messageSend(RexxString * 
> msgname=0x7ed97e38, RexxObject * * arguments=0x7d8950f0, unsigned int 
> count=0, ProtectedObject & result={...}) Line 839   C++
>               rexx.dll!ExpressionStack::send(RexxString * message=0x7ed97e38, 
> unsigned int count=0, ProtectedObject & result={...}) Line 80   C++
>               rexx.dll!RexxExpressionMessage::evaluate(RexxActivation * 
> context=0x7e038c38, ExpressionStack * stack=0x7e038d00) Line 191      C++
>               rexx.dll!RexxInstructionAssignment::execute(RexxActivation * 
> context=0x7e038c38, ExpressionStack * stack=0x7e038d00) Line 129   C++
>               rexx.dll!RexxActivation::run(RexxObject * _receiver=0x7e034178, 
> RexxString * name=0x7ed93730, RexxObject * * _arglist=0x00000000, unsigned 
> int _argcount=0, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620     C++
>               rexx.dll!RexxCode::run(Activity * activity=0x7e0153d0, 
> MethodClass * method=0x7ed9a4c0, RexxObject * receiver=0x7e034178, RexxString 
> * msgname=0x7ed93730, RexxObject * * argPtr=0x00000000, unsigned int 
> argcount=0, ProtectedObject & result={...}) Line 212  C++
>               rexx.dll!MethodClass::run(Activity * activity=0x7e0153d0, 
> RexxObject * receiver=0x7e034178, RexxString * msgname=0x7ed93730, RexxObject 
> * * argPtr=0x00000000, unsigned int count=0, ProtectedObject & result={...}) 
> Line 170   C++
>               rexx.dll!RexxObject::messageSend(RexxString * 
> msgname=0x7ed93730, RexxObject * * arguments=0x00000000, unsigned int 
> count=0, ProtectedObject & result={...}) Line 839   C++
>               rexx.dll!RexxObject::sendMessage(RexxString * 
> message=0x7ed93730, ProtectedObject & result={...}) Line 486      C++
>               rexx.dll!RexxInternalObject::requestString() Line 1201  C++
>               rexx.dll!RexxString::concatBlank(RexxObject * 
> otherObj=0x7e034178) Line 1293    C++
>               rexx.dll!RexxObject::callOperatorMethod(unsigned int 
> methodOffset=10, RexxObject * argument=0x7e034178) Line 2955       C++
>               rexx.dll!RexxBinaryOperator::evaluate(RexxActivation * 
> context=0x7e015298, ExpressionStack * stack=0x7e015360) Line 186 C++
>               rexx.dll!RexxInstruction::evaluateArguments(RexxActivation * 
> context=0x7e015298, ExpressionStack * stack=0x7e015360, RexxInternalObject * 
> * argArray=0x7df99f68, unsigned int argCount=4) Line 154      C++
>               rexx.dll!RexxInstructionMessage::execute(RexxActivation * 
> context=0x7e015298, ExpressionStack * stack=0x7e015360) Line 180      C++
>               rexx.dll!RexxActivation::run(RexxObject * _receiver=0x7df9bbc0, 
> RexxString * name=0x7df96c10, RexxObject * * _arglist=0x7d8950e4, unsigned 
> int _argcount=1, RexxInstruction * start=0x00000000, ProtectedObject & 
> resultObj={...}) Line 620     C++
>               rexx.dll!RexxActivation::dispatch() Line 441    C++
>               rexx.dll!Activity::runThread() Line 208 C++
>               rexx.dll!dispatch_activity_function(void * 
> arguments=0x7e0153d0) Line 65        C++
>               kernel32.dll!@BaseThreadInitThunk@12 () Unknown
>               ntdll.dll!___RtlUserThreadStart@8 ()    Unknown
>               ntdll.dll!__RtlUserThreadStart@8 ()     Unknown
>
>       - Locals:
>
>       *-              this    0x00000000 <NULL>       MethodDictionary **
>       +               StringHashCollection    <struct at NULL>        
> StringHashCollection
>                       instanceMethods <Unable to read memory> 
>                       scopeList       <Unable to read memory> 
>                       scopeOrders     <Unable to read memory> 
>       -               methodName      0x7ed9a640 {hashValue=37 length=1 
> numberStringValue=0x00000000 <NULL> ...}      RexxString *
>       -               RexxObject      {objectVariables=0x00000000 <NULL> }    
> RexxObject
>       +               RexxInternalObject      {header={objectSize=40 flags=96 
> sizePadding=96 } behaviour=rexx.dll!0x62fad3d8 {classType=T_String (22) ...} 
> }  RexxInternalObject
>       -               objectVariables 0x00000000 <NULL>       
> VariableDictionary *
>       +               RexxInternalObject      <struct at NULL>        
> RexxInternalObject
>                       reservingActivity       <Unable to read memory> 
>                       contents        <Unable to read memory> 
>                       waitingActivities       <Unable to read memory> 
>                       flags   <Unable to read memory> 
>                       reserveCount    <Unable to read memory> 
>                       nextDictionary  <Unable to read memory> 
>                       scope   <Unable to read memory> 
>                       hashValue       37      unsigned int
>                       length  1       unsigned int
>       -               numberStringValue       0x00000000 <NULL>       
> NumberString *
>       +               NumberStringBase        <struct at NULL>        
> NumberStringBase
>       +               numberDigits    0x0000002c <Error reading characters of 
> string.>        char[4]
>       -               attributes      {flags={_Array=0x7ed9a660 {18} } }      
> FlagSet<enum RexxString::StringFlag,32>
>       +               flags   {_Array=0x7ed9a660 {18} }       std::bitset<32>
>       -               stringData      0x7ed9a664 "%"  char[4]
>                       [0]     37 '%'  char
>                       [1]     0 '\0'  char
>                       [2]     0 '\0'  char
>                       [3]     0 '\0'  char
>
>
>
>
>
> ------------------------------------------------------------
> ------------------
> 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
>
>


-- 
Moritz Hoffmann;
http://antiguru.de/
------------------------------------------------------------------------------
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

Reply via email to