Hello ROOTers,
I wrote a short program which dumps a GIF image using TImageDump class. I found that the line "can->SetLeftMargin(0)" caused a runtime error. However Top/Bottom/Right work well. How can I avoid this error?
The error message is;
*** glibc detected *** double free or corruption (!prev): 0x08fa63c8
***Aborted
ROOT version is 5.14 for SL 4.4
Sincerely
OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo
5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
Phone/Fax : +81 4-7136-3153
Skype : okumura.akira
$ g++ test.cxx -o test `root-config --libs --cflags`
#include "TImageDump.h"
#include "TCanvas.h"
#include "TH2D.h"
int main()
{
TCanvas* can = new TCanvas("can", "can", 100, 100);
can->SetLeftMargin(0); // <= this cause an error can->SetTopMargin(0); can->SetRightMargin(0); can->SetBottomMargin(0);
TH2D* hist = new TH2D("hist", "hist", 1, 0, 1, 1, 0, 1); hist->Draw();
TImageDump dump("test.gif");
can->Paint();
dump.Close();
return 0;
}
Received on Tue Feb 13 2007 - 14:18:55 CET
This archive was generated by hypermail 2.2.0 : Tue Feb 13 2007 - 17:50:01 CET