Recommend print statements in that Construct() function at various points to figure out when the failure occurs. You will be doing that a lot in Geant and C.
Can you run the basic examples on your machine such as B1? Nothing looks wrong offhand about this except that giant nested for loop of 360000 elements
for (G4int i=0; i<600; i++){
for(G4int j=0; j<600; j++){
sprintf(name_sol,"de_sol_%d_%d",i+1,j+1);
sprintf(name_log,"de_log_%d_%d",i+1,j+1);
sprintf(name_phy,"de_phy_%d_%d",i+1,j+1);
de_box[i][j] = new G4Box(name_sol,0.06*mm,0.06*mm,0.1*mm);
de_log [i][j] = new G4LogicalVolume(de_box[i][j],Vaccum,name_log,0,0,0);
double length=72.*mm;
double dd=0.12*mm;
de_phys[i][j] = new G4PVPlacement(0, G4ThreeVector((-1.*length/2.+i*dd+dd/2.), (-1.*length/2.+j*dd+dd/2.), 0),
de_log[i][j], name_phy, de_ba_log, false, j+i*600);
}
}
A big server could potentially handle this many elements placed on the heap but it could definitely cause memory issues on something smaller, like a personal laptop. First check with print statements that everything works before this. Then I recommend seeing if you still get failures if the for loop indices are, say 5 each, instead of 600.
If you want to place that many elements, you will want/have to use repeated volume methods. Offhand, parameterized volumes would work well here. Examples B2 and B4 would be good places to start. This will require modifying code elsewhere since probably the original code references elements with strings (which is slow) instead of with copy IDs from the methods I alluded to earlier (much faster).