Segfaults in Debug
I have been experiencing some seemingly non-deterministic behavior where seemingly innocuous orekit calls (like making a AbsoluteDate object) result in a segfault when I am running in debug mode in IntelliJ (SIGSEGV). I had seen this once before, and resolved it, but recently made some very minor changes unrelated to where the segfault occurs, and it is back again. I never seem to see it in normal run mode, only in debug mode, but wonder if it will pop up there eventually too. I will have to result to debug prints if I can't fix this, which would be a huge bummer!
The first time, I seemingly resolved it by changing setup_orekit_curdir() to setup_orekit_curdir(os.path.join(os.environ['OREKIT_DATA_DIR'],'orekit-data.zip')), and then unzipping orekit-data.zip for it there beforehand.
After some unrelated changes, it is back though, and I am hunting again.
I found a thread here that indicates this is possibly related to GC or heap size (which would not at all surprise me w/ java): https://groups.google.com/forum/#!topic/python-ideas/7kCoklbOHo0
Tried a number of new things to no avail:
Used an alternate orekit-data strategy: from java.io import File orekitData = File('/peg/orekit-data/') # note docs say this should renamed to just 'orekit-data' manager = DataProvidersManager.getInstance() manager.addProvider(DirectoryCrawler(orekitData))
Tried customizing the JVM by supplying input options to see if it helps avoid GC: orekit.initVM(initialheap="4096M", maxheap="4096M") #vmargs="-Xmx4096M,-Xms4096M,-verbose:gc,-XX:PermSize=4096M")
Tried disabling python gc: import gc gc.disable()
Running out of ideas to try, does anyone have any other ideas here?
Thanks in advance for any help! Jonathan