Hello, After change to root 3.05/07 (from 3.03) my code (event display) crashes because when the pad is closed, all TPolyLine3D objects which it was displaying are deleted. So, when my code tries to clean TPolyLine3D pointers for the next event, I get seg.vol. I am running root on RH7.3.3, gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113) The following example demonstrates the problem: { c1 = new TCanvas("c1","c1",200,10,700,500); brik = new TBRIK("BRIK","BRIK","void",20,15,15); brik->SetLineColor(2); line = new TPolyLine3D(3); line->SetNextPoint(0,0,0); line->SetNextPoint(1,2,3); line->SetNextPoint(2,4,9); line->SetLineColor(3); // Build the geometry hierarchy node1 = new TNode("NODE1","NODE1","BRIK"); node1->cd(); node1->Draw(); line->Draw(); c1->Update(); printf("\nTBRIK before canvas->Clear()\n"); brik->Print(); printf("\nTPolyLine3D before canvas->Clear()\n"); line->Print(); // c1->Clear(); printf("\nTBRIK after canvas->Clear()\n"); brik->Print(); printf("\nTPolyLine3D after canvas->Clear()\n"); line->Print(); // printf("\nDeleting created TPolyLine3D \n"); delete line; } The output is: FreeType Engine v2.1.3 used to render TrueType fonts. Compiled for linux with thread support. CINT/ROOT C/C++ Interpreter version 5.15.94, June 30 2003 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] .x shapes.C TBRIK before canvas->Clear() OBJ: TBRIK BRIK BRIK TPolyLine3D before canvas->Clear() TPolyLine3D N=3, Option= TBRIK after canvas->Clear() OBJ: TBRIK BRIK BRIK TPolyLine3D after canvas->Clear() OBJ: TObject TObject Basic ROOT object Deleting created TPolyLine3D *** Break *** segmentation violation Generating stack trace... Best regards, Ruben --
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET