After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90891 - Gtk warnings after 1.3.19->1.3.20 upgrade
Gtk warnings after 1.3.19->1.3.20 upgrade
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-08-15 23:18 UTC by Daniel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel 2002-08-15 23:18:22 UTC
I experienced a problem after upgrading from gtkmm-1.3.19 to 1.3.20.

When I try to run the following peice of code I get an error in the console:

#include <gtkmm.h>

class MyWindow : public Gtk::Window
{
public:
  MyWindow();
private:
  Gtk::Button b;
  Gtk::VBox vbox;
};
MyWindow::MyWindow() : 
  b("hello"),
  vbox()
{
  add(vbox);
  vbox.pack_start(b);
  show_all();
}

int main (int argc, char *argv[])
{
  Gtk::Main kit(argc, argv);
  
  MyWindow window;

  kit.run(window);

  return 0;
}

[sumpan@e gtkmm-1.3.20-warning-test]$ ./test 

(test:12811): Gtk-CRITICAL **: file gtkcontainer.c: line 878
(gtk_container_remove): assertion `GTK_IS_CONTAINER (container)' failed
Segmentation fault

gtkmm-1.3.20 and gtk+-2.0.6, it runs and compiles without errors with
gtkmm-1.3.19.

---
Daniel Sundberg
dss@home.se
Comment 1 Murray Cumming 2002-08-16 07:34:50 UTC
Thanks. I will investigate this in a few days time.

By the way, I will investigate it by debugging while using the
--g-fatal-warnings argument. You might be interested to look at that 
yourself if you can't wait.
Comment 2 Daniel 2002-08-16 11:43:51 UTC
I suppose I should mention that I get the error message and seg fault
when i close the window by clicking on the close button in the titlebar.
Comment 3 Murray Cumming 2002-08-17 17:57:32 UTC
Thanks a lot.

2002-08-17  Murray Cumming  <murrayc@usa.net>
	* Gtk::Container_Class::destroy_callback():
	Uncommented the code to remove the widgets before GTK+ does so
	itself. It does seem necessary.
	* Gtk::Object::_destroy_c_instance():
	Prevented double destruction of the GtkObject, by connecting a 
	temporary GtkObject::"destroy" callback just to set 
	Gtk::Object::gobject_disposed_.
	* Added tests/child_widget2 to exercise these bug fixes.
	* This bug (#90891) was found by Daniel Sundberg.