Error on ActionInitialization

Please fill out the following information to help in answering your question, and also see tips for posting code snippets

_Geant4 Version:11.1.2
_Operating System:ubunu

when I call my ActionUser class created in the main program, the following problem appears on the screen.
I do not understand this problem because I think I have written well
Thank you, cordially Raoul

1 Like

It’s possible you may be encountering the same problems as reported here: For multi-threaded version, define G4VUserPrimaryGeneratorAction in G4VUserActionInitialization.

Could you double check that the application is building/linking against the expected version of Geant4? If possible, could you also post the source files as attachments here so we can look at the whole, especially the main function.

ok, here it is (604 Bytes)
ActionInitialization.hh (549 Bytes) (1.3 KB)
EXPLE is the main program

Thanks for these files, could you also post the rest of the files needed to compile the full application please? I think that’s the only way to try and confirm what’s going on.

ok,thanks you
here is the mega link of the application folder, it’s compress

hi bmorgan, i would like to know if you were able to upload the files to mega and debug my code.

The short answer is to remove the line SetUserAction(new primarygenerator); in ActionInitialization::BuildForMaster(). The general rule is that only any RunAction class should be initialised here and no others.

We’ll look at making the error message clearer here.

ok I will try.
THANKS bmorgan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.