Re: gdk events stuff debugging



Thanks for the links. I'm gonna try parasite and will compile gtk from
source with debugging enabled.

What made me think that maybe there was a mess with events is that I have
one dialog in the app to setup preferences. This dialog have a lot of entries
and extra buttons. And I have another dialog with one entry, a tree view to
select urls and extra buttons as well. Then I have to catch double-clicks on
the tree view and do several things when clicking on buttons. So I had to write
event handlers to achieve this. I also need to catch <esc_key> pressed. And the
app only crashes when I'm in these dialogs. So, do I need to mess with events or
not? I really don't know yet.

Anyways, I hope debugging with a recompiled version of gtk will make things
clearer...


Emmanuel Thomas-Maurin


Boggess Rod wrote:
Let me say this right up front, debugging threaded applications is
tricky in any platform using any tool. That said, anything and
everything is a suspect until it's not.

The gtk_widget_set_events() function allows you to specify a mask to
filter events received by a widget. Unless you're writing something that
requires you to turn off events to in-built widgets or creating your own
widgets, you probably don't want to mess with that.  If you're not doing
either of the aforementioned activities, it shouldn't be a source of the
problem.

My use of GTK is very limited; HPUX and Windows. I see that there's a
new tool out called Parasite (MIT public license) from VMWare
specifically for debugging GTK.
Someone else on this list would have more experience with GDB and any
tools to assist with GTK, but here are two helpful links you might check
out for some guidance. If you like, you can google the list's archives
(http://www.google.com/custom?hq=inurl:/archives/gtk-list/&hl=en&domains
=mail.gnome.org&q=debugger&btnG=Search&sitesearch=mail.gnome.org) -- I
know debugging using gdb has been discussed on here before.

http://www.gtk.org/api/2.6/gtk/gtk-running.html
http://code.google.com/p/chromium/wiki/LinuxDebuggingGtk


-----Original Message-----
From: Manu TM [mailto:manutm007 gmail com] Sent: Wednesday, January 27, 2010 4:11 PM
To: Boggess Rod
Cc: GTK mailing list
Subject: Re: gdk events stuff debugging

I'm using gcc (v4.4.1) on ubuntu (linux kernel 2.6.31-18.)

By the way, I was just reading the gtk doc on events when I found
something saying that it was a common mistake to forget to use
gtk_widget_set_events(). well, I've actually never used this function.
Could this be the reason of the mess?


Emmanuel Thomas-Maurin


Boggess Rod wrote:
I don't know the answer, but I do know that, since gtk is a
cross-platform library, the answer will require knowing what platform,
and probably what compiler you're using. You might want to repost with
that information.

-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Manu TM
Sent: Wednesday, January 27, 2010 1:29 PM
To: GTK mailing list
Subject: gdk events stuff debugging

Hi,

This may be a not specific enough question but what's the best way to
debug a gtk app? I've been debugging one without much success for
about
2 weeks now and I think there are problems related to callbacks and
gdk
events handlers because I always get segfaults from
gkd_events_dispatch().
And I've been checking my code again and again. This is becoming a big
problem now because I really need to have my app working fine very
soon.
So far, gdb and valgrind haven't be usefull enough so I guess I will
have
to go to the "printf" debugging stuff. But I don't how to check all
this
gdk
events stuff. Any idea?

Any hints will be highly appreciated and I'm ready to try out anything
possible.
Many thanks in advance.




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