Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-05-2008, 09:24 PM   #1
Registered: Apr 2005
Posts: 50

Rep: Reputation: 15
Question gtkmm checkmenuitem Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_

I have a Gtk::Window with a Gtk::CheckMenuItem member. Also, there is a function UpdateChecks() that updates whether the CheckMenuItem(s) should be checked or not, by using set_active() (within a Try and Catch(...)).

Application works fine. For some reason occasionally when I quit (and only after I quit) the program I get a set of Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed messages dumped into the terminal that I've run the program from.

What could be causing this?

Is there a better way to set the values. Meaning, can the Glib::ProxyProperty:ropert_active be diverted to a function in my Gtk::Window class to set the check on or off depending on variables within my Gtk::Window?

Thanks for any help,

Old 08-07-2008, 02:24 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Several applications will display a message in
the terminal window, like the above.

Usually it can just be ignored, has no importance
for the function of the application.

Old 08-07-2008, 06:36 AM   #3
Registered: Apr 2005
Posts: 50

Original Poster
Rep: Reputation: 15

While it doesn't affect the program or my sleep, it's a neatness thing that I can't personally ignore.

In my UpdateChecks function if I check the objects using m_CheckMenu.gobj()!=NULL prior to calling a set_active then this avoids the error message dump.

This would seem to me that when the application is quitting, somehow this function is being called after the window has destroyed the checkmenu objects but before the window is fully destroyed. However, as of yet, I've found nothing in my code that would cause this, certainly nothing in the destructor calls functions.

Anyway, still thing there should be a way to divert the property_value function to use an outside function within my Window to set the value. Like setting up a callback...or attaching a toggled function using connect. Haven't found anything documented anywhere though....

If anyone knows how, please let me know...



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opera and Flash Player = Gtk-CRITICAL Pratt Slackware 7 03-31-2008 02:18 PM
Gtk-CRITICAL mickeyboa Fedora 2 09-01-2007 10:52 AM
Evince - Gtk-CRITICAL errors snl Linux - Software 0 07-19-2006 04:11 AM
Yamipod. Gtk-CRITICAL, Gdk-WARNING. How to resolve? lebabyg Linux - Software 2 04-01-2006 06:50 AM
GTKmm or GTK+ ??? fei Programming 2 08-29-2005 12:56 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration