From: Rony G. F. <Ron...@wu...> - 2009-09-28 16:50:29
|
O.K. cf. <https://sourceforge.net/tracker/?func=detail&aid=2869000&group_id=119701&atid=684730> for the bug artefact and directions on how to re-create it. Please note: the exception is shown that it occurs in BSF4Rexx, not in rexx.dll, the line where it occurs is, line # 2385 in BSF4Rexx.cc, reading: fprintf(stderr, "\t---> ra~size=[%Zu]\n", rtc->ArraySize(ra));fflush(stderr); HTH, ---rony Rony G. Flatscher wrote: > > Rick McGuire wrote: >> It's also used in the unit tests and Rony appears to be using it in >> BSFRexx, so I'm fairly confident it works. This sounds like a problem >> with either a stale thread context pointer or some sort of memory >> overlay has clobbered the interface vector. >> > Yes, BSF4Rexx uses them and I think I can come up with an example > where such an exception occurs, when trying to get at the size or > items of a created RexxArrayObject. > > Here's a code excerpt: > > RexxArrayObject ra=rtc->NewArray(len); > > ... cut ... > > rtc->ArrayPut(ra, robj, i+1); // works! > > ... cut ... > > // either one ( ArraySize() or ArrayItems8) ) bombs: > > fprintf(stderr, "\triid=[%p], ---> ra~size=[%Zu]\n", riid, rtc->ArraySize(ra));fflush(stderr); > fprintf(stderr, "\triid=[%p], ---> ra~items=[%Zu]\n",riid, rtc->ArrayItems(ra));fflush(stderr); > > > The code is located in an inline function if that matters and uses a > passed in RexxThreadContext to create the RexxArrayObject and adding > items to it, if necessary (which works). When executing an > rtc->ArraySize(ra) or rtc->ArrayItems(ra) an exception occurs. > > Can reliably get the exception now that I could recreate this problem > (thought it has gone, but seeing David's post caused me to look into > that corner and after quite some time was able to create that exception). > > If you need an example for that, I can create a version of > BSF4Rexx.dll with the debug files that would cause that. (Maybe the > above is already enough to find the places/circumstances the exception > may occur.) > > Please advise. > > ---rony > |