I’m using Visual C++ v 7.0.9466 and Root Version 4.04/02 binary for windows.
I’m getting the following error when I try to instantiate a TCanvas object.
Creating the canvas . . .
: passed oldsize 4000, should be 459253
Fatal in : unreasonable size (459253)
aborting
Warning in TWinNTSystem::StackTrace: this method must be overridden!
The code is pretty simple:
TCanvas *canvas = new TCanvas(“PDE Canvas”);
int testWritingRoot(void)
{
// TODO: Please replace the sample code below with your own.
TCanvas *canvas = new TCanvas("You'll never see me.");
TRandom *tRand = new TRandom();
TFile *tFile = new TFile("root_file.root");
TH1F *h1 = new TH1F("h1","my histogram",100,-3,3);
for (int i=0;i<10000;i++) h1->Fill(tRand->Gaus(0,1));
h1->Draw();
canvas->SaveAs("Hist.C");
canvas->Close();
canvas->Delete();
tFile->Write();
tFile->Save();
return 0;
}
The error is: : passed oldsize 4000, should be 459253
Fatal in : unreasonable size (459253)
aborting
Warning in TWinNTSystem::StackTrace: this method must be overridden!
Here are also are my compile and link command lines: