Re: Segmentation fault in code - possible bug?

I've looked further into  it....

There are several steps I see that it goes through when destroying the getEntry Widget.

One of those steps is to remove it from its parent the GtkVBox.

WHen I comment out this code I don't get any segmentation faults...


On Fri, Feb 06, 2004 at 06:18:37PM +0000, John Cupitt wrote:
> Hi Joe,
> Joseph Turner wrote:
> >When I run the resulting program and press the button at the top of the 
> >window
> >it gets rid of the gtk_entry. If I keep pressing this button, I get a
> >segmentation fault.
> >
> >If I replace the entry widget with a button say, (and other code as well)
> >I can keep pressing the top button without any segmentation fault.
> You shouldn't destroy a widget more than once: it's like free()ing 
> something twice. If it didn't fault with the button there instead of the 
> entry, it's only because you were very lucky :-)
> John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]