Process 6518 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x100000649) frame #0: 0x000000010ee2ceb8 libpetsc.3.018.dylib`PetscTrFreeDefault + 712 libpetsc.3.018.dylib`PetscTrFreeDefault: -> 0x10ee2ceb8 <+712>: str x9, [x8, #0x648] 0x10ee2cebc <+716>: ldr w8, [x24, #0x600] 0x10ee2cec0 <+720>: subs w8, w8, #0x1 0x10ee2cec4 <+724>: b.lt 0x10ee2cee8 ; <+760> (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x100000649) * frame #0: 0x000000010ee2ceb8 libpetsc.3.018.dylib`PetscTrFreeDefault + 712 frame #1: 0x000000010ed1b180 libpetsc.3.018.dylib`PetscFunctionListDestroy + 388 frame #2: 0x000000010eda20c8 libpetsc.3.018.dylib`PetscHeaderDestroy_Private + 1436 frame #3: 0x000000010f10176c libpetsc.3.018.dylib`VecDestroy + 808 frame #4: 0x0000000110199f34 libpetsc.3.018.dylib`KSPSolve_Private + 512 frame #5: 0x0000000110199970 libpetsc.3.018.dylib`KSPSolve + 332 frame #6: 0x000000010feb3fbc libpetsc.3.018.dylib`PCMGMCycle_Private + 812 frame #7: 0x000000010fecb3c8 libpetsc.3.018.dylib`PCApply_MG_Internal + 2764 frame #8: 0x000000010fec9794 libpetsc.3.018.dylib`PCApply_MG + 180 frame #9: 0x000000010fe25560 libpetsc.3.018.dylib`PCApply + 1244 frame #10: 0x000000010fe2bc28 libpetsc.3.018.dylib`PCApplyBAorAB + 4664 frame #11: 0x00000001102ade9c libpetsc.3.018.dylib`KSP_PCApplyBAorAB + 412 frame #12: 0x00000001102ac2d4 libpetsc.3.018.dylib`KSPGMRESCycle + 2268 frame #13: 0x00000001102af5c4 libpetsc.3.018.dylib`KSPSolve_GMRES + 492 frame #14: 0x000000011019a860 libpetsc.3.018.dylib`KSPSolve_Private + 2860 frame #15: 0x0000000110199970 libpetsc.3.018.dylib`KSPSolve + 332 frame #16: 0x000000010185d330 libsynergia_collective.dylib`solve(sctx=0x0000000108b1ecb8, gctx=0x0000000108b1ebc0) at space_charge_3d_fd_utils.cc:413:5 frame #17: 0x000000010184ca54 libsynergia_collective.dylib`Space_charge_3d_fd::apply_bunch(this=0x0000000108b1ea58, bunch=0x000000010b104d80, time_step=2.7959814862440695E-8, logger=0x000000016fdf9d18) at space_charge_3d_fd.cc:249:9 frame #18: 0x0000000101845e8c libsynergia_collective.dylib`Space_charge_3d_fd::apply_impl(this=0x0000000108b1ea58, sim=0x000000016fdfa268, time_step=2.7959814862440695E-8, logger=0x000000016fdf9d18) at space_charge_3d_fd.cc:149:13 frame #19: 0x00000001029912ec libsynergia_simulation.dylib`Operator::apply(this=0x0000000108b1ea58, simulator=0x000000016fdfa268, time_step=2.7959814862440695E-8, logger=0x000000016fdf9d18) at operator.h:64:5 frame #20: 0x0000000102990ecc libsynergia_simulation.dylib`Step::apply(this=0x0000600003b04038, simulator=0x000000016fdfa268, logger=0x000000016fdf9d18) const at step.cc:56:9 frame #21: 0x0000000102a5a408 libsynergia_simulation.dylib`Propagator::do_step(this=0x000000016fdfa4e8, simulator=0x000000016fdfa268, step=0x0000600003b04038, step_count=2, turn_count=11, logger=0x000000016fdf9d18) at propagator.cc:112:10 frame #22: 0x0000000102a5b530 libsynergia_simulation.dylib`Propagator::propagate(this=0x000000016fdfa4e8, sim=0x000000016fdfa268, logger=0x000000016fdf9d18, max_turns=20) at propagator.cc:455:17 frame #23: 0x0000000100011ea8 fodo_cxx`run(opts=) at fodo_cxx.cc:169:16 frame #24: 0x00000001000935b4 fodo_cxx`main(argc=6, argv=0x000000016fdfacb8) at fodo_cxx.cc:188:5 frame #25: 0x0000000100fd108c dyld`start + 520 (lldb)