[Gambas-user] About #6 term signal , object deletion and memory leaks

Benoit Minisini gambas at ...1...
Wed Jul 26 20:31:27 CEST 2006


On Wednesday 26 July 2006 17:37, Antonio Jesús Dávila wrote:
> Hello Gambas user !!
>
> I am new in gambas, and i have some problems , i love it more than vb
> because, gambas don't have these strange manner of do some things that
> vb have.
>
>  mi problem is sometimes, in arbitrary point of the app i receive an
> error (the program was halted sending signal #6 ) and my app end
>
> some times gambas output(console from gambas was launched)  shows
>
>  *** glibc detected *** free(): invalid pointer: 0x082dcd40 ***

This messages means that there is a bug in the interpreter that corrupted the 
memory, and that glibc detected it. So it aborted the program by sending it 
the signal #6.

>
>  my gambas console outputs shows :
>
>  WARNING: circular references detected
>  FIntro (1)
>  CWarehouse (1)
>  CCore (1)
>  FXmlForm (1)
>  CMSystem (1)
>  CFormItemBackground (1)
>  CFormItemButton (1)
>  CFormItemLabel (1)
>  CFormItemPicture (2)
>  Mutex destroy failure: Dispositivo ó recurso ocupado(device o resource
> busy)
>  WARNING: 86 allocation(s) non freed.
>
> Some questions i have , that faq's and help don't answer:
>
> is enought to delete an object doing obj = null ?  

No. An object is deleted only when nothing has a reference on it.

> if the object has two 
> vars pointing at him ? is in gambas some garbage collector like java ?

No garbage collector.

>
> can the circular references be my problem ?

No. The interpreter should *never* crash.

>
> i search info about signal term #6 but only description is "abort",
> which error force gambas to raise #6 term signal error ?
>
> there are a function to validate a pointer is valid ?
>
> i try to use _free() but it likes never be called by the system i am
> doing something  wrong ?

_free() is not used anymore for classes written in Gambas. 

You must:
* Tell me what version of gambas you use.
* Send me your project.
* Tell me how to reproduce the signal #6

Regards,

-- 
Benoit Minisini




More information about the User mailing list