Message: Simple G4VBREPSolidPolyhedra error? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Simple G4VBREPSolidPolyhedra error? 

Keywords: G4BREPSolidPolyhedra malloc error
Forum: Geometry
Date: 24 Jul, 2005
From: John Carter <John Carter>

Hi all,

I am trying to create a 'cylindrical' shaped object with the plane faces
being regular octagonals. To do this I thought that using G4BREPSolidPolyHedra
would be easiest. I can create, visualize, and fire particles through the 
resulting solid - but when exiting the program I get the following error:

myprog(13517) malloc: *** error for object 0xc9b0880: double free
myprog(13517) malloc: *** set a breakpoint in szone_error to debug

I have run gdb on this setting a break point at malloc_printf and then
run a backtrace with the following result:

#0  0x9011fa98 in malloc_printf ()
#1  0x90007018 in szone_free ()
#2  0x071617a0 in operator delete ()
#3  0x0716fe74 in operator delete[] ()
#4  0x0713bcb8 in G4BREPSolidPolyhedra::~G4BREPSolidPolyhedra ()
#5  0x0713bc3c in G4BREPSolidPolyhedra::~G4BREPSolidPolyhedra ()
#6  0x0709d118 in G4SolidStore::Clean ()
#7  0x0709d018 in G4SolidStore::~G4SolidStore ()
#8  0x0709cfb0 in G4SolidStore::~G4SolidStore ()
#9  0x0709d2fc in __tcf_0 ()
#10 0x90013a9c in __cxa_finalize ()

From this it looks like it is something to do with the deconstructor of 
G4BREPSolidPolyhedra trying to re-delete something...

I initiate the solid using the following code:

 G4int Sides = 8;
 G4double itsZ_Values[2] = {-10*cm, 10*cm};
 G4double itsRMINVec[2] = {2*cm, 2*cm};
 G4double itsRMAXVec[2] = {20*cm, 20*cm};

 G4BREPSolidPolyhedra OuterSolid = 
    new G4BREPSolidPolyhedra(itsName+"PocketOuter",

I'm guessing that I've just missed something simple - but after looking 
at it for this long I think I need a fresh opinion!


NB: For information, I am using the Fink installed Geant4.6.2 on a Mac OsX

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Simple G4VBREPSolidPolyhedra error?   (Oliver Link - 01 Aug, 2005)
 Add Message Add Message
to: "Simple G4VBREPSolidPolyhedra error?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]