I’d tell you if I knew. I’ve asked several developers and none of us have a clue what would cause that code to throw bad_alloc errors, other than the obvious issue of running out of memory.
Can you test to ensure that it’s not running out of memory? How much is on the machine and how much gets used when it crashes?
Can you run it in debug mode (compile without mode=release) to see precisely what allocation is crashing? This will unfortunately be very, very slow…