On Sun, 10 Feb 2008, Pritpal Bedi wrote:
> Hello Everybody
> I receive this error when executing modules with parent/child relations.
> Child records are shown in a TBrowse.
> DO_MENU (149)            description       Object Destructor Failure
> MAIN (150)               genCode           45
>                          operation         Reference to freed block
> I have tried to investigate where is the problem, but am not been able to
> figureout the exact sequence exactly in what circumstances does it happen.
> Even a simple Next/Prev movement produces this error. Anybody have a clue as
> to what circumstances may be leading to this error. xHarbour and Clipper
> compilations just do fine. 

Clipper does not have destructors and xHarbour cannot detect most
of destructors errors at all what causes memory corruption and later
GPFs. See tests/destruct.prg as an example of such errors. It also
illustrates why destructors are not safe in xHarbour which cannot
cleanly serve .prg code errors.

> Error handler control this error and then applicatiion GPF's. I will be
> trying more to isolate the problem. For sure somewhere deep inside GC
> something is happening weired. The offending line is:

It's reported from GC but the problem is in your code and
it's caused by some destructor you are using (like in destruct.prg)
or by C code which keeps references to collectible block in unknown
for GC place. 1-st I would look for all destructors in your whole
code and try to isolate the problem. It does not have to be related
to BROWSE object at all.
Of course it's also possible that it's a bug in core code so if you
can isolate it to small example then please inform me.
In isolating process hb_gcAll(.t.) can greatly help - it will force
error message because your object has cross references and it's freed
only by GC.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to