[gtkmm] Possible bug in 1.3.26
- From: "Robert J. Hansen" <rjhansen inav net>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Possible bug in 1.3.26
- Date: 19 Oct 2002 00:34:34 -0500
[rjhansen numbers gtkgpg-0.1]$ more bug.h
#include <gtkmm.h>
struct Bug : public Gtk::VBox {
public:
Bug();
virtual ~Bug() {};
protected:
Gtk::Label _label;
Gtk::Entry _entry;
Gtk::HBox _hbox;
};
[rjhansen numbers gtkgpg-0.1]$ more bug.cc
#include "bug.h"
Bug::Bug()
{
_label.set_text("Recipients: ");
_hbox.pack_start(_label, false);
_hbox.pack_start(_entry, true, true);
pack_start(_hbox, false);
}
int main(int argc, char *argv[])
{
Gtk::Main mainloop(&argc, &argv);
Gtk::Window window;
Bug bug;
window.add(bug);
window.show_all();
mainloop.run(window);
return 0;
}
... When compiling the above code (Mandrake 9 box, GCC 3.2) with -Wall
-W, I get no complaints whatsoever. When I execute the code, the widget
appears fine and dandy; but when I close the window, I get a segfault.
Replacing the Gtk::HBox with a Gtk::HBox* (either manually handled or
handed off to manage()) removes the problem.
Can anyone shed some light on what's going on here?
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]