GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Jul 23, 2014 10:10 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: gtk+2.0 debug library version
PostPosted: Sun Oct 07, 2012 1:07 pm 
Offline
Familiar Face

Joined: Tue Feb 28, 2012 1:16 pm
Posts: 11
Location: Russia
Hi!

I want to debug with built-in debug instruments by passing "--gtk-debug all" to my app but it shows no reaction on this option.

gtk.org says:
Quote:
... --gtk-debug options. A list of debug options to turn on in addition to those specified in the GTK_DEBUG environment variable. This option is only available if GTK+ has been configured with --enable-debug=yes.

Also the book "Foundation of GTK+" says that the default option is --enable-debug=minimum so some debug stuff is on but I can see no signs of it.
Is there any way to find out what options the gtk library was built with to clarify the state of the --enable-debug flag?

I'm using Ubuntu 10.04 and I have libgtk2.0-0-dbg installed. Maybe I somehow need to use this dbg library instead of the non-debug version?

Thanks.


Top
 Profile  
 
 Post subject: Re: gtk+2.0 debug library version
PostPosted: Sun Oct 07, 2012 11:09 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
The --enable-debug command is given at configuration time so when you download a package this has already been set by the maintainer; likely as the default minimum. Installing the dbg package isn't going to change this.
If you want to do what you say you want (I have no idea why though -- I don't expect you'll routinely find bugs in the gtk code) then you'll likely have to compile the gtk library stack from source. This can easily stuff up your system if you try it out on your ubuntu distro (at least it was easy for me); I would advise partitioning your computer and installing gentoo which is more suited to customisations like you suggest.


Top
 Profile  
 
 Post subject: Re: gtk+2.0 debug library version
PostPosted: Fri Oct 19, 2012 10:39 am 
Offline
Familiar Face

Joined: Tue Feb 28, 2012 1:16 pm
Posts: 11
Location: Russia
Quote:
I have no idea why though

Maybe i had to explain the problem.

My gui at uncertain time stop responding, but app continue working (i see it on console).
I thought that using gtk debug flag would show me what's going inside gtk.

Maybe you have another solution to my problem, i would be very appreciate.


Top
 Profile  
 
 Post subject: Re: gtk+2.0 debug library version
PostPosted: Sun Oct 21, 2012 12:59 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Can't really think up another solution if there isn't any pattern to how it freezes up. I've had similar things in the past but it was always associated with particular components, e.g. when using gtk_file_chooser_dialog. Until some pattern emerges there's really not much you can do to diagnose the problem.
What you mention with enabling debug mode should give you more information to go on, which is always useful; so give it a try.
If there is some issue on the GUI side and the rest of your application is running smoothly you can get some information out of what is going on inside GTK by adding regular checks with gtk_events_pending, gtk_get_current_event, etc., and use your application to print these to the console.
Of course it may be that your main application is busy running some process (I don't know what your application might be printing to console) and control hasn't been returned to gtk_main in which case the issue will be with your application rather than the GUI side.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group