[gtkmm] Segfault on spin button initialisation
- From: Richard Shaw <look_in_sig sig com>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Segfault on spin button initialisation
- Date: Tue, 20 Jul 2004 11:02:17 +0100
I've got a set up like this at the moment:
==Header==
class GtkImageOutput : public Gtk::Window {
public:
GtkImageOutput();
protected:
Gtk::Adjustment adj;
Gtk::SpinButton zoom;
}
==Source==
GtkImageOutput::GtkImageOutput() :
adj(1.0, 1.0, 4.0, 1.0, 2.0, 1.0),
zoom(adj)
{
..
}
This set up is fine and compiles, however if I have the declarations for adj
and zoom in the opposite order, I get a segfault, stemming from
"Gtk::SpinButton::SpinButton () from /usr/lib/libgtkmm-2.4.so.1". I can only
presume that the initializations are getting reordered, and so when zoom(adj)
is called, adj is still uninitialised. If so, is the correct behaviour from
the compiler? It just seemed a little strange. I'm using gcc 3.3.4.
Thanks,
Richard
--
jrs65 __at__ cam . ac . uk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]