AW: [gtkmm] Segfault when calling the MenuItem superconstructor.



Hi!

I will run some tests, first I am doing it with MenuItem then with others.
But for MenuItem I have some (maybe interesting) results:

I am using some shell-script to repeatingly compile a C++ File
and afterwards starting the resulting executable.

The funny thing is that the SEGFAULT only occurs on certain sizes of the
MenuItem-object.

Harald

############################################################################
#
NR=0
while true
do
    echo "Testing $NR"
    sed -e"s/__VALUE__/${NR}/g" main.cpp > main3.cpp
    nice -19 c++ -o main3 `pkg-config gtkmm-2.0 --cflags --libs` main3.cpp
    ./main3
    NR=$((NR+1))
done
############################################################################
#


############################################################################
#
#include <gtkmm.h>
#include <iostream>

class NewNodeMenuItem : public Gtk::MenuItem {
public:

  NewNodeMenuItem() : Gtk::MenuItem("Node") {}
  Gtk::Window *my_window;
  char buf[__VALUE__];
};

int main(int argc, char *argv[]) {

  Gtk::Main main_instance (&argc, &argv);
  cout << "Sizeof Object is : " << sizeof(NewNodeMenuItem) << endl;
  new NewNodeMenuItem();

  return 0;

}

############################################################################
#

############################################################################
#

Testing 0
Sizeof Object is : 56
./test_all.sh: line 9:  6671 Segmentation fault      (core dumped) ./main3
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_all.sh: line 9:  6724 Segmentation fault      (core dumped) ./main3
Testing 6
Sizeof Object is : 64
./test_all.sh: line 9:  6736 Segmentation fault      (core dumped) ./main3
Testing 7
Sizeof Object is : 64
./test_all.sh: line 9:  6749 Segmentation fault      (core dumped) ./main3
Testing 8
Sizeof Object is : 64
./test_all.sh: line 9:  6760 Segmentation fault      (core dumped) ./main3
Testing 9
Sizeof Object is : 68
Testing 10
Sizeof Object is : 68
Testing 11
Sizeof Object is : 68
Testing 12
Sizeof Object is : 68
Testing 13
Sizeof Object is : 72
Testing 14
Sizeof Object is : 72
Testing 15
Sizeof Object is : 72
Testing 16
Sizeof Object is : 72
Testing 17
Sizeof Object is : 76
Testing 18
Sizeof Object is : 76
Testing 19
Sizeof Object is : 76
Testing 20
Sizeof Object is : 76
Testing 21
Sizeof Object is : 80
Testing 22
Sizeof Object is : 80
Testing 23
Sizeof Object is : 80
Testing 24
Sizeof Object is : 80
Testing 25
Sizeof Object is : 84
Testing 26
Sizeof Object is : 84
Testing 27
Sizeof Object is : 84
Testing 28
Sizeof Object is : 84
Testing 29
Sizeof Object is : 88
Testing 30
Sizeof Object is : 88
Testing 31
Sizeof Object is : 88
Testing 32
Sizeof Object is : 88
Testing 33
Sizeof Object is : 92
Testing 34
Sizeof Object is : 92
Testing 35
Sizeof Object is : 92
Testing 36
Sizeof Object is : 92
Testing 37
Sizeof Object is : 96
Testing 38
Sizeof Object is : 96
Testing 39
Sizeof Object is : 96
Testing 40
Sizeof Object is : 96
Testing 41
Sizeof Object is : 100
Testing 42
Sizeof Object is : 100
Testing 43
Sizeof Object is : 100
Testing 44
Sizeof Object is : 100
Testing 45
Sizeof Object is : 104
Testing 46
Sizeof Object is : 104
Testing 47
Sizeof Object is : 104
Testing 48
Sizeof Object is : 104
Testing 49
Sizeof Object is : 108
Testing 50
Sizeof Object is : 108
Testing 51
Sizeof Object is : 108
Testing 52
Sizeof Object is : 108
Testing 53
Sizeof Object is : 112
Testing 54
Sizeof Object is : 112
Testing 55
Sizeof Object is : 112
Testing 56
Sizeof Object is : 112
Testing 57
Sizeof Object is : 116
Testing 58
Sizeof Object is : 116
Testing 59
Sizeof Object is : 116
Testing 60
Sizeof Object is : 116
Testing 61
Sizeof Object is : 120
Testing 62
Sizeof Object is : 120
Testing 63
Sizeof Object is : 120
Testing 64
Sizeof Object is : 120
Testing 65
Sizeof Object is : 124
Testing 66
Sizeof Object is : 124
Testing 67
Sizeof Object is : 124
Testing 68
Sizeof Object is : 124
Testing 69
Sizeof Object is : 128
Testing 70
Sizeof Object is : 128
Testing 71
Sizeof Object is : 128
Testing 72
Sizeof Object is : 128
Testing 73
Sizeof Object is : 132
Testing 74
Sizeof Object is : 132
Testing 75
Sizeof Object is : 132
Testing 76
Sizeof Object is : 132
Testing 77
Sizeof Object is : 136
Testing 78
Sizeof Object is : 136
Testing 79
Sizeof Object is : 136
Testing 80
Sizeof Object is : 136
Testing 81
Sizeof Object is : 140
Testing 82
Sizeof Object is : 140
Testing 83
Sizeof Object is : 140
Testing 84
Sizeof Object is : 140
Testing 85
Sizeof Object is : 144
Testing 86
Sizeof Object is : 144
Testing 87
Sizeof Object is : 144
Testing 88
Sizeof Object is : 144
Testing 89
Sizeof Object is : 148
Testing 90
Sizeof Object is : 148
Testing 91
Sizeof Object is : 148
Testing 92
Sizeof Object is : 148
Testing 93
Sizeof Object is : 152
Testing 94
Sizeof Object is : 152
Testing 95
Sizeof Object is : 152
Testing 96
Sizeof Object is : 152
Testing 97
Sizeof Object is : 156
Testing 98
Sizeof Object is : 156
Testing 99
Sizeof Object is : 156
Testing 100
Sizeof Object is : 156
############################################################################
#

> -----Ursprüngliche Nachricht-----
> Von: Murray Cumming [mailto:murrayc usa net]
> Gesendet: Mittwoch, 28. August 2002 14:45
> An: Hopfes, Harald
> Cc: 'gtkmm-list gnome org'; Kuth, Joachim Dr.; Schwan, 
> Reinhard; Meier,
> Elke
> Betreff: Re: [gtkmm] Segfault when calling the MenuItem
> superconstructor.
> 
> 
> On Wed, 2002-08-28 at 12:33, Hopfes, Harald wrote:
> > Hello!
> > 
> > We use gtkmm in our industrial project and the bug
> > http://bugzilla.gnome.org/show_bug.cgi?id=78578 occurs many times 
> > , we might be urged to migrate back to an older version of gtkmm.
> > 
> > This would cause __very much__ work for us.
> > Is anybody working on this bug?
> 
> Do you experience this only with Gtk::Menu, or with other classes too?
> Have you discovered anything that might help us?
> 
> -- 
> Murray Cumming
> murrayc usa net
> www.murrayc.com
> 



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