Problem 2186 - Abort Trap 6 in G4MultiLevelLocator
Summary: Abort Trap 6 in G4MultiLevelLocator
Status: RESOLVED WORKSFORME
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/navigation (show other problems)
Version: 10.5
Hardware: Apple Mac OS X
: P4 major
Assignee: John Apostolakis
URL:
Depends on:
Blocks:
 
Reported: 2019-08-14 17:10 CEST by Laurie Nevay
Modified: 2020-02-06 20:05 CET (History)
0 users

See Also:


Attachments
Stack showing stack in G4MultiLevelLocator (973.63 KB, image/png)
2019-08-14 17:10 CEST, Laurie Nevay
Details
Stack showing stack at G4PropagatorInField - one up from G4MultiLevelLocator (1.50 MB, image/png)
2019-08-14 17:11 CEST, Laurie Nevay
Details
Some nulls I found while exploring the stack. Perhaps ok, but don't know. (601.04 KB, image/png)
2019-08-14 17:12 CEST, Laurie Nevay
Details
More nulls - again, maybe not a problem - don't know. (601.59 KB, image/png)
2019-08-14 17:12 CEST, Laurie Nevay
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Laurie Nevay 2019-08-14 17:10:40 CEST
Created attachment 584 [details]
Stack showing stack in G4MultiLevelLocator

Hello,

In Geant4.10.5.p01 I get an abort trap 6 (and SIGABRT) and my program crashes in G4MultiLevelLocator.  The model is one that has no overlaps and works fine with every version of Geant4 up until 10.5.  To investigate, I've got Geant4 compiled with the build "Maintainer".  I used my application through CLion (an IDE) with lldb. This identifies the abort from inside G4MultiLevelLocator::EstimateIntersectionPoint, however I cannot identify the exact line or cause of the problem.

In my experience, this is caused by accessing an array with an invalid index (e.g. accessing beyond the array length).  Just a possible guess.

In our simulation we have custom integrators for magnetic field tracking, however, it's not due to this as I switch them all out for G4ClassicalRK4 and the same problem persists.

My feeling is such an abort trap should not happen.  If something were truly wrong, then an exception should be thrown.

I've attached a few screenshots of the debugger.  Please let me know if there's any extra information required.

Many thanks for your help,
Laurie
Comment 1 Laurie Nevay 2019-08-14 17:11:31 CEST
Created attachment 585 [details]
Stack showing stack at G4PropagatorInField - one up from G4MultiLevelLocator
Comment 2 Laurie Nevay 2019-08-14 17:12:17 CEST
Created attachment 586 [details]
Some nulls I found while exploring the stack. Perhaps ok, but don't know.
Comment 3 Laurie Nevay 2019-08-14 17:12:46 CEST
Created attachment 587 [details]
More nulls - again, maybe not a problem - don't know.
Comment 4 John Apostolakis 2019-08-16 18:31:25 CEST
It is a bit difficult to investigate this report, as there is little information which can help to identify a flaw.

At first inspection I can see only one potential cause for the problem, the arrays that have size [max_depth+1] and [depth].

If you can share the value of the local variables 'depth' and/or 'idepth' when an abort trap is triggered, it could confirm that the problem is related to this.

Is there any additional information about the frequency of the problem, the type of setup in which it occurs (the complexity of the region of the geometry), the intensity of the B-field and the energy of the track ? 

Best regards,
John Apostolakis
Comment 5 John Apostolakis 2020-02-06 15:39:10 CET
We need more information - else we will close this report.