Re: normal gtk code mixed with libglade



Andrea Zagli wrote:
Il giorno dom, 12/11/2006 alle 11.20 -0500, Tristan Van Berkom ha
scritto:

That is normal, I wouldnt expect calling gtk_widget_destroy() to
destroy your window, its the combination of calling gtk_widget_destroy()
*and returning to the mainloop* that will actually remove the visible window,
nothing will be redrawn when you are sitting in a gdb breakpoint.


but when i receive the segfault, and i'm stopped into debug, the window
would have to be already destroyed

Ahem, when do you recieve the segfault ?

do you get a segfault when starting up the program ? or when
hitting the close button in the main window's frame ?


moreover, the first window is into a library called from the program



That phrase doesnt make any sence to me, so I have no idea where
you're pulling that stack trace from, so I dont know what to look for...
what exactly is the /problem/ ? is your program crashing when you call
gtk_widget_destroy() ?


sorry for my english

No problem, I dont think this is a language problem as much
as it is an understanding one... regardless of your language, you
still havent provided the usefull information needed to address
your problem, lets investigate...


my problem is:
- the program calls a library that create a window with libglade

This means: you created a widget hierarchy with libglade, possibly
calling a library that called the libglade library - while that is
unclear to me - that is completely irrelevent - lets say you created
a hierarchy with libglade.

- when the window is closed the program leaves the library

The program does not "leave the library", the program has no feet
and the library has no librarian, a heirarchy may be created by
a call to a function in libglade - the thread of execution only
enters the libglade code segment to create the hierarchy - after
that the hierarchy is "yours" to destroy at will, no more libglade
in sight here.

- returning from the library calling, the program creates another window
but _without_ libglade (with hand wrote code)

what does "returning from the library calling" mean ?

The program you attached only creates one window with a child
widget returned from some hidden code, I still have no idea about
the precice sequence of events leading up to your crash.

- when the program uses the function gtk_menu_item_new_with_mnemonic it
crashes (the stack trace is from here)

Are you claiming that gtk+ spontainiously called gtk_menu_item_new_with_mnemonic()
from inside your executable, and that it had absolutely no relevence or
connection with any user activities, such as starting up your program or
interacting with it in any way ?

if the program doesn't call the library it works

What library ? libglade ?

Please, before you reply to this mailing list, can you provide
a complete and accurate description of what you did to reproduce
the crash AND what the code was doing at the time of the crash,
or simply include a short code example (like you did here), that
we can actually use to reproduce your crash.

Cheers,
                       -Tristan



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