Segmentation fault (Address not mapped to object [0x8])

hello,I want to simulate ZnS scintillator but didn’t define surface.when I run a macro file which is

control/loop run.mac length 0.0005 0.0060 0.0005

geant4 go wrong.

if I just run with a singel thickness not loop,this error didn’t happened.

hope for someone to give me some adviece!!!

The best thing to do here is compile Geant4 and your application in Debug or RelWithDebInfo mode to include debugging symbols. The application can then be run inside a debugger such as gdb or lldb to trace the source of the problem with more info than a simple backtrace.