Re: [gtk-list] Re: Found: Shortest way to trigger core-dump :-(



On Wed, 21 Apr 1999, Bertrand Guiheneuf wrote:

> Well, stack corruption often leads to funny bugs....
... yes I had much fun while the two days of debugging work :-) ...
 
> using a pointer to an object in the stack as a *global*
> callback data is an error. It may work if the stack has not been
> not overwritten when the the window object is accessed
> (for instance if you don't call functions
> between the moment you allocate the variable in the
> stack, and the moment the callback is called).
I'm convinced now.
 
> PS: I think you have no choice but putting you window
> object in "global" space, ie use malloc or declare
> it statically as a (may be static) variable.
I declared window static (but locally) in the function and now
all works right.  When I replyed to your first mail I must
have something mistaken when I tested this but failed.  Now all
seems to work.

Thank you very very much!!

Kind regards

          Andreas.



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