Thanks for you explanation. I'll fix that soon. Regards Rodrigo
On Feb 13, 2008 12:30 AM, Przemyslaw Czerpak <[EMAIL PROTECTED]> wrote: > On Tue, 12 Feb 2008, Rodrigo Miguel wrote: > > Hi Pritpal, > > I'm facing the same issue with xhgtk library, it's basically the same > thing > > except that I'm using with the Browse Class. > > Here's the error message: > > Error BASE/1301 Object Destructor Failure: Reference to freed block > > BASE/1301 Object Destructor Failure: Reference to freed block > > Total memory allocated: 557807 bytes (4590 block(s)) > > WARNING! Memory allocated but not released: 36 bytes (1 block(s)) > > fm.c:623: HB_TR_ERROR Block 1 (size 32) XHGTK_TREE_ITER_NEW(0), "08, > 8.900/8- > > E.9000000000000000E00*91723)9-0.A.F000200000002000000" > > Even removing the destructor clause and put the call to xhgtk_tree_iter > to > > the "destroy" event through the callbacks, I got this error above > > Yes it is. And it's a bug in XHGTK code. Here is self contain reduced > example: > > proc main() > XHGTK_TREE_ITER_NEW() > return > #pragma begindump > HB_FUNC( XHGTK_TREE_ITER_NEW ) > { > void * treeiter = (void *) hb_gcAlloc(sizeof(void *), NULL); > hb_retptr(treeiter); > } > #pragma enddump > > It's a little bit modified to compile without GTK header files. > I do not know what this function should do but it's a bug in > Harbour and xHarbour though only Harbour can detected it and > report error. In xHarbour it will cause internal memory corruption > because this GC block is freed by garbage collector in first GC > pass after allocations and then this memory can be reused for > other things so if you will try to write sth to this block you > will corrupt some other data. All GC memory blocks have to be > attached to GC items or freed by hb_gcUnlock(). And before > attaching and freeing you cannot activate GC because it will > free the block immediately. It's a serious bug and have to > be fixed. > > best regards, > Przemek > _______________________________________________ > Harbour mailing list > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour >
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour