In our geometry processing pipeline I got an out of memory dialog / crash. The cause was a Brep.CreateOffsetBrep with terrible input.
As a means to prevent the crashing I made this example script to run on the file in the zip.
Note that within the pipeline I got an out of memory dialog yet with this script I get a crash.
Hope this helps.