Gtk::SpinButton crash



        Gtk::SpinButton some_spin_button;
        Gtk::Adjustment some_adjuster (2, 0, 100, 1, 10, 0);
        some_spin_button.set_adjustment (some_adjuster);

If I include the above lines in any gtkmm app (and build with MSVC) the app eventually crashes at the stage where 'some_spin_button' is getting destroyed (this is with gtkmm 2.24.4). If the app is run from a command line, Windows outputs a message saying "pure virtual function call" and then terminates it. A couple of things might be significant:-

       1)  If I comment out the 3rd line the crash doesn't happen.
2) The crash has a very similar feel to the problem I reported very recently with derived windows and dialogs (i.e. the signs are very much like a C++ wrapper got disconnected from its C object too early). 3) The crash happens in 'gtk_spin_button_finalize()' while executing this line:-

gtk_spin_button_set_adjustment (GTK_SPIN_BUTTON (object), NULL);

I could provide a more comprehensive example if needed but I thought I'd check first in case this is already a known issue. AFAICT just adding those three lines to any gtkmm app is enough to trigger the problem.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]