=?us-ascii?Q?Re=3A=20GTK=20Widget=20assertion=20problem?=
- From: Michael T. <myso77 seznam cz>
- To: Damien Caliste <damien caliste cea fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GTK Widget assertion problem
- Date: Fri, 11 Jun 2010 11:08:06 +0200 (CEST)
Hi,
thank you all for input.
Le 10/06/2010, Shawn Bakhtiar <shashaness hotmail com> a écrit :
2.2) There is probably a memory leak somewhere. Where the structure of
the application (the compiled code) puts that pointer outside the
reach of the overflow so when you re-wrote it, it magically worked
(voodoo appearing indeed).
I agree on this explanation. To help you try to find out, may I suggest
the following:
- `grep -R progBar src`, I don't believe you will find the issue with
this, especially if iy's a stack issue, but it's a starting point to
check basic issues.
- compile your code with -Wall and -Werror if possible, to hunt all
writing code mistakes.
- remove the voodoo function, it *must* run without it.
- add a fprintf(stderr, "------> %p\n", (gpointer)progBar); after the
initialisation and add one before the failing call to check your
pointer has not been changed somewhere.
- add regular g_return_if_fail(IS_GTK_WIDGET(progBar)); at each line
between the initialisation and the failing call to spot where the stack
issue may happen. Of course writing all of this may change the bug if
it's a stack issue but it may help you.
Thank you, Damien. This has been the most constructive input.
However, I woke up this morning, simply removed the voodoo hack and the thing works!!
I don't understand it at all. I haven't changed one bit of the GTK+ code. I just woke up, read the emails
from you guys. Started to mess around with the voodoo stack hack, removed it and the thing works just as all
the other widgets.
I haven't got a clue why it is so. I'm using MinGW on Windows and I often hibernate the computer, maybe it
was just a bug in the hibernation recovery and it somehow influenced the stack issues. I don't know. It's
totally weird. Or maybe it was some local linking compiler error, since the app is using more files. I don't
get it, cause I didn't even compile all the files, just used the makefile to recompile the particular file
that takes care of the GTK+ layout. Well, anywayz, thanks for your thoughts. The voodoo is gone just as it
came, maybe the warlock died : ).
Michael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]