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 95442 - Adjustment segfaults in constructor
Adjustment segfaults in constructor
Status: RESOLVED NOTABUG
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2002-10-10 21:50 UTC by jlm
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jlm 2002-10-10 21:50:25 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
  • #1 Gtk::Adjustment_Class::changed_callback
    at eval.c line 88
  • #2 g_cclosure_marshal_VOID__VOID
    at eval.c line 88
  • #3 g_type_class_meta_marshal
    at eval.c line 88
  • #4 g_closure_invoke
    at eval.c line 88
  • #5 signal_emit_unlocked_R
    at eval.c line 88
  • #6 g_signal_emit_valist
    at eval.c line 88
  • #7 gtk_signal_emit
    at eval.c line 88
  • #8 gtk_adjustment_changed
    at eval.c line 88
  • #9 Gtk::Adjustment::changed
    at eval.c line 88
  • #10 Gtk::Adjustment::Adjustment
    at eval.c line 88
  • #11 adjust::adjust
    at src/test.cpp line 31
  • #12 main
    at src/test.cpp line 40
  • #13 __libc_start_main
    at ../sysdeps/generic/libc-start.c line 129

Comment 1 Murray Cumming 2002-10-11 17:51:04 UTC
This is probably caused by the gcc dynamic_cast bug - see the FAQ.