Geant4 Version: 11.2.2
Operating System: Mac OS X 14.6.1 (Intel Chip)
Compiler/Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
CMake Version: 3.19.4
This is similar to this older issue, but different.
Unlike the examples above, I am using good old G4RunManager
. No factories, no multithreading, nothing. And yet, when I try to delete the runManager, I get the following error, many-many-many times over:
Non-critical error: mutex lock failure in ~G4Cache.
If the RunManagerKernel has been deleted, it failed to delete an allocated resource
and this destructor is being called after the statics were destroyed.
Exception: [code: system:22] caught: mutex lock failed: Invalid argument
No, I am not using any “shielding” in my physics list. Is this a bug in v11? Is there a good workaround?
The workaround I currently use is, well, not deleting runManager.
The code main() can be downloaded here.