GNOME Bugzilla – Bug 95442
Adjustment segfaults in constructor
Last modified: 2004-12-22 21:47:04 UTC
Gtkmm: 1.3.24 Gtk+: 2.0.6 libsigc++: 1.1.3 GCC: 2.95.2 libc: 2.2.4 This small program segfaults when run. Backtrace is included. I compile with this line: g++ -g `pkg-config --cflags --libs gtkmm-2.0` src/test.cpp #include <gtkmm/main.h> #include <gtkmm/adjustment.h> class adjust : public Gtk::Adjustment { gint color_z; public: adjust(const gint & =0); }; //Constructor. adjust::adjust(const gint &mask) : Gtk::Adjustment(0.0, 0.0, 1.5, 0.01, 0.1, 0.5), color_z(mask) { cout << "adjust constructor.\n"; gdouble a; } int main(int argc, char* argv[]) { Gtk::Main main_runner(argc, argv); adjust dud(2); main_runner.run(); return(0); } (gdb) backtrace #0 0x0 in __strtol_internal (nptr=0x806ffd0 "\230þ\006\b\002", endptr=0x8063bc0, base=-1073746260, group=1079820466) at eval.c:35
+ Trace 28612
This is probably caused by the gcc dynamic_cast bug - see the FAQ.