Sorry, that was my fault, he says sheepishly.  My eyes must be getting
bad in my old age.

I only allocated the size of a pointer, then memeset the size of the struct.

>    RexxBufferObject pddBuffer = c->NewBuffer(sizeof(pCDynamicDialog));
sizeof pointer to CDynamicDialog

>    memset(pcdd, 0, sizeof(CDynamicDialog));

memset sizeof CDynamicDialog.

--
Mark Miesfeld

On Tue, Sep 8, 2009 at 6:05 PM, Mark Miesfeld<miesf...@gmail.com> wrote:
> I seem to have created a situation where the garbage collector gets in
> an infinite loop.
>
> I added one section of code where I create a RexxBufferObject for a
> struct, and now when a program ends and the interpreter goes to
> terminate, it seems to get stuck in an infinite loop.  I can see the
> CPU at 100%.  I attach the debugger and break all, then run / break,
> run / break and it is always somewhere in the collectAndUninit /
> collect / sweep ... cycle.
>
> The code is no different than what I've been doing, basically:
>
>    RexxBufferObject pddBuffer = c->NewBuffer(sizeof(pCDynamicDialog));
>    if ( pddBuffer == NULLOBJECT )
>    {
>        goto done_out;
>    }
>
>    pCDynamicDialog pcdd = (pCDynamicDialog)c->BufferData(pddBuffer);
>    memset(pcdd, 0, sizeof(CDynamicDialog));
>
>    pcdd->dlgAdm = pcpbd->dlgAdm;
>    //c->SetObjectVariable("DYNAMICCSELF", pddBuffer);
>
> I tried commenting out setting the object variable to see if that
> would clear things up, but it didn't   If I comment out the whole
> section then everything works again.  I've been making changes and
> doing a lot of testing as I go, and it really seems as though adding
> that one allocation of NewBuffer() is causing this.
>
> I'm stumped.  <grin>  I'll attach the stack traces, in a file, for
> doing the break several times so you can look at it when you have
> time.
>
> --
> Mark Miesfeld
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to