AW: AW: AW: [gtkmm] Segfault when calling the MenuItem superconst ruct or.
- From: "Hopfes, Harald" <Harald Hopfes Hopfes sysde eads net>
- To: "'murrayc usa net'" <murrayc usa net>
- Cc: "'gtkmm-list gnome org'" <gtkmm-list gnome org>
- Subject: AW: AW: AW: [gtkmm] Segfault when calling the MenuItem superconst ruct or.
- Date: Wed, 28 Aug 2002 16:38:09 +0200
Yes, ImageMenuItem does
(because it uses the same ctor of Menuitem, or because it uses
add_accel_label ??)
Harald
######################################################################
ImageMenuItem::ImageMenuItem(const Glib::ustring& label, bool mnemonic)
:
Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than
a custom class, to allow vfunc optimisations.
Gtk::MenuItem(Glib::ConstructParams(imagemenuitem_class_.init(), (char*)
0))
{
add_accel_label(label, mnemonic);
}
######################################################################
Testing 0
Sizeof Object is : 56
./test_all2.sh: line 9: 12773 Segmentation fault (core dumped) ./main4
Testing 1
Sizeof Object is : 60
Testing 2
Sizeof Object is : 60
Testing 3
Sizeof Object is : 60
Testing 4
Sizeof Object is : 60
Testing 5
Sizeof Object is : 64
./test_all2.sh: line 9: 12977 Segmentation fault (core dumped) ./main4
Testing 6
Sizeof Object is : 64
./test_all2.sh: line 9: 12987 Segmentation fault (core dumped) ./main4
Testing 7
Sizeof Object is : 64
./test_all2.sh: line 9: 12996 Segmentation fault (core dumped) ./main4
Testing 8
Sizeof Object is : 64
./test_all2.sh: line 9: 13005 Segmentation fault (core dumped) ./main4
Testing 9
Sizeof Object is : 68
Testing 10
Sizeof Object is : 68
Testing 11
######################################################################
######################################################################
#include <gtkmm.h>
#include <iostream>
class NewClass : public Gtk::ImageMenuItem {
public:
NewClass() : Gtk::ImageMenuItem("String") {}
char buf[__VALUE__];
Gtk::Window *my_window;
};
int main(int argc, char *argv[]) {
Gtk::Main main_instance (&argc, &argv);
cout << "Sizeof Object is : " << sizeof(NewClass) << endl;
new NewClass();
return 0;
}
######################################################################
> -----Ursprüngliche Nachricht-----
> Von: Murray Cumming [mailto:murrayc usa net]
> Gesendet: Mittwoch, 28. August 2002 16:28
> An: Hopfes, Harald
> Cc: 'gtkmm-list gnome org'
> Betreff: Re: AW: AW: [gtkmm] Segfault when calling the MenuItem
> superconstruct or.
>
>
> On Wed, 2002-08-28 at 15:17, Hopfes, Harald wrote:
> > Murray wrote:
> > > I'm sure we can get to the bottom of this eventually. It isn't the
> > > highest priority for me personally because I don't think
> we need to
> > > derive MenuItems very often. If you find the same problem
> with other
> > > classes then I definitely want to know.
>
> > It is derived very often in the following classes:
> >
> > checkmenuitem.h:class CheckMenuItem : public MenuItem
> > imagemenuitem.h:class ImageMenuItem : public MenuItem
> > radiomenuitem.h:class RadioMenuItem : public CheckMenuItem
> > separatormenuitem.h:class SeparatorMenuItem : public MenuItem
> > tearoffmenuitem.h:class TearoffMenuItem : public MenuItem
>
> And do these classes cause segfaults?
>
> --
> Murray Cumming
> murrayc usa net
> www.murrayc.com
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]