Re: [ROOT] root crash

From: Paul Nord (Paul.Nord@valpo.edu)
Date: Fri Nov 16 2001 - 22:44:04 MET


On Wed, 14 Nov 2001, Rene Brun wrote:

> Hi paul,
>
> It looks like you delete twice the same object.
> Cannot tell you more without looking at your code.
> Please, send the strict necessary to reproduce the problem.
>
> Rene Brun
>

After a lot of effort, I think that I may be close to the answer.

Try to compile this:

#include "TApplication.h"
#include "TCanvas.h"
#include "TLine.h"
#include "TPaveLabel.h"
#include "TMarker3DBox.h"
#include "TView.h"

int main(int argc, char **argv)
{
   TApplication theApp("App", &argc, argv);

   TCanvas *c = new TCanvas("c", "My Canvas", 400, 400);

   TPaveLabel *hello = new TPaveLabel(0.2,0.0,0.8,0.4,"Hello World");
   hello->Draw();
   c->Update();

   // Create main display pad
   TPad *m_Pad = new TPad("viewpad", "Event display",0.0,.4,1,1);
   m_Pad->Draw();
   m_Pad->Modified();
   m_Pad->SetBorderSize(2);
   m_Pad->cd();

   TView *view = new TView(1);
   view->SetRange(-1,-1,-1,1,1,1);

   TMarker3DBox *marker = new TMarker3DBox();
   marker->SetPosition(0,0,0);
   marker->SetSize(.1,.1,.1);
   marker->SetLineColor(2);
   marker->Draw();

   c->Update();

   theApp.Run();

   return 0;
}



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:08 MET