Hi,
If I launch root and run the following macro twice, root dont like it.
root [0] .x bug.C
root [1] .x bug.C
*** Break *** segmentation violation
Shouldnt simply the canva be replaced by the newest one ?
The reported error is not the same if I comment the 'typedef' at first
line.
Code :
<<<<<<
typedef enum {no_beam,he6_beam,be11_beam } E_beam_style;
void bug(void)
{
for (int i=0;i<2;i++) do_it();
}
void do_it(void)
{
TCanvas *cnv= multipad(1);
}
TCanvas* multipad(int cx)
{
char s0[100];
sprintf(s0,"c%d",cx);
TCanvas *cnv = new TCanvas(s0,s0,500,500);
p = new TPad("a","b",.1,.1,.9,.9);
return(cnv);
}
>>>>>>>
Thanx for any help.
Yannick
--
_/ Yannick Patois _________________ Address (home) __________________
| irc(undernet): Garp on #france25+ | La Villa des Sciences |
| email : patois@ganil.fr | 12, avenue de Cambridge |
| http://garp.feelingsurfer.net/ | 14200 Herouville-Saint-Clair |
| Tel/Fax-home:+33 (0)2 31 94 50 32 | FRANCE |
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:31 MET